LuciadCPillar 2025.0.12
Loading...
Searching...
No Matches
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.
 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.
static RelativePosition east (double offset)
 Returns a RelativePosition located to the east of the anchor point with the given offset.
static RelativePosition north (double offset)
 Returns a RelativePosition located to the north of the anchor point with the given offset.
static RelativePosition northEast (double offsetNorth, double offsetEast)
 Returns a RelativePosition located to the north-east of the anchor point with the given offsets.
static RelativePosition northWest (double offsetNorth, double offsetWest)
 Returns a RelativePosition located to the north-west of the anchor point with the given offsets.
static RelativePosition south (double offset)
 Returns a RelativePosition located to the south of the anchor point with the given offset.
static RelativePosition southEast (double offsetSouth, double offsetEast)
 Returns a RelativePosition located to the south-east of the anchor point with the given offsets.
static RelativePosition southWest (double offsetSouth, double offsetWest)
 Returns a RelativePosition located to the south-west of the anchor point with the given offsets.
static RelativePosition west (double offset)
 Returns a RelativePosition located to the west of the anchor point with the given offset.

Public Attributes

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

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()

RelativePosition luciad::RelativePosition::center ( )
static

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

◆ east()

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()

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()

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()

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()

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()

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()

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()

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.