TGUI  1.7
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

constexpr RelFloatRect ()=default
 Default constructor.
 
constexpr RelFloatRect (AbsoluteOrRelativeValue left, AbsoluteOrRelativeValue top, AbsoluteOrRelativeValue width, AbsoluteOrRelativeValue height)
 Constructs the rectangle from its position and size.
 
constexpr float getLeft () const
 Returns the left position of the rect as an absolute value.
 
constexpr float getTop () const
 Returns the top position of the rect as an absolute value.
 
constexpr float getWidth () const
 Returns the width of the rect as an absolute value.
 
constexpr float getHeight () const
 Returns the height of the rect as an absolute value.
 
constexpr Vector2f getPosition () const
 Returns the size of the rect as an absolute value.
 
constexpr Vector2f getSize () const
 Returns the size of the rect as an absolute value.
 
constexpr FloatRect getRect () const
 Returns the the rectangle as an absolute value.
 
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::RelFloatRect::RelFloatRect ( AbsoluteOrRelativeValue left,
AbsoluteOrRelativeValue top,
AbsoluteOrRelativeValue width,
AbsoluteOrRelativeValue height )
inlineconstexpr

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: