TGUI  0.8-alpha
tgui::FloatRect Class Reference
Inheritance diagram for tgui::FloatRect:

Public Member Functions

 FloatRect ()=default
 Default constructor.
 
 FloatRect (sf::FloatRect rect)
 Constructs the rectangle from an sf::FloatRect. More...
 
 FloatRect (float rectLeft, float rectTop, float rectWidth, float rectHeight)
 Constructs the rectangle from its position and size. More...
 
 FloatRect (Vector2f position, Vector2f size)
 Constructs the rectangle from its position and size. More...
 
void setPosition (Vector2f position)
 Sets the position of the rectangle. More...
 
Vector2f getPosition () const
 Returns the position of the rectangle. More...
 
void setSize (Vector2f size)
 Sets the size of the rectangle. More...
 
Vector2f getSize () const
 Returns the size of the rectangle. More...
 

Constructor & Destructor Documentation

◆ FloatRect() [1/3]

tgui::FloatRect::FloatRect ( sf::FloatRect  rect)
inline

Constructs the rectangle from an sf::FloatRect.

Parameters
rectRectangle to initialize

◆ FloatRect() [2/3]

tgui::FloatRect::FloatRect ( float  rectLeft,
float  rectTop,
float  rectWidth,
float  rectHeight 
)
inline

Constructs the rectangle from its position and size.

Parameters
rectLeftLeft coordinate of the rectangle
rectTopTop coordinate of the rectangle
rectWidthWidth of the rectangle
rectHeightHeight of the rectangle

◆ FloatRect() [3/3]

tgui::FloatRect::FloatRect ( Vector2f  position,
Vector2f  size 
)
inline

Constructs the rectangle from its position and size.

Parameters
positionPosition of the top-left corner of the rectangle
sizeSize of the rectangle

Member Function Documentation

◆ getPosition()

Vector2f tgui::FloatRect::getPosition ( ) const
inline

Returns the position of the rectangle.

Returns
Rectangle position

◆ getSize()

Vector2f tgui::FloatRect::getSize ( ) const
inline

Returns the size of the rectangle.

Returns
Rectangle size

◆ setPosition()

void tgui::FloatRect::setPosition ( Vector2f  position)
inline

Sets the position of the rectangle.

Parameters
positionNew position for the rectangle

◆ setSize()

void tgui::FloatRect::setSize ( Vector2f  size)
inline

Sets the size of the rectangle.

Parameters
sizeNew size for the rectangle

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