summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/rects.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/rects.c b/examples/rects.c
new file mode 100644
index 0000000..e78ac69
--- /dev/null
+++ b/examples/rects.c
@@ -0,0 +1,11 @@
+#include <assert.h>
+
+#include "../sponge.h"
+
+void draw_frame(sponge_Texture c) {
+ assert(c.width > 140 + 20);
+ assert(c.height > 70 + 40);
+ sponge_clear(c, 0xFF000000);
+ sponge_draw_rect(c, 80, 70, 80 + 20, 70 + 40, 0xFFFF00FF);
+ sponge_draw_rect(c, 140, 70, 140 + 20, 70 + 40, 0xFFFF00FF);
+}