src/2d.c

changeset 250
d766b4f033d7
parent 244
ceab8a9f0366
child 251
2e2d4c3bf1cd
--- a/src/2d.c	Mon Aug 04 23:19:06 2025 +0200
+++ b/src/2d.c	Tue Aug 05 16:45:14 2025 +0200
@@ -128,19 +128,10 @@
 AscSceneNode *asc_rectangle_create(struct asc_rectangle_create_args args) {
     AscRectangle *rectangle = cxZallocDefault(sizeof(AscRectangle));
 
-    float pos_x, pos_y;
-    if (args.bounds.size.width + args.bounds.size.height > 0) {
-        // TODO: this is probably bugged, because it does not respect the origin
-        pos_x = (float) args.bounds.pos.x;
-        pos_y = (float) args.bounds.pos.y;
-        rectangle->size.width = (float) args.bounds.size.width;
-        rectangle->size.height = (float) args.bounds.size.height;
-    } else {
-        pos_x = (float) args.x;
-        pos_y = (float) args.y;
-        rectangle->size.width = (float) args.width;
-        rectangle->size.height = (float) args.height;
-    }
+    float pos_x = (float) args.x;
+    float pos_y = (float) args.y;
+    rectangle->size.width = (float) args.width;
+    rectangle->size.height = (float) args.height;
 
     rectangle->radius = (float)args.radius;
     rectangle->filled = args.filled;

mercurial