some new boxes

This commit is contained in:
Florian Stecker
2019-02-08 13:03:05 +01:00
parent 1ec2a49983
commit 3d8378aa16
3 changed files with 77 additions and 0 deletions

6
main.c
View File

@@ -26,6 +26,7 @@ void setupContext(DrawingContext *ctx)
ctx->k[2] = 2;
ctx->parameter = 3.0;
ctx->show_boxes = 0;
ctx->show_boxes2 = 0;
ctx->show_attractors = 0;
ctx->show_reflectors = 0;
ctx->show_limit= 1;
@@ -89,6 +90,8 @@ void print(DrawingContext *screen)
time_t t = time(NULL);
strftime(filename, sizeof(filename), "screenshot_%Y%m%d_%H%M%S.pdf", localtime(&t));
memcpy(&file, screen, sizeof(file));
dim.width = screen->dim->width;
dim.height = screen->dim->width / sqrt(2.0);
dim.matrix = screen->dim->matrix;
@@ -171,6 +174,9 @@ int processEvent(GraphicsInfo *info, XEvent *ev)
case 'b':
TOGGLE(screen_context->show_boxes);
break;
case 'B':
TOGGLE(screen_context->show_boxes2);
break;
case 'a':
TOGGLE(screen_context->show_attractors);
break;