LuciadCPillar 2024.0.08
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
luciad::RelativePosition Struct Referencefinal

Describes a position relative to an anchor, with a rotation, alignment and offset. More...

#include <luciad/drawing/RelativePosition.h>

Public Member Functions

 RelativePosition (Angle rotation, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, double offsetX, double offsetY)
 Creates a new RelativePosition with the given values. More...
 
 RelativePosition (const RelativePosition &other)=default
 
bool operator!= (const RelativePosition &other) const
 
RelativePositionoperator= (const RelativePosition &other)=default
 
bool operator== (const RelativePosition &other) const
 

Static Public Member Functions

static RelativePosition center ()
 Returns a RelativePosition located on the anchor point with no offset. More...
 
static RelativePosition east (double offset)
 Returns a RelativePosition located to the east of the anchor point with the given offset. More...
 
static RelativePosition north (double offset)
 Returns a RelativePosition located to the north of the anchor point with the given offset. More...
 
static RelativePosition northEast (double offsetNorth, double offsetEast)
 Returns a RelativePosition located to the north-east of the anchor point with the given offsets. More...
 
static RelativePosition northWest (double offsetNorth, double offsetWest)
 Returns a RelativePosition located to the north-west of the anchor point with the given offsets. More...
 
static RelativePosition south (double offset)
 Returns a RelativePosition located to the south of the anchor point with the given offset. More...
 
static RelativePosition southEast (double offsetSouth, double offsetEast)
 Returns a RelativePosition located to the south-east of the anchor point with the given offsets. More...
 
static RelativePosition southWest (double offsetSouth, double offsetWest)
 Returns a RelativePosition located to the south-west of the anchor point with the given offsets. More...
 
static RelativePosition west (double offset)
 Returns a RelativePosition located to the west of the anchor point with the given offset. More...
 

Public Attributes

HorizontalAlignment horizontalAlignment = HorizontalAlignment::Center
 the horizontal alignment of this RelativePosition. More...
 
double offsetX = 0
 the horizontal offset, expressed in pixels and relative to the anchor point. More...
 
double offsetY = 0
 the vertical offset, expressed in pixels and relative to the anchor point. More...
 
Angle rotation = 0
 the rotation around the anchor point. More...
 
VerticalAlignment verticalAlignment = VerticalAlignment::Center
 the vertical alignment of this RelativePosition. More...
 

Detailed Description

Describes a position relative to an anchor, with a rotation, alignment and offset.

Constructor & Destructor Documentation

◆ RelativePosition() [1/2]

luciad::RelativePosition::RelativePosition ( const RelativePosition other)
default

◆ RelativePosition() [2/2]

luciad::RelativePosition::RelativePosition ( Angle  rotation,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
double  offsetX,
double  offsetY 
)

Creates a new RelativePosition with the given values.

Parameters
rotationthe rotation around the anchor point.
horizontalAlignmentthe horizontal alignment of this RelativePosition.
verticalAlignmentthe vertical alignment of this RelativePosition.
offsetXthe horizontal offset, expressed in pixels and relative to the anchor point.
offsetYthe vertical offset, expressed in pixels and relative to the anchor point.

Member Function Documentation

◆ center()

static RelativePosition luciad::RelativePosition::center ( )
static

Returns a RelativePosition located on the anchor point with no offset.

◆ east()

static RelativePosition luciad::RelativePosition::east ( double  offset)
static

Returns a RelativePosition located to the east of the anchor point with the given offset.

Parameters
offset: the horizontal offset, expressed in pixels and relative to the anchor point.

◆ north()

static RelativePosition luciad::RelativePosition::north ( double  offset)
static

Returns a RelativePosition located to the north of the anchor point with the given offset.

Parameters
offset: the vertical offset, expressed in pixels and relative to the anchor point.

◆ northEast()

static RelativePosition luciad::RelativePosition::northEast ( double  offsetNorth,
double  offsetEast 
)
static

Returns a RelativePosition located to the north-east of the anchor point with the given offsets.

Parameters
offsetNorth: the vertical offset, expressed in pixels and relative to the anchor point.
offsetEast: the horizontal offset, expressed in pixels and relative to the anchor point.

◆ northWest()

static RelativePosition luciad::RelativePosition::northWest ( double  offsetNorth,
double  offsetWest 
)
static

Returns a RelativePosition located to the north-west of the anchor point with the given offsets.

Parameters
offsetNorth: the vertical offset, expressed in pixels and relative to the anchor point.
offsetWest: the horizontal offset, expressed in pixels and relative to the anchor point.

◆ operator!=()

bool luciad::RelativePosition::operator!= ( const RelativePosition other) const
inline

◆ operator=()

RelativePosition & luciad::RelativePosition::operator= ( const RelativePosition other)
default

◆ operator==()

bool luciad::RelativePosition::operator== ( const RelativePosition other) const
inline

◆ south()

static RelativePosition luciad::RelativePosition::south ( double  offset)
static

Returns a RelativePosition located to the south of the anchor point with the given offset.

Parameters
offset: the vertical offset, expressed in pixels and relative to the anchor point.

◆ southEast()

static RelativePosition luciad::RelativePosition::southEast ( double  offsetSouth,
double  offsetEast 
)
static

Returns a RelativePosition located to the south-east of the anchor point with the given offsets.

Parameters
offsetSouth: the vertical offset, expressed in pixels and relative to the anchor point.
offsetEast: the horizontal offset, expressed in pixels and relative to the anchor point.

◆ southWest()

static RelativePosition luciad::RelativePosition::southWest ( double  offsetSouth,
double  offsetWest 
)
static

Returns a RelativePosition located to the south-west of the anchor point with the given offsets.

Parameters
offsetSouth: the vertical offset, expressed in pixels and relative to the anchor point.
offsetWest: the horizontal offset, expressed in pixels and relative to the anchor point.

◆ west()

static RelativePosition luciad::RelativePosition::west ( double  offset)
static

Returns a RelativePosition located to the west of the anchor point with the given offset.

Parameters
offset: the horizontal offset, expressed in pixels and relative to the anchor point.

Member Data Documentation

◆ horizontalAlignment

HorizontalAlignment luciad::RelativePosition::horizontalAlignment = HorizontalAlignment::Center

the horizontal alignment of this RelativePosition.

◆ offsetX

double luciad::RelativePosition::offsetX = 0

the horizontal offset, expressed in pixels and relative to the anchor point.

◆ offsetY

double luciad::RelativePosition::offsetY = 0

the vertical offset, expressed in pixels and relative to the anchor point.

◆ rotation

Angle luciad::RelativePosition::rotation = 0

the rotation around the anchor point.

◆ verticalAlignment

VerticalAlignment luciad::RelativePosition::verticalAlignment = VerticalAlignment::Center

the vertical alignment of this RelativePosition.