From c4b5e0a48835b6bdbf4d3d92fd42b29a22662ed4 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Tue, 16 Jan 2018 01:21:27 +0100 Subject: Mandelbrot drawing possible --- src/render.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/render.h (limited to 'src/render.h') 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 +#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_ */ -- cgit v1.2.1