the function does not run every frame, just on every draw. fixed a few things

This commit is contained in:
luke zeller
2020-04-23 15:22:55 -04:00
parent bf956fa045
commit ea0dd8a141
2 changed files with 4 additions and 0 deletions

BIN
program

Binary file not shown.

View File

@@ -64,6 +64,7 @@ static void do_drawing(cairo_t *);
static void draw_pixel(cairo_t *cr, int x, int y, int size) static void draw_pixel(cairo_t *cr, int x, int y, int size)
{ {
//set to white //set to white
cairo_set_source_rgb(cr, 1, 1, 1); cairo_set_source_rgb(cr, 1, 1, 1);
@@ -102,6 +103,7 @@ static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr, gpointer user_data
static void do_drawing(cairo_t *cr) static void do_drawing(cairo_t *cr)
{ {
cairo_set_source_rgb(cr, 0, 0, 0); cairo_set_source_rgb(cr, 0, 0, 0);
cairo_paint(cr); cairo_paint(cr);
@@ -138,5 +140,7 @@ int main(int argc, char *argv[])
gtk_main(); gtk_main();
return 0; return 0;
} }