From 05d8853ad8da359b12102f448ed16d936d39439d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 22 Nov 2014 23:00:45 +0100 Subject: Top frame belongs to SCBlock --- tests/render_test_sc1.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) (limited to 'tests/render_test_sc1.c') diff --git a/tests/render_test_sc1.c b/tests/render_test_sc1.c index b1acbad..cf297e9 100644 --- a/tests/render_test_sc1.c +++ b/tests/render_test_sc1.c @@ -45,52 +45,16 @@ static gint mw_destroy(GtkWidget *w, void *p) } -static void unset_all_frames(SCBlock *bl) -{ - while ( bl != NULL ) { - sc_block_set_frame(bl, NULL); - if ( sc_block_child(bl) != NULL ) { - unset_all_frames(sc_block_child(bl)); - } - if ( sc_block_macro_child(bl) != NULL ) { - unset_all_frames(sc_block_macro_child(bl)); - } - bl = sc_block_next(bl); - } -} - - static gboolean draw_sig(GtkWidget *da, cairo_t *cr, gpointer data) { gint w, h; cairo_surface_t *surface; SCBlock *scblocks = data; - struct frame top; w = gtk_widget_get_allocated_width(da); h = gtk_widget_get_allocated_height(da); - top.pad_l = 20.0; - top.pad_r = 20.0; - top.pad_t = 20.0; - top.pad_b = 20.0; - top.w = w; - top.h = h; - top.grad = GRAD_NONE; - top.bgcol[0] = 1.0; - top.bgcol[1] = 1.0; - top.bgcol[2] = 0.6; - top.bgcol[3] = 1.0; - - top.lines = NULL; - top.n_lines = 0; - top.children = NULL; - top.num_children = 0; - top.max_children = 0; - top.boxes = NULL; - unset_all_frames(scblocks); - - surface = render_sc(scblocks, w, h, w, h, &top, NULL, NULL, + surface = render_sc(scblocks, w, h, w, h, NULL, NULL, ISZ_EDITOR, 1); cairo_rectangle(cr, 0.0, 0.0, w, h); cairo_set_source_surface(cr, surface, 0.0, 0.0); -- cgit v1.2.3