clan::Rectd Class Reference - ClanLib SDK
Description: clan::Rectd Class Reference

Public Member Functions | List of all members
clan::Rectd Class Reference
clanCore Math

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

`#include <rect.h>`

Inheritance diagram for clan::Rectd:

## Public Member Functions
| Rectd ()
| Rectd (const Pointx< double > &p, const Sizex< double > &size)
| Rectd (const Rectx< double > &rect)
| Rectd (const Rectx< float > &rect)
| Rectd (const Rectx< int > &rect)
| Rectd (const Sizex< double > &s)
| Rectd (const Sizex< float > &s)
| Rectd (const Sizex< int > &s)
| Rectd (double new_left, double new_top, const Sizex< double > &size)
| Rectd (double new_left, double new_top, double new_right, double new_bottom)
Public Member Functions inherited from clan::Rectx< double >
| Rectx ()
| Constructs an rectangle.
Rectx< double > & | apply_alignment (Origin origin, double x, double y)
| Applies an origin and offset pair to this rectangle.
Rectx< double > & | bounding_rect (const Rectx< double > &rect)
| Calculates the bounding rectangle of the rectangles.
Rectx< double > & | clip (const Rectx< double > &cr)
| Clip according to the specified clip rectangle.
bool | contains (const Vec2< double > &p) const
| Returns true if the rectangle contains the point.
Rectx< double > & | expand (const double &expand_left, const double &expand_top, const double &expand_right, const double &expand_bottom)
| Expand the rectangle.
Pointx< double > | get_bottom_left () const
| Returns the bottom-left point outside the rectangle.
Pointx< double > | get_bottom_right () const
| Returns the bottom-right point outside the rectangle.
Pointx< double > | get_center () const
| Returns the center point of the rectangle.
double | get_height () const
| Returns the height of the rectangle.
Rectx< double > | get_rot_bounds (const Vec2< double > &hotspot, const Angle &angle) const
| Returns another Rectx<Type> containing a rotated version of this one.
Sizex< double > | get_size () const
| Returns the size of the rectangle.
Pointx< double > | get_top_left () const
| Returns the top-left point inside the rectangle.
Pointx< double > | get_top_right () const
| Returns the top-right point outside the rectangle.
double | get_width () const
| Returns the width of the rectangle.
bool | is_inside (const Rectx< double > &r) const
| Returns true if rectangle passed is inside this rectangle.
bool | is_overlapped (const Rectx< double > &r) const
| Returns true if rectangle passed is overlapping or inside this rectangle.
Rectx< double > & | normalize ()
| Normalize rectangle.
bool | operator!= (const Rectx< double > &r) const
| Rect != Rect operator.
Rectx< double > | operator* (const double &s) const
| Rect * operator.
Rectx< double > & | operator*= (const double &s)
| Rect *= operator.
bool | operator== (const Rectx< double > &r) const
| Rect == Rect operator.
Rectx< double > & | overlap (const Rectx< double > &rect)
| Calculates the intersection of two rectangles.
Rectx< double > & | set_bottom_right (const Vec2< double > &p)
| Sets the bottom-right point of the rectangle.
Rectx< double > & | set_height (double height)
| Sets the height of the rectangle.
Rectx< double > & | set_size (const Sizex< double > &size)
| Sets the size of the rectangle, maintaining top/left position.
Rectx< double > & | set_top_left (const Vec2< double > &p)
| Sets the top-left point of the rectangle.
Rectx< double > & | set_width (double width)
| Sets the width of the rectangle.
Rectx< double > & | shrink (const double &new_left, const double &new_top, const double &new_right, const double &new_bottom)
| Shrink the rectangle.
Rectx< double > & | translate (const Vec2< double > &p)
| Translate the rect.

## Additional Inherited Members
Static Public Member Functions inherited from clan::Rectx< double >
static Rectx< double > | ltrb (double left, double top, double right, double bottom)
static Rectx< double > | xywh (double x, double y, double width, double height)
Public Attributes inherited from clan::Rectx< double >
double | bottom
| Y2-coordinate (point outside the rectange)
double | left
| X1-coordinate (left point inside the rectangle)
double | right
| X2-coordinate (point outside the rectangle)
double | top
| Y1-coordinate (top point inside the rectangle)

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ Rectd() [1/10]

clan::Rectd::Rectd | ( |  | ) |
| inline

References clan::Rectx< double >::Rectx().

## ◆ Rectd() [2/10]

clan::Rectd::Rectd | ( | const Sizex< int > & | s | ) |
| inline

References clan::Rectx< double >::Rectx(), and clan::s.

## ◆ Rectd() [3/10]

clan::Rectd::Rectd | ( | const Sizex< float > & | s | ) |
| inline

References clan::Rectx< double >::Rectx(), and clan::s.

## ◆ Rectd() [4/10]

clan::Rectd::Rectd | ( | const Sizex< double > & | s | ) |
| inline

References clan::Rectx< double >::Rectx(), and clan::s.

## ◆ Rectd() [5/10]

clan::Rectd::Rectd | ( | double | new_left,
|  | double | new_top,
|  | double | new_right,
|  | double | new_bottom )
| inline

References clan::Rectx< double >::Rectx().

## ◆ Rectd() [6/10]

clan::Rectd::Rectd | ( | const Pointx< double > & | p,
|  | const Sizex< double > & | size )
| inline

References clan::Rectx< double >::Rectx(), and clan::p.

## ◆ Rectd() [7/10]

clan::Rectd::Rectd | ( | const Rectx< int > & | rect | ) |
| inline

References clan::Rectx< double >::Rectx().

## ◆ Rectd() [8/10]

clan::Rectd::Rectd | ( | const Rectx< float > & | rect | ) |
| inline

References clan::Rectx< double >::Rectx().

## ◆ Rectd() [9/10]

clan::Rectd::Rectd | ( | const Rectx< double > & | rect | ) |
| inline

References clan::Rectx< double >::Rectx().

## ◆ Rectd() [10/10]

clan::Rectd::Rectd | ( | double | new_left,
|  | double | new_top,
|  | const Sizex< double > & | size )
| inline

References clan::Rectx< double >::Rectx().

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

- rect.h