Browse Source

Add CANVAS demo

Rob Loach 1 year ago
parent
commit
0cbc6f43aa
1 changed files with 10 additions and 1 deletions
  1. 10 1
      demo/xcb_cairo/main.c

+ 10 - 1
demo/xcb_cairo/main.c

@@ -37,17 +37,20 @@ static void die(const char *fmt, ...)
  * ===============================================================*/
  * ===============================================================*/
 /* This are some code examples to provide a small overview of what can be
 /* This are some code examples to provide a small overview of what can be
  * done with this library. To try out an example uncomment the defines */
  * done with this library. To try out an example uncomment the defines */
-/*#define INCLUDE_ALL*/
+
+/*#define INCLUDE_ALL */
 #define INCLUDE_STYLE
 #define INCLUDE_STYLE
 /*#define INCLUDE_CALCULATOR */
 /*#define INCLUDE_CALCULATOR */
 #define INCLUDE_OVERVIEW
 #define INCLUDE_OVERVIEW
 /*#define INCLUDE_NODE_EDITOR */
 /*#define INCLUDE_NODE_EDITOR */
+/*#define INCLUDE_CANVAS */
 
 
 #ifdef INCLUDE_ALL
 #ifdef INCLUDE_ALL
   #define INCLUDE_STYLE
   #define INCLUDE_STYLE
   #define INCLUDE_CALCULATOR
   #define INCLUDE_CALCULATOR
   #define INCLUDE_OVERVIEW
   #define INCLUDE_OVERVIEW
   #define INCLUDE_NODE_EDITOR
   #define INCLUDE_NODE_EDITOR
+  #define INCLUDE_CANVAS
 #endif
 #endif
 
 
 #ifdef INCLUDE_STYLE
 #ifdef INCLUDE_STYLE
@@ -62,6 +65,9 @@ static void die(const char *fmt, ...)
 #ifdef INCLUDE_NODE_EDITOR
 #ifdef INCLUDE_NODE_EDITOR
   #include "../common/node_editor.c"
   #include "../common/node_editor.c"
 #endif
 #endif
+#ifdef INCLUDE_CANVAS
+  #include "../common/canvas.c"
+#endif
 
 
 /* ===============================================================
 /* ===============================================================
  *
  *
@@ -142,6 +148,9 @@ main(void)
         #ifdef INCLUDE_NODE_EDITOR
         #ifdef INCLUDE_NODE_EDITOR
         node_editor(ctx);
         node_editor(ctx);
         #endif
         #endif
+        #ifdef INCLUDE_CANVAS
+        canvas(ctx);
+        #endif
         /* ----------------------------------------- */
         /* ----------------------------------------- */
 
 
         /* Render */
         /* Render */