summaryrefslogtreecommitdiff
path: root/AnimationObject.c
diff options
context:
space:
mode:
Diffstat (limited to 'AnimationObject.c')
-rw-r--r--AnimationObject.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/AnimationObject.c b/AnimationObject.c
index af3798b..16489c3 100644
--- a/AnimationObject.c
+++ b/AnimationObject.c
@@ -20,7 +20,7 @@ AO_CheckerPattern(const Animation* anim, u32 frameIndex, ARGB pixel, i32 r, i32
ARGB
AO_Square(const Animation* anim, u32 frameIndex, ARGB pixel, i32 r, i32 c, void* priv) {
- struct AO_SquareSettings* set = (struct AO_SquareSettings*)priv;
+ struct AO_Square* set = (struct AO_Square*)priv;
if (0 <= r && r <= set->width && 0 <= c && c <= set->height) {
ARGB_set(&pixel, set->color);
@@ -30,6 +30,17 @@ AO_Square(const Animation* anim, u32 frameIndex, ARGB pixel, i32 r, i32 c, void*
}
ARGB
+AO_Circle(const Animation* anim, u32 frameIndex, ARGB pixel, i32 r, i32 c, void* priv) {
+ struct AO_Circle* cir = (struct AO_Circle*)priv;
+
+ if (r * r + c * c < cir->radius * cir->radius) {
+ ARGB_set(&pixel, cir->color);
+ }
+
+ return pixel;
+}
+
+ARGB
AO_Image(const Animation* anim, u32 frameIndex, ARGB pixel, i32 r, i32 c, void* priv) {
struct AO_Image img = *(struct AO_Image*)priv;