OpenTTD Source 20250503-master-gf4f05dea33
|
All geometry types in OpenTTD. More...
Go to the source code of this file.
Data Structures | |
struct | Point |
Coordinates of a point in 2D. More... | |
struct | Dimension |
Dimensions (a width and height) of a rectangle in 2D. More... | |
struct | RectPadding |
Padding dimensions to apply to each side of a Rect. More... | |
struct | Rect |
Specification of a rectangle with absolute coordinates of all edges. More... | |
struct | PointDimension |
Specification of a rectangle with an absolute top-left coordinate and a (relative) width/height. More... | |
Functions | |
int | CentreBounds (int min, int max, int size) |
Determine where to position a centred object. | |
All geometry types in OpenTTD.
Definition in file geometry_type.hpp.
|
inline |
Determine where to position a centred object.
min | The top or left coordinate. |
max | The bottom or right coordinate. |
size | The height or width of the object to draw. |
Definition at line 26 of file geometry_type.hpp.
Referenced by DrawAircraftImage(), DrawButtonDropdown(), DrawCharCentered(), DrawCloseBox(), NetworkClientListWindow::DrawCompany(), DrawCompanyManagerFace(), DrawEngineList(), DrawRoadVehImage(), DrawShipImage(), BuildSignalWindow::DrawSignalSprite(), DrawTrainImage(), NewGRFInspectWindow::DrawVehicleChainWidget(), BuildAirportWindow::DrawWidget(), CompanyWindow::DrawWidget(), GenerateProgressWindow::DrawWidget(), GraphLegendWindow::DrawWidget(), PerformanceRatingDetailWindow::DrawWidget(), LinkGraphLegendWindow::DrawWidget(), BaseNetworkContentDownloadStatusWindow::DrawWidget(), NetworkJoinStatusWindow::DrawWidget(), NewGRFWindow::DrawWidget(), ScanProgressWindow::DrawWidget(), NewsWindow::DrawWidget(), StatusBarWindow::DrawWidget(), BuildTreesWindow::DrawWidget(), RefitWindow::DrawWidget(), VehicleDetailsWindow::DrawWidget(), VehicleViewWindow::DrawWidget(), ScriptDebugWindow::DrawWidgetCompanyButton(), GetAlignedPosition(), and SmallMapWindow::GetStationMiddle().