[dia/cairo-port: 51/53] Sensible name



commit f8dbd900db7633cfd6d20293c559e40f7d0a3196
Author: Zander Brown <zbrown gnome org>
Date:   Thu Dec 27 22:49:09 2018 +0000

    Sensible name

 lib/renderer/diacairo-interactive.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/lib/renderer/diacairo-interactive.c b/lib/renderer/diacairo-interactive.c
index 16c6d103..0c77f751 100644
--- a/lib/renderer/diacairo-interactive.c
+++ b/lib/renderer/diacairo-interactive.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]