diff options
author | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-23 01:23:23 +0100 |
---|---|---|
committer | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-23 01:23:23 +0100 |
commit | e6c241add375353c1c80b0e3915a6505dbd5db9a (patch) | |
tree | d4d840b0aadc075c007fbbeefcb5b18edb52541d /src/mandelbrot-zoom.c | |
parent | f88292eafad9c6443f970ae0b28fa9cd2ae8fb7d (diff) |
Added zoom speed option
Diffstat (limited to 'src/mandelbrot-zoom.c')
-rw-r--r-- | src/mandelbrot-zoom.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mandelbrot-zoom.c b/src/mandelbrot-zoom.c index e208940..9410734 100644 --- a/src/mandelbrot-zoom.c +++ b/src/mandelbrot-zoom.c @@ -23,6 +23,7 @@ int main(int argc, char **argv) ui_settings.colorToBtn = GTK_BUTTON(gtk_builder_get_object(builder, "colorToBtn")); ui_settings.zoomToXEntry = GTK_ENTRY(gtk_builder_get_object(builder, "zoomToXEntry")); ui_settings.zoomToYEntry = GTK_ENTRY(gtk_builder_get_object(builder, "zoomToYEntry")); + ui_settings.speedEntry = GTK_ENTRY(gtk_builder_get_object(builder, "speedEntry")); ui_settings.exportCb = GTK_CHECK_BUTTON(gtk_builder_get_object(builder, "exportCb")); ui_settings.gifRd = GTK_RADIO_BUTTON(gtk_builder_get_object(builder, "gifRd")); ui_settings.widthSp = GTK_SPIN_BUTTON(gtk_builder_get_object(builder, "widthSp")); @@ -138,11 +139,13 @@ void on_bitrateSp_valueChanged() void on_startBtn_clicked() { - double x, y; + double x, y, speed; sscanf(gtk_entry_get_text(ui_settings.zoomToXEntry), "%lf", &x); sscanf(gtk_entry_get_text(ui_settings.zoomToYEntry), "%lf", &y); + sscanf(gtk_entry_get_text(ui_settings.speedEntry), "%lf", &speed); config.to_x = x; config.to_y = y; + config.speed = speed; printf("config {\n\t.iterations = %u\n\t.tox = %f\n\t.toy = %f\n\t.video = %u\n\t.filetype = %u\n\t.width = %u\n\t.height = %u\n\t.renderFPS = %u\n\t.videoFPS = %u\n\t.bitrate = %u\n\t.path = %s\n}\n", config.iterations, x, y, config.video, 0, config.width, config.height, config.renderFPS, config.videoFPS, config.bitrate, config.path); render_init(&config, mandelbrot_r); render_show(); |