1 #ifndef RAYLIB_CPP_RECTANGLE_HPP_
2 #define RAYLIB_CPP_RECTANGLE_HPP_
12 #include "./raylib-cpp-utils.hpp"
13 #include "./Vector2.hpp"
21 Rectangle(
float X = 0,
float Y = 0,
float Width = 0,
float Height = 0) {
35 GETTERSETTER(
float,X,x)
36 GETTERSETTER(
float,Y,y)
37 GETTERSETTER(
float,Width,width)
38 GETTERSETTER(
float,Height,height)
51 ::DrawRectangle(
static_cast<int>(x),
static_cast<int>(y),
static_cast<int>(width),
static_cast<int>(height), color);
55 ::DrawRectanglePro(*
this, origin, rotation, color);
60 ::DrawRectangleGradientH(
static_cast<int>(x),
static_cast<int>(y),
static_cast<int>(width),
static_cast<int>(height), color1, color2);
64 ::DrawRectangleGradientH(
static_cast<int>(x),
static_cast<int>(y),
static_cast<int>(width),
static_cast<int>(height), color1, color2);
68 ::DrawRectangleGradientEx(*
this, col1, col2, col3, col4);
72 ::DrawRectangleLines(
static_cast<int>(x),
static_cast<int>(y),
static_cast<int>(width),
static_cast<int>(height), color);
76 ::DrawRectangleLinesEx(*
this, lineThick, color);
80 ::DrawRectangleRounded(*
this, roundness, segments, color);
84 ::DrawRectangleRoundedLines(*
this, roundness, segments, lineThick, color);
89 return ::CheckCollisionRecs(*
this, rec2);
92 return ::GetCollisionRec(*
this, rec2);
95 return ::CheckCollisionPointRec(point, *
this);