|
libosmscout 0.1
|
Holds a rectangular bit mask. More...
#include <LabelLayouterHelper.h>
Public Member Functions | |
| uint64_t | GetCell (size_t idx) const |
| Return the cells in the interval [GetFirstCell(),GetLastCell()]. | |
| int | GetFirstCell () const |
| Return the index of the initial, left-sided bit mask cell (containing x coordinate of rectangle) | |
| int | GetFirstRow () const |
| Return starting index of row (y-coordinate of rectangle) | |
| int | GetLastCell () const |
| Return the index of the final, right-sided bit mask cell (containing x+width-1 coordinate of rectangle) | |
| int | GetLastRow () const |
| Return final index of row (y+height-1 of rectangle) | |
| bool | Intersects (const ScreenRectMask &other) const |
| ScreenRectMask ()=default | |
| ScreenRectMask (size_t screenWidth, const ScreenPixelRectangle &rect) | |
Holds a rectangular bit mask.
Implementation: Only one row of the mask is stored together with the indexes of the starting and final row
|
default |
| osmscout::ScreenRectMask::ScreenRectMask | ( | size_t | screenWidth, |
| const ScreenPixelRectangle & | rect | ||
| ) |
| uint64_t osmscout::ScreenRectMask::GetCell | ( | size_t | idx | ) | const |
Return the cells in the interval [GetFirstCell(),GetLastCell()].
A cell contains a part of the bitmask of a row of the rectangle.
The lowest bit 0x1 is the first bit in the mask, higher bits represent further bits to the "right" in the mask
| idx | the index |
Referenced by osmscout::ScreenMask::AddMask(), and osmscout::ScreenMask::HasCollision().
|
inline |
Return the index of the initial, left-sided bit mask cell (containing x coordinate of rectangle)
Referenced by osmscout::ScreenMask::AddMask(), and osmscout::ScreenMask::HasCollision().
|
inline |
Return starting index of row (y-coordinate of rectangle)
Referenced by osmscout::ScreenMask::AddMask(), and osmscout::ScreenMask::HasCollision().
|
inline |
Return the index of the final, right-sided bit mask cell (containing x+width-1 coordinate of rectangle)
Referenced by osmscout::ScreenMask::AddMask(), and osmscout::ScreenMask::HasCollision().
|
inline |
Return final index of row (y+height-1 of rectangle)
Referenced by osmscout::ScreenMask::AddMask(), and osmscout::ScreenMask::HasCollision().
| bool osmscout::ScreenRectMask::Intersects | ( | const ScreenRectMask & | other | ) | const |