libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::ScreenPixelRectangle Struct Reference

#include <LabelLayouterHelper.h>

Public Member Functions

bool Intersects (const ScreenPixelRectangle &other) const
 Returns true , if the area of the rectangles intersect.
 ScreenPixelRectangle ()=default
 ScreenPixelRectangle (int x, int y, int width, int height)

Public Attributes

int height
int width
int x
int y

Constructor & Destructor Documentation

◆ ScreenPixelRectangle() [1/2]

osmscout::ScreenPixelRectangle::ScreenPixelRectangle ( )
default

Referenced by Intersects().

◆ ScreenPixelRectangle() [2/2]

osmscout::ScreenPixelRectangle::ScreenPixelRectangle ( int x,
int y,
int width,
int height )
inline

References height, width, x, and y.

Member Function Documentation

◆ Intersects()

bool osmscout::ScreenPixelRectangle::Intersects ( const ScreenPixelRectangle & other) const
inline

Returns true , if the area of the rectangles intersect.

The area is defined by area including [x-x+width-1] and [y,y+height-1]. x+width or y+height is outside the rectangle.

Parameters
otherrectangle
Returns
true, if areas intersect, else false

References height, ScreenPixelRectangle(), width, x, and y.

Member Data Documentation

◆ height

◆ width

◆ x

int osmscout::ScreenPixelRectangle::x

◆ y

int osmscout::ScreenPixelRectangle::y

The documentation for this struct was generated from the following file: