Browse Source

[README] fix quick example

rexim 2 years ago
parent
commit
8ae22c72d9
2 changed files with 2 additions and 3 deletions
  1. 1 3
      README.md
  2. 1 0
      olive.c

+ 1 - 3
README.md

@@ -16,8 +16,6 @@ Olive.c is a classical [stb-style](https://github.com/nothings/stb) single heade
 
 
 ## Quick Example (Flag of Japan)
 ## Quick Example (Flag of Japan)
 
 
-<!-- TODO: get rid of the dependency on stb_image_write.h in here and replace it with PPM format -->
-
 *This example also uses [stb_image_write.h](https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h) to create the PNG image*
 *This example also uses [stb_image_write.h](https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h) to create the PNG image*
 
 
 ```c
 ```c
@@ -35,7 +33,7 @@ uint32_t pixels[WIDTH*HEIGHT];
 
 
 int main(void)
 int main(void)
 {
 {
-    Olivec_Canvas oc = olivec_canvas(pixels, WIDTH, HEIGHT);
+    Olivec_Canvas oc = olivec_canvas(pixels, WIDTH, HEIGHT, WIDTH);
     // Taken from https://upload.wikimedia.org/wikipedia/en/9/9e/Flag_of_Japan.svg
     // Taken from https://upload.wikimedia.org/wikipedia/en/9/9e/Flag_of_Japan.svg
     olivec_fill(oc, 0xFFFFFFFF);
     olivec_fill(oc, 0xFFFFFFFF);
     olivec_circle(oc, WIDTH/2, HEIGHT/2, 180, 0xFF2D00BC);
     olivec_circle(oc, WIDTH/2, HEIGHT/2, 180, 0xFF2D00BC);

+ 1 - 0
olive.c

@@ -91,6 +91,7 @@ static char default_font_glyphs[128][DEFAULT_FONT_HEIGHT][DEFAULT_FONT_WIDTH] =
         {0, 0, 1, 0, 0},
         {0, 0, 1, 0, 0},
         {0, 0, 1, 0, 0},
         {0, 0, 1, 0, 0},
     },
     },
+    // TODO: this is -Wgnu-empty-initializer, get rid of all extensions with -pedantic
     ['j'] = {},
     ['j'] = {},
     ['k'] = {
     ['k'] = {
         {0, 1, 0, 0, 0},
         {0, 1, 0, 0, 0},