libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
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. More...
 
 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

◆ ScreenPixelRectangle() [2/2]

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

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, width, x, and y.

Member Data Documentation

◆ height

int osmscout::ScreenPixelRectangle::height

◆ width

◆ x

int osmscout::ScreenPixelRectangle::x

◆ y

int osmscout::ScreenPixelRectangle::y

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