Verified Commit f8dbd900 authored by Zander's avatar Zander 💥

Sensible name

parent 7ef24ee6
......@@ -50,9 +50,9 @@ struct _DiaCairoInteractiveRenderer
Rectangle *visible;
real *zoom_factor;
cairo_surface_t *pixmap; /* The pixmap shown in this display */
guint32 width; /* The width of the pixmap in pixels */
guint32 height; /* The height of the pixmap in pixels */
cairo_surface_t *surface; /* The surface shown in this display */
guint32 width; /* The width of the surface in pixels */
guint32 height; /* The height of the surface in pixels */
cairo_region_t *clip_region;
/* Selection box */
......@@ -139,7 +139,7 @@ cairo_interactive_renderer_init (DiaCairoInteractiveRenderer *object, void *p)
dia_renderer->is_interactive = 1;
renderer->pixmap = NULL;
renderer->surface = NULL;
renderer->highlight_color = NULL;
}
......@@ -153,8 +153,8 @@ cairo_interactive_renderer_finalize (GObject *object)
if (base_renderer->cr)
cairo_destroy (base_renderer->cr);
base_renderer->cr = NULL;
if (renderer->pixmap)
cairo_surface_destroy (renderer->pixmap);
if (renderer->surface)
cairo_surface_destroy (renderer->surface);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
......@@ -351,7 +351,7 @@ begin_render(DiaRenderer *self, const Rectangle *update)
DiaCairoRenderer *base_renderer = DIA_CAIRO_RENDERER (self);
g_return_if_fail (base_renderer->cr == NULL);
base_renderer->cr = cairo_create(renderer->pixmap);
base_renderer->cr = cairo_create (renderer->surface);
/* Setup clipping for this sequence of render operations */
/* Must be done before the scaling because the clip is in pixel coords */
......@@ -480,9 +480,9 @@ set_size(DiaRenderer *object, gpointer window,
renderer->width = width;
renderer->height = height;
renderer->pixmap = gdk_window_create_similar_surface (GDK_WINDOW (window),
CAIRO_CONTENT_COLOR,
width, height);
renderer->surface = gdk_window_create_similar_surface (GDK_WINDOW (window),
CAIRO_CONTENT_COLOR,
width, height);
if (base_renderer->surface != NULL)
cairo_surface_destroy(base_renderer->surface);
......@@ -497,7 +497,7 @@ paint (DiaRenderer *object,
DiaCairoInteractiveRenderer *renderer = DIA_CAIRO_INTERACTIVE_RENDERER (object);
double dashes[1] = {3};
cairo_save (ctx);
cairo_set_source_surface (ctx, renderer->pixmap, 0.0, 0.0);
cairo_set_source_surface (ctx, renderer->surface, 0.0, 0.0);
cairo_rectangle (ctx, 0, 0, width > 0 ? width : -width, height > 0 ? height : -height);
cairo_clip (ctx);
cairo_paint (ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment