|
libosmscout 0.1
|
Anonymous screen rectangular bounding box. More...
#include <ScreenBox.h>
Public Member Functions | |
| Vertex2D | GetCenter () const |
| Returns the center coordinates of the box. | |
| double | GetHeight () const |
| Returns the height of the bounding box (maxLat-minLat). | |
| double | GetMaxX () const |
| double | GetMaxY () const |
| double | GetMinX () const |
| double | GetMinY () const |
| double | GetSize () const |
| Returns the size of the screen box (width*height). | |
| double | GetWidth () const |
| Returns the width of the bounding box (maxLon-minLon). | |
| bool | Intersects (const ScreenBox &other) const |
| bool | Intersects (const ScreenBox &other, bool openInterval) const |
| bool | IsEmpty () const |
| Check if size of the screen box is zero. | |
| ScreenBox | Merge (const ScreenBox &other) const |
| ScreenBox & | operator= (const ScreenBox &other)=default |
| Assign the value of other. | |
| ScreenBox & | operator= (ScreenBox &&other)=default |
| Move assignment operator. | |
| bool | operator== (const ScreenBox &other) const |
| Compare two values. | |
| ScreenBox | Resize (double offset) const |
| Resize the rectangle in all dimension using the given amount. | |
| ScreenBox ()=default | |
| The default constructor creates an invalid instance. | |
| ScreenBox (const ScreenBox &other)=default | |
| Copy-Constructor. | |
| ScreenBox (const Vertex2D &coordA, const Vertex2D &coordB) | |
| Initialize the GeoBox based on the given coordinates. | |
| ScreenBox (ScreenBox &&other)=default | |
| Move-Constructor. | |
Static Public Attributes | |
| static const ScreenBox | EMPTY |
Anonymous screen rectangular bounding box.
The bounding box is defined by two coordinates (type Vertex2D) that span a (in coordinate space) rectangular area.
|
default |
The default constructor creates an invalid instance.
Referenced by Intersects(), Intersects(), Merge(), operator=(), operator=(), operator==(), Resize(), ScreenBox(), and ScreenBox().
|
default |
Copy-Constructor.
References ScreenBox().
|
default |
Move-Constructor.
References ScreenBox().
Initialize the GeoBox based on the given coordinates.
The two Coordinates together span a rectangular (in coordinates, not on the sphere) area.
|
inlinenodiscard |
Returns the center coordinates of the box.
Referenced by osmscout::MapPainterAgg::DrawSymbol(), and osmscout::SymbolRenderer::Render().
|
inlinenodiscard |
Returns the height of the bounding box (maxLat-minLat).
Referenced by osmscout::MapPainterCairo::DrawContourSymbol(), GetSize(), osmscout::IsAreaRingVisible(), osmscout::MapPainter::IsVisibleArea(), and Resize().
|
inlinenodiscard |
Referenced by Intersects().
|
inlinenodiscard |
Referenced by Intersects().
|
inlinenodiscard |
Referenced by Intersects().
|
inlinenodiscard |
Referenced by Intersects().
|
inlinenodiscard |
Returns the size of the screen box (width*height).
References GetHeight(), and GetWidth().
Referenced by IsEmpty().
|
inlinenodiscard |
Returns the width of the bounding box (maxLon-minLon).
Referenced by osmscout::MapPainterCairo::DrawContourSymbol(), GetSize(), osmscout::IsAreaRingVisible(), osmscout::MapPainter::IsVisibleArea(), and Resize().
|
nodiscard |
References Intersects(), and ScreenBox().
Referenced by Intersects(), osmscout::IsAreaRingVisible(), osmscout::MapPainter::IsVisibleArea(), and osmscout::MapPainter::IsVisibleWay().
|
nodiscard |
References GetMaxX(), GetMaxY(), GetMinX(), GetMinY(), and ScreenBox().
|
inlinenodiscard |
References osmscout::Vertex2D::GetX(), osmscout::Vertex2D::GetY(), and ScreenBox().
Assign the value of other.
References ScreenBox().
Move assignment operator.
References operator==(), and ScreenBox().
| bool osmscout::ScreenBox::operator== | ( | const ScreenBox & | other | ) | const |
|
nodiscard |
Resize the rectangle in all dimension using the given amount.
If offset is >=0 the resulting area will be bigger, else smaller.
If the reduction (negative offset) is bigger than width/2 or height/2, resulted screen box will have zero size (will be empty).
The size delta will be 2*offset in width and in height!
| offset | the amount to change the coordinates. |
References GetHeight(), GetWidth(), and ScreenBox().
Referenced by osmscout::IsAreaRingVisible(), osmscout::MapPainter::IsVisibleArea(), and osmscout::MapPainter::IsVisibleWay().
|
static |