TGUI 1.11
Loading...
Searching...
No Matches
tgui::Outline Class Reference

Public Member Functions

constexpr Outline (AbsoluteOrRelativeValue size=0)
 Default constructor that initializes the outline.
template<typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
constexpr Outline (T size)
 Constructor that initializes the outline.
constexpr Outline (AbsoluteOrRelativeValue width, AbsoluteOrRelativeValue height)
 Constructor that initializes the outline.
constexpr Outline (AbsoluteOrRelativeValue leftBorderWidth, AbsoluteOrRelativeValue topBorderHeight, AbsoluteOrRelativeValue rightBorderWidth, AbsoluteOrRelativeValue bottomBorderHeight)
 Constructor that initializes the outline.
constexpr float getLeft () const
 Returnes the width of the left outline.
constexpr float getTop () const
 Returnes the height of the top outline.
constexpr float getRight () const
 Returnes the width of the right outline.
constexpr float getBottom () const
 Returnes the height of the bottom outline.
constexpr Vector2f getOffset () const
 Returnes the width of the left and top outlines.
constexpr float getLeftPlusRight () const
 Returnes the width of the left and right outlines combined.
constexpr float getTopPlusBottom () const
 Returnes the height of the top and bottom outlines combined.
constexpr bool operator== (const Outline &outline) const
 Compares two outlines.
constexpr bool operator!= (const Outline &outline) const
 Compares two outlines.
constexpr Outline operator+ (const Outline &other) const
 Adds two outlines together (e.g. to add padding and borders)
constexpr Outline operator- (const Outline &other) const
 Subtracts two outlines from each other.
constexpr Outlineoperator+= (const Outline &other)
 Adds an outline to this instance (e.g. to add padding and borders)
constexpr Outlineoperator-= (const Outline &other)
 Subtracts an outline from this instance.
constexpr void updateParentSize (Vector2f newParentSize)
String toString () const

Constructor & Destructor Documentation

◆ Outline() [1/4]

tgui::Outline::Outline ( AbsoluteOrRelativeValue size = 0)
inlineconstexpr

Default constructor that initializes the outline.

Parameters
sizeWidth and height of the outline in all directions

◆ Outline() [2/4]

template<typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
tgui::Outline::Outline ( T size)
inlineconstexpr

Constructor that initializes the outline.

Parameters
sizeWidth and height of the outline in all directions

◆ Outline() [3/4]

tgui::Outline::Outline ( AbsoluteOrRelativeValue width,
AbsoluteOrRelativeValue height )
inlineconstexpr

Constructor that initializes the outline.

Parameters
widthWidth of the left and right outline
heightHeight of the top and bottom outline

◆ Outline() [4/4]

tgui::Outline::Outline ( AbsoluteOrRelativeValue leftBorderWidth,
AbsoluteOrRelativeValue topBorderHeight,
AbsoluteOrRelativeValue rightBorderWidth,
AbsoluteOrRelativeValue bottomBorderHeight )
inlineconstexpr

Constructor that initializes the outline.

Parameters
leftBorderWidthWidth of the left outline
topBorderHeightHeight of the top outline
rightBorderWidthWidth of the right outline
bottomBorderHeightHeight of the bottom outline

Member Function Documentation

◆ getBottom()

float tgui::Outline::getBottom ( ) const
inlinenodiscardconstexpr

Returnes the height of the bottom outline.

Returns
Bottom outline height

◆ getLeft()

float tgui::Outline::getLeft ( ) const
inlinenodiscardconstexpr

Returnes the width of the left outline.

Returns
Left outline width

◆ getLeftPlusRight()

float tgui::Outline::getLeftPlusRight ( ) const
inlinenodiscardconstexpr

Returnes the width of the left and right outlines combined.

Returns
Left + right outlines
Since
TGUI 1.11

◆ getOffset()

Vector2f tgui::Outline::getOffset ( ) const
inlinenodiscardconstexpr

Returnes the width of the left and top outlines.

Returns
Left and top outlines

◆ getRight()

float tgui::Outline::getRight ( ) const
inlinenodiscardconstexpr

Returnes the width of the right outline.

Returns
Right outline width

◆ getTop()

float tgui::Outline::getTop ( ) const
inlinenodiscardconstexpr

Returnes the height of the top outline.

Returns
Top outline height

◆ getTopPlusBottom()

float tgui::Outline::getTopPlusBottom ( ) const
inlinenodiscardconstexpr

Returnes the height of the top and bottom outlines combined.

Returns
Top + bottom outlines
Since
TGUI 1.11

◆ operator!=()

bool tgui::Outline::operator!= ( const Outline & outline) const
inlinenodiscardconstexpr

Compares two outlines.

Parameters
outlineThe outline to compare with this instance
Returns
Whether the outlines are equal or not

◆ operator+()

Outline tgui::Outline::operator+ ( const Outline & other) const
inlinenodiscardconstexpr

Adds two outlines together (e.g. to add padding and borders)

Parameters
otherThe outline to add together with this instance

◆ operator+=()

Outline & tgui::Outline::operator+= ( const Outline & other)
inlineconstexpr

Adds an outline to this instance (e.g. to add padding and borders)

Parameters
otherThe outline to add to this instance

◆ operator-()

Outline tgui::Outline::operator- ( const Outline & other) const
inlinenodiscardconstexpr

Subtracts two outlines from each other.

Parameters
otherThe outline to subtract from this instance

◆ operator-=()

Outline & tgui::Outline::operator-= ( const Outline & other)
inlineconstexpr

Subtracts an outline from this instance.

Parameters
otherThe outline to subtract from this instance

◆ operator==()

bool tgui::Outline::operator== ( const Outline & outline) const
inlinenodiscardconstexpr

Compares two outlines.

Parameters
outlineThe outline to compare with this instance
Returns
Whether the outlines are equal or not

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