return xr;
}
+/* Destroy XR, which should have been created with xr_driver_create(). Any
+ cairo_t added to XR is not destroyed, because it is owned by the client. */
+void
+xr_driver_destroy (struct xr_driver *xr)
+{
+ if (xr != NULL)
+ {
+ xr->cairo = NULL;
+ output_driver_destroy (&xr->driver);
+ }
+}
+
static struct xr_rendering *
xr_rendering_create_text (struct xr_driver *xr, const char *text, cairo_t *cr)
{
}
}
+/* Draws onto CR at least the region of R that is enclosed in (X,Y)-(X+W,Y+H),
+ and possibly some additional parts. */
void
-xr_rendering_draw (struct xr_rendering *r, cairo_t *cr)
+xr_rendering_draw (struct xr_rendering *r, cairo_t *cr,
+ int x, int y, int w, int h)
{
if (r->chart == NULL)
{
xr_set_cairo (xr, cr);
xr->y = 0;
- render_page_draw (r->page);
+ render_page_draw_region (r->page,
+ x * 1024, y * 1024, w * 1024, h * 1024);
}
else
xr_draw_chart (r->chart, cr, 0, 0, CHART_WIDTH, CHART_HEIGHT);