aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-11-22 23:00:45 +0100
committerThomas White <taw@bitwiz.org.uk>2014-11-22 23:00:45 +0100
commit05d8853ad8da359b12102f448ed16d936d39439d (patch)
treeb8bc9035edb6c55e2db8e6553ca1fd9920e53996 /tests
parentaef9ff30bf35c60dc757212f98cb4122a089b867 (diff)
Top frame belongs to SCBlock
Diffstat (limited to 'tests')
-rw-r--r--tests/render_test.c22
-rw-r--r--tests/render_test_sc1.c38
2 files changed, 2 insertions, 58 deletions
diff --git a/tests/render_test.c b/tests/render_test.c
index 456a6e1..62bab25 100644
--- a/tests/render_test.c
+++ b/tests/render_test.c
@@ -51,31 +51,11 @@ 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;
-
- 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);
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);