TGUI  0.9.5
Loading...
Searching...
No Matches
tgui::RelFloatRect Struct Reference

FloatRect that can contain absolute values or values relative to the parent size. More...

#include <TGUI/RelFloatRect.hpp>

Public Member Functions

TGUI_CONSTEXPR RelFloatRect ()
 Default constructor.
 
TGUI_CONSTEXPR RelFloatRect (AbsoluteOrRelativeValue left, AbsoluteOrRelativeValue top, AbsoluteOrRelativeValue width, AbsoluteOrRelativeValue height)
 Constructs the rectangle from its position and size.
 
TGUI_CONSTEXPR float getLeft () const
 Returns the left position of the rect as an absolute value.
 
TGUI_CONSTEXPR float getTop () const
 Returns the top position of the rect as an absolute value.
 
TGUI_CONSTEXPR float getWidth () const
 Returns the width of the rect as an absolute value.
 
TGUI_CONSTEXPR float getHeight () const
 Returns the height of the rect as an absolute value.
 
TGUI_CONSTEXPR Vector2f getPosition () const
 Returns the size of the rect as an absolute value.
 
TGUI_CONSTEXPR Vector2f getSize () const
 Returns the size of the rect as an absolute value.
 
TGUI_CONSTEXPR FloatRect getRect () const
 Returns the the rectangle as an absolute value.
 
TGUI_CONSTEXPR void updateParentSize (Vector2f newParentSize)
 

Detailed Description

FloatRect that can contain absolute values or values relative to the parent size.

Constructor & Destructor Documentation

◆ RelFloatRect()

TGUI_CONSTEXPR tgui::RelFloatRect::RelFloatRect ( AbsoluteOrRelativeValue  left,
AbsoluteOrRelativeValue  top,
AbsoluteOrRelativeValue  width,
AbsoluteOrRelativeValue  height 
)
inline

Constructs the rectangle from its position and size.

Parameters
leftLeft coordinate of the rectangle
topTop coordinate of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle

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