diff options
Diffstat (limited to 'src/graphics/Rectangle.cpp')
-rw-r--r-- | src/graphics/Rectangle.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/graphics/Rectangle.cpp b/src/graphics/Rectangle.cpp index 17060c7..f6961f7 100644 --- a/src/graphics/Rectangle.cpp +++ b/src/graphics/Rectangle.cpp @@ -19,6 +19,14 @@ namespace mgl { rectangle.color = { color.r, color.g, color.b, color.a }; } + vec2f Rectangle::get_position() const { + return { rectangle.position.x, rectangle.position.y }; + } + + void Rectangle::set_size(vec2f size) { + rectangle.size = { size.x, size.y }; + } + void Rectangle::draw(Window&) { mgl_rectangle_draw(mgl_get_context(), &rectangle); } |