uicore::Rectf Class Reference

2D (left,top,right,bottom) rectangle structure - Float More...

#include <rect.h>

+ Inheritance diagram for uicore::Rectf:

Public Member Functions

 Rectf ()
 
 Rectf (const Sizex< int > &s)
 
 Rectf (const Sizex< float > &s)
 
 Rectf (float new_left, float new_top, float new_right, float new_bottom)
 
 Rectf (const Pointx< float > &p, const Sizex< float > &size)
 
 Rectf (const Rectx< int > &rect)
 
 Rectf (const Rectx< float > &rect)
 
 Rectf (const Rectx< double > &rect)
 
 Rectf (float new_left, float new_top, const Sizex< float > &size)
 
- Public Member Functions inherited from uicore::Rectx< float >
 Rectx ()
 Constructs an rectangle. More...
 
 Rectx (const Sizex< float > &s)
 Constructs an rectangle. More...
 
 Rectx (float new_left, float new_top, float new_right, float new_bottom)
 Constructs an rectangle. More...
 
 Rectx (const Pointx< float > &p, const Sizex< float > &size)
 Constructs an rectangle. More...
 
 Rectx (float new_left, float new_top, const Sizex< float > &size)
 Constructs an rectangle. More...
 
 Rectx (const Rectx< int > &rect)
 Constructs an rectangle. More...
 
 Rectx (const Rectx< float > &rect)
 Constructs an rectangle. More...
 
 Rectx (const Rectx< double > &rect)
 Constructs an rectangle. More...
 
Rectx< float > & apply_alignment (Origin origin, float x, float y)
 Applies an origin and offset pair to this rectangle. More...
 
Pointx< float > bottom_left () const
 Returns the bottom-left point outside the rectangle. More...
 
Pointx< float > bottom_right () const
 Returns the bottom-right point outside the rectangle. More...
 
Rectx< float > & bounding_rect (const Rectx< float > &rect)
 Calculates the bounding rectangle of the rectangles. More...
 
Pointx< float > center () const
 Returns the center point of the rectangle. More...
 
Rectx< float > & clip (const Rectx< float > &cr)
 Clip according to the specified clip rectangle. More...
 
bool contains (const Vec2< float > &p) const
 Returns true if the rectangle contains the point. More...
 
Rectx< float > & expand (const float &expand_left, const float &expand_top, const float &expand_right, const float &expand_bottom)
 Expand the rectangle. More...
 
Rectx< float > & expand (const float &left_and_right, const float &top_and_bottom)
 Expand the rectangle. More...
 
Rectx< float > & expand (const float &expand)
 Expand the rectangle. More...
 
float height () const
 Returns the height of the rectangle. More...
 
bool is_inside (const Rectx< float > &r) const
 Returns true if rectangle passed is inside this rectangle. More...
 
bool is_overlapped (const Rectx< float > &r) const
 Returns true if rectangle passed is overlapping or inside this rectangle. More...
 
Rectx< float > & normalize ()
 Normalize rectangle. More...
 
bool operator!= (const Rectx< float > &r) const
 Rect != Rect operator. More...
 
Rectx< float > operator* (const float &s) const
 Rect * operator. More...
 
Rectx< float > & operator*= (const float &s)
 Rect *= operator. More...
 
bool operator== (const Rectx< float > &r) const
 Rect == Rect operator. More...
 
Rectx< float > & overlap (const Rectx< float > &rect)
 Calculates the intersection of two rectangles. More...
 
Pointx< float > position () const
 Returns the position of the rectangle. More...
 
Rectx< float > rot_bounds (const Vec2< float > &hotspot, float angle) const
 Returns another Rectx<Type> containing a rotated version of this one. More...
 
Rectx< float > rot_bounds (Origin origin, float x, float y, float angle) const
 Returns another Rectx<Type> containing a rotated version of this one. More...
 
Rectx< float > & set_height (float height)
 Sets the height of the rectangle. More...
 
Rectx< float > & set_position (const Vec2< float > &p)
 Sets the position of the rectangle. More...
 
Rectx< float > & set_size (const Sizex< float > &size)
 Sets the size of the rectangle, maintaining top/left position. More...
 
Rectx< float > & set_width (float width)
 Sets the width of the rectangle. More...
 
Rectx< float > & shrink (const float &new_left, const float &new_top, const float &new_right, const float &new_bottom)
 Shrink the rectangle. More...
 
Rectx< float > & shrink (const float &left_right, const float &top_bottom)
 Shrink the rectangle. More...
 
Rectx< float > & shrink (const float &shrink)
 Shrink the rectangle. More...
 
Sizex< float > size () const
 Returns the size of the rectangle. More...
 
Pointx< float > top_left () const
 Returns the top-left point inside the rectangle. More...
 
Pointx< float > top_right () const
 Returns the top-right point outside the rectangle. More...
 
Rectx< float > & translate (const Vec2< float > &p)
 Translate the rect. More...
 
Rectx< float > & translate (const Sizex< float > &p)
 Translate the rect. More...
 
Rectx< float > & translate (const Rectx< float > &p)
 Translate the rect by another rect (only uses the left and top coords). More...
 
Rectx< float > & translate (float x, float y)
 Translate the rect. More...
 
float width () const
 Returns the width of the rectangle. More...
 
float x () const
 X position of rectangle. More...
 
float y () const
 Y position of rectangle. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from uicore::Rectx< float >
static Rectx< float > ltrb (float left, float top, float right, float bottom)
 
static Rectx< float > wh (float width, float height)
 
static Rectx< float > wh (const Sizex< float > &size)
 
static Rectx< float > xywh (float x, float y, float width, float height)
 
static Rectx< float > xywh (const Pointx< float > &pos, const Sizex< float > &size)
 
- Public Attributes inherited from uicore::Rectx< float >
float bottom
 Y2-coordinate (point outside the rectange) More...
 
float left
 X1-coordinate (left point inside the rectangle) More...
 
float right
 X2-coordinate (point outside the rectangle) More...
 
float top
 Y1-coordinate (top point inside the rectangle) More...
 

Detailed Description

2D (left,top,right,bottom) rectangle structure - Float

Constructor & Destructor Documentation

uicore::Rectf::Rectf ( )
inline
uicore::Rectf::Rectf ( const Sizex< int > &  s)
inline
uicore::Rectf::Rectf ( const Sizex< float > &  s)
inline
uicore::Rectf::Rectf ( float  new_left,
float  new_top,
float  new_right,
float  new_bottom 
)
inline
uicore::Rectf::Rectf ( const Pointx< float > &  p,
const Sizex< float > &  size 
)
inline
uicore::Rectf::Rectf ( const Rectx< int > &  rect)
inline
uicore::Rectf::Rectf ( const Rectx< float > &  rect)
inline
uicore::Rectf::Rectf ( const Rectx< double > &  rect)
inline
uicore::Rectf::Rectf ( float  new_left,
float  new_top,
const Sizex< float > &  size 
)
inline

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