summaryrefslogtreecommitdiff
path: root/test/gtk-cairo-test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gtk-cairo-test.cc')
-rw-r--r--test/gtk-cairo-test.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/gtk-cairo-test.cc b/test/gtk-cairo-test.cc
index 0d086e9d..1187a5eb 100644
--- a/test/gtk-cairo-test.cc
+++ b/test/gtk-cairo-test.cc
@@ -39,7 +39,8 @@ public:
virtual ~GDKCairoOutputDev();
- virtual void GDKCairoOutputDev::createCairo(GfxState *state);
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
//----- special access
@@ -74,14 +75,13 @@ GDKCairoOutputDev::GDKCairoOutputDev(GdkDrawable *drawableA,
redrawCbk = redrawCbkA;
redrawCbkData = redrawCbkDataA;
pixmap = NULL;
- createCairo (NULL);
}
GDKCairoOutputDev::~GDKCairoOutputDev() {
}
void
-GDKCairoOutputDev::createCairo(GfxState *state) {
+GDKCairoOutputDev::startPage(int pageNum, GfxState *state) {
Display *display;
Drawable xid;
GdkGC *gc;
@@ -116,9 +116,11 @@ GDKCairoOutputDev::createCairo(GfxState *state) {
surface = cairo_xlib_surface_create(display, xid,
DefaultVisual(display, DefaultScreen(display)),
w, h);
- cairo = cairo_create (surface);
+ setSurface(surface);
cairo_surface_destroy (surface);
}
+
+ CairoOutputDev::startPage(pageNum, state);
}
void GDKCairoOutputDev::redraw(int srcX, int srcY,