aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-11-30 09:49:01 +0100
committerThomas White <taw@bitwiz.org.uk>2012-11-30 09:49:01 +0100
commitf6fefa99ea3a9a71d5803931cec403db845f767a (patch)
tree1331f00024cbede9245b993efa9e501dbca42405 /tests
parent1392eda7d12dc4ad6a75c794fcb21e494c12c0aa (diff)
WIP on rendering
Diffstat (limited to 'tests')
-rw-r--r--tests/render_test.c9
-rw-r--r--tests/render_test_sc1.c9
2 files changed, 2 insertions, 16 deletions
diff --git a/tests/render_test.c b/tests/render_test.c
index c800cdb..ab2bfc9 100644
--- a/tests/render_test.c
+++ b/tests/render_test.c
@@ -32,7 +32,6 @@
#include "../src/storycode.h"
#include "../src/render.h"
-#include "../src/layout.h"
#include "../src/stylesheet.h"
#include "../src/frame.h"
@@ -44,8 +43,6 @@ static gint mw_destroy(GtkWidget *w, void *p)
static gboolean draw_sig(GtkWidget *da, cairo_t *cr, struct frame *fr)
{
- PangoContext *pc;
- GtkAllocation allocation;
gint w, h;
w = gtk_widget_get_allocated_width(da);
@@ -56,11 +53,7 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, struct frame *fr)
cairo_set_source_rgb(cr, 0.9, 0.9, 0.9);
cairo_fill(cr);
- pc = gtk_widget_get_pango_context(da);
-
- gtk_widget_get_allocation(da, &allocation);
-
- layout_frame(fr, allocation.width, allocation.height);
+ fr->w = w; fr->h = h;
render_frame(fr, cr);
return FALSE;
diff --git a/tests/render_test_sc1.c b/tests/render_test_sc1.c
index 154a08f..e32674d 100644
--- a/tests/render_test_sc1.c
+++ b/tests/render_test_sc1.c
@@ -33,7 +33,6 @@
#include "../src/storycode.h"
#include "../src/render.h"
-#include "../src/layout.h"
#include "../src/stylesheet.h"
#include "../src/frame.h"
@@ -45,8 +44,6 @@ static gint mw_destroy(GtkWidget *w, void *p)
static gboolean draw_sig(GtkWidget *da, cairo_t *cr, struct frame *fr)
{
- PangoContext *pc;
- GtkAllocation allocation;
gint w, h;
w = gtk_widget_get_allocated_width(da);
@@ -57,11 +54,7 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, struct frame *fr)
cairo_set_source_rgb(cr, 0.9, 0.9, 0.9);
cairo_fill(cr);
- pc = gtk_widget_get_pango_context(da);
-
- gtk_widget_get_allocation(da, &allocation);
-
- layout_frame(fr, allocation.width, allocation.height);
+ fr->w = w; fr->h = h;
render_frame(fr, cr);
return FALSE;