|
OpenTTD Source 20260711-master-g3fb3006dff
|
All geometry types in OpenTTD. More...
Go to the source code of this file.
Data Structures | |
| struct | Alignment |
| Horizontal and vertical alignment. More... | |
| struct | Coord2D< T > |
| A coordinate with two dimensions. More... | |
| struct | Coord3D< T > |
| A coordinate with three dimensions. 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... | |
Typedefs | |
| using | Point = Coord2D<int> |
| Coordinates of a point in 2D. | |
Enumerations | |
| enum class | AlignmentH : uint8_t { Start , Centre , End , ForceLeft , ForceRight } |
| Horizontal alignments. More... | |
| enum class | AlignmentV : uint8_t { Top , Middle , Bottom } |
| Vertical alignments. 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.
Coordinates of a point in 2D.
Definition at line 102 of file geometry_type.hpp.
|
strong |
Horizontal alignments.
| Enumerator | |
|---|---|
| Start | Align to the start, LTR/RTL aware. |
| Centre | Align to the centre. |
| End | Align to the end, LTR/RTL aware. |
| ForceLeft | Force align to the left. |
| ForceRight | Force align to the right. |
Definition at line 20 of file geometry_type.hpp.
|
strong |
Vertical alignments.
| Enumerator | |
|---|---|
| Top | Align to the top. |
| Middle | Align to the middle. |
| Bottom | Align to the bottom. |
Definition at line 29 of 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 63 of file geometry_type.hpp.
Referenced by Rect::CentreToHeight(), DrawAircraftImage(), StationViewWindow::DrawCargoIcons(), DrawCharCentered(), DrawCloseBox(), DrawCompanyManagerFace(), DrawEngineList(), VehicleGroupWindow::DrawGroupInfo(), DrawRoadVehImage(), DrawShipImage(), BuildSignalWindow::DrawSignalSprite(), DrawTrainImage(), NewGRFInspectWindow::DrawVehicleChainWidget(), BaseNetworkContentDownloadStatusWindow::DrawWidget(), BuildAirportWindow::DrawWidget(), BuildTreesWindow::DrawWidget(), CompanyWindow::DrawWidget(), GraphLegendWindow::DrawWidget(), LinkGraphLegendWindow::DrawWidget(), NetworkJoinStatusWindow::DrawWidget(), NewGRFWindow::DrawWidget(), NewsWindow::DrawWidget(), PerformanceRatingDetailWindow::DrawWidget(), RefitWindow::DrawWidget(), ScanProgressWindow::DrawWidget(), StatusBarWindow::DrawWidget(), VehicleDetailsWindow::DrawWidget(), VehicleViewWindow::DrawWidget(), ScriptDebugWindow::DrawWidgetCompanyButton(), GetAlignedPosition(), and SmallMapWindow::GetStationMiddle().