#include "Rectangle.h" #include "../UserInterface/Primitives.h" Rectangle::Rectangle(double x, double y, double width, double height) : x(x), y(y), width(width), height(height) { } void Rectangle::SetColor(double r, double g, double b, double a) { this->r = r; this->g = g; this->b = b; this->a = a; } void Rectangle::SetBorderColor(double r, double g, double b, double a) { this->br = r; this->bg = g; this->bb = b; this->ba = a; } void Rectangle::SetBorderWidth(double width) { this->bw = width; } void Rectangle::SetRoundness(double roundness) { this->roundness = roundness; } void Rectangle::Render() { UI::Primitives::SubmitRectangle( UI::Rect(static_cast(x), static_cast(y), static_cast(width), static_cast(height)), UI::Color(static_cast(r), static_cast(g), static_cast(b), static_cast(a)), UI::Color(static_cast(br), static_cast(bg), static_cast(bb), static_cast(ba)), static_cast(bw), static_cast(roundness) ); }