create prototype for creating ellipsis

Mon, 30 Jun 2025 23:59:30 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 30 Jun 2025 23:59:30 +0200
changeset 171
7748713bb604
parent 170
3d6d50a852a9
child 172
8178eee19656

create prototype for creating ellipsis

src/ascension/2d.h file | annotate | diff | comparison | revisions
--- a/src/ascension/2d.h	Fri Jun 27 22:30:17 2025 +0200
+++ b/src/ascension/2d.h	Mon Jun 30 23:59:30 2025 +0200
@@ -57,12 +57,12 @@
      */
     unsigned int thickness;
     /**
-     * Border color to be used when thickness is larger zero and filled is true.
+     * Border color to be used when thickness is larger than zero and filled is true.
      */
     asc_col4i border_color;
     /**
      * If true, the rectangle will be filled with the active color.
-     * If thickness is larger zero, an outline border with that thickness is drawn
+     * If the thickness is larger than zero, an outline border with that thickness is drawn
      * using the border_color.
      */
     bool filled;
@@ -72,5 +72,32 @@
 
 #define asc_rectangle(...) asc_rectangle_create((struct asc_rectangle_create_args) { __VA_ARGS__ })
 
+
+struct asc_ellipse_create_args {
+    asc_vec2i center;
+    int x;
+    int y;
+    unsigned int radius_x;
+    unsigned int radius_y;
+    /**
+     * Border thickness
+     */
+    unsigned int thickness;
+    /**
+     * Border color to be used when thickness is larger than zero and filled is true.
+     */
+    asc_col4i border_color;
+    /**
+     * If true, the ellipsis will be filled with the active color.
+     * If the thickness is larger than zero, an outline border with that thickness is drawn
+     * using the border_color.
+     */
+    bool filled;
+};
+
+AscSceneNode *asc_ellipsis_create(struct asc_ellipsis_create_args args);
+
+#define asc_ellipsis(...) asc_ellipsis_create((struct asc_ellipsis_create_args) { __VA_ARGS__ })
+
 #endif /* ASCENSION_2D_H */
 

mercurial