diff options
author | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-16 01:21:27 +0100 |
---|---|---|
committer | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-16 01:21:27 +0100 |
commit | c4b5e0a48835b6bdbf4d3d92fd42b29a22662ed4 (patch) | |
tree | 807f2c1ac0010ce91f5560d6bf852ecca45a221a /src/render.h | |
parent | 9d46c7e44b0c8e0625894dbb688e9b2804d83c9d (diff) |
Mandelbrot drawing possible
Diffstat (limited to 'src/render.h')
-rw-r--r-- | src/render.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/render.h b/src/render.h new file mode 100644 index 0000000..d9850fd --- /dev/null +++ b/src/render.h @@ -0,0 +1,45 @@ +/* + * render.h + * + * Created on: 15.01.2018 + * Author: Superleo1810 + */ + +#ifndef RENDER_H_ +#define RENDER_H_ + +#include <gtk/gtk.h> +#include "defs.h" + +typedef struct config { + u32 iterations; + u32 colorFrom; + u32 colorTo; + bool video; + u8 filetype; + u16 width; + u16 height; + u8 renderFPS; + u8 videoFPS; + u32 bitrate; + const char *path; + // TODO: key mapping als option in die struct +} Config; + +typedef struct Ui_render { + GtkWindow *window; + GtkFrame *frame; + GtkDrawingArea *drawing_area; +} Ui_render; + +Config *_config; +Ui_render ui_render; +u32 (*_sfunc) (double, double, u32); + +void render_init(Config *config, u32 (*sfunc) (double, double, u32)); +void render_show(); +cairo_surface_t *render_surface(); + +void on_draw(GtkWidget *widget, cairo_t *cr, gpointer data); + +#endif /* RENDER_H_ */ |