raylib-cpp
C++ object-oriented wrapper library for raylib.
Public Member Functions | Protected Member Functions | List of all members
raylib::Rectangle Class Reference

Public Member Functions

 Rectangle (::Rectangle vec)
 
 Rectangle (float X=0, float Y=0, float Width=0, float Height=0)
 
bool CheckCollision (::Rectangle rec2) const
 
bool CheckCollision (::Vector2 point) const
 
Rectangle & Draw (::Color color)
 
Rectangle & Draw (::Vector2 origin, float rotation, ::Color color)
 
Rectangle & DrawGradient (::Color col1, ::Color col2, ::Color col3, ::Color col4)
 
Rectangle & DrawGradientH (::Color color1, ::Color color2)
 
Rectangle & DrawGradientV (::Color color1, ::Color color2)
 
Rectangle & DrawLines (::Color color)
 
Rectangle & DrawLinesEx (int lineThick, ::Color color)
 
Rectangle & DrawRounded (float roundness, int segments, ::Color color)
 
Rectangle & DrawRoundedLines (float roundness, int segments, int lineThick, ::Color color)
 
Rectangle GetCollision (::Rectangle rec2) const
 
float GetHeight () const
 
float GetWidth () const
 
float GetX () const
 
float GetY () const
 
Rectangle & operator= (const ::Rectangle &rect)
 
Rectangle & operator= (const Rectangle &rect)
 
void SetHeight (float value)
 
void SetWidth (float value)
 
void SetX (float value)
 
void SetY (float value)
 

Protected Member Functions

void set (::Rectangle rect)
 

Detailed Description

Definition at line 16 of file Rectangle.hpp.

Constructor & Destructor Documentation

◆ Rectangle() [1/2]

raylib::Rectangle::Rectangle ( ::Rectangle  vec)
inline

Definition at line 18 of file Rectangle.hpp.

References set().

◆ Rectangle() [2/2]

raylib::Rectangle::Rectangle ( float  X = 0,
float  Y = 0,
float  Width = 0,
float  Height = 0 
)
inline

Definition at line 21 of file Rectangle.hpp.

Member Function Documentation

◆ CheckCollision() [1/2]

bool raylib::Rectangle::CheckCollision ( ::Rectangle  rec2) const
inline

Definition at line 86 of file Rectangle.hpp.

◆ CheckCollision() [2/2]

bool raylib::Rectangle::CheckCollision ( ::Vector2  point) const
inline

Definition at line 94 of file Rectangle.hpp.

◆ Draw() [1/2]

Rectangle& raylib::Rectangle::Draw ( ::Color  color)
inline

Definition at line 43 of file Rectangle.hpp.

◆ Draw() [2/2]

Rectangle& raylib::Rectangle::Draw ( ::Vector2  origin,
float  rotation,
::Color  color 
)
inline

Definition at line 47 of file Rectangle.hpp.

◆ DrawGradient()

Rectangle& raylib::Rectangle::DrawGradient ( ::Color  col1,
::Color  col2,
::Color  col3,
::Color  col4 
)
inline

Definition at line 62 of file Rectangle.hpp.

◆ DrawGradientH()

Rectangle& raylib::Rectangle::DrawGradientH ( ::Color  color1,
::Color  color2 
)
inline

Definition at line 57 of file Rectangle.hpp.

◆ DrawGradientV()

Rectangle& raylib::Rectangle::DrawGradientV ( ::Color  color1,
::Color  color2 
)
inline

Definition at line 52 of file Rectangle.hpp.

◆ DrawLines()

Rectangle& raylib::Rectangle::DrawLines ( ::Color  color)
inline

Definition at line 67 of file Rectangle.hpp.

◆ DrawLinesEx()

Rectangle& raylib::Rectangle::DrawLinesEx ( int  lineThick,
::Color  color 
)
inline

Definition at line 71 of file Rectangle.hpp.

◆ DrawRounded()

Rectangle& raylib::Rectangle::DrawRounded ( float  roundness,
int  segments,
::Color  color 
)
inline

Definition at line 76 of file Rectangle.hpp.

◆ DrawRoundedLines()

Rectangle& raylib::Rectangle::DrawRoundedLines ( float  roundness,
int  segments,
int  lineThick,
::Color  color 
)
inline

Definition at line 81 of file Rectangle.hpp.

◆ GetCollision()

Rectangle raylib::Rectangle::GetCollision ( ::Rectangle  rec2) const
inline

Definition at line 90 of file Rectangle.hpp.

◆ GetHeight()

float raylib::Rectangle::GetHeight ( ) const
inline

Definition at line 31 of file Rectangle.hpp.

◆ GetWidth()

float raylib::Rectangle::GetWidth ( ) const
inline

Definition at line 30 of file Rectangle.hpp.

◆ GetX()

float raylib::Rectangle::GetX ( ) const
inline

Definition at line 28 of file Rectangle.hpp.

◆ GetY()

float raylib::Rectangle::GetY ( ) const
inline

Definition at line 29 of file Rectangle.hpp.

◆ operator=() [1/2]

Rectangle& raylib::Rectangle::operator= ( const ::Rectangle &  rect)
inline

Definition at line 33 of file Rectangle.hpp.

References set().

◆ operator=() [2/2]

Rectangle& raylib::Rectangle::operator= ( const Rectangle &  rect)
inline

Definition at line 38 of file Rectangle.hpp.

References set().

◆ set()

void raylib::Rectangle::set ( ::Rectangle  rect)
inlineprotected

Definition at line 99 of file Rectangle.hpp.

Referenced by operator=(), and Rectangle().

◆ SetHeight()

void raylib::Rectangle::SetHeight ( float  value)
inline

Definition at line 31 of file Rectangle.hpp.

◆ SetWidth()

void raylib::Rectangle::SetWidth ( float  value)
inline

Definition at line 30 of file Rectangle.hpp.

◆ SetX()

void raylib::Rectangle::SetX ( float  value)
inline

Definition at line 28 of file Rectangle.hpp.

◆ SetY()

void raylib::Rectangle::SetY ( float  value)
inline

Definition at line 29 of file Rectangle.hpp.