TGUI  1.7
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 border.
 
constexpr float getTop () const
 Returnes the height of the top border.
 
constexpr float getRight () const
 Returnes the width of the right border.
 
constexpr float getBottom () const
 Returnes the height of the bottom border.
 
constexpr Vector2f getOffset () const
 Returnes the width of the left and top borders.
 
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 border.

Returns
Bottom border height

◆ getLeft()

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

Returnes the width of the left border.

Returns
Left border width

◆ getOffset()

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

Returnes the width of the left and top borders.

Returns
Left and top borders

◆ getRight()

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

Returnes the width of the right border.

Returns
Right border width

◆ getTop()

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

Returnes the height of the top border.

Returns
Top border height

◆ 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: