Remove merge fail

This commit is contained in:
Mario Hüttel 2019-09-30 22:41:29 +02:00
parent fc0de0aa30
commit c8fda11c5c
1 changed files with 0 additions and 45 deletions

View File

@ -85,51 +85,6 @@ cl_program create_program(char *src, cl_context context)
return program;
}
unsigned int *data_array = NULL;
static gboolean drawing_callback(GtkWidget *widget, cairo_t *cr, gpointer data)
{
struct canvas_buffer *buff = (struct canvas_buffer *)data;
int width;
int height;
GtkStyleContext *style_context;
int x, y;
double color_scale;
style_context = gtk_widget_get_style_context(widget);
width = gtk_widget_get_allocated_width(widget);
height = gtk_widget_get_allocated_height(widget);
cairo_save(cr);
/* Drawing code start */
cairo_scale(cr, 1, -1);
cairo_translate(cr, (double)width/2.0, -(double)height/2.0);
for (x = 0; x < buff->width; x++) {
for (y = 0; y < buff->height; y++) {
cairo_rectangle(cr,
((double)x - (double)(buff->width - 1) / 2),
((double)y - (double)(buff->height - 1) / 2),
1,
1);
if (data_array[y * buff->width + x] == buff->iterations) {
cairo_set_source_rgb (cr, 0, 0, 0);
} else {
color_scale = (double)data_array[y * buff->width + x] / buff->iterations;
cairo_set_source_rgb (cr, (sqrt(1-color_scale)), (color_scale*color_scale), color_scale);
}
cairo_fill(cr);
}
}
/* Drawing code end */
cairo_restore(cr);
return FALSE;
}
static int calculate_mandelbrot(struct canvas_buffer *buff)
{