[dia] Fix DiaCairoRenderer::draw_rounded_rect() to use fill color



commit 2132a3c0b0366c1862c5f0c7bd60be47405c0ab3
Author: Hans Breuer <hans breuer org>
Date:   Tue Jun 3 17:02:12 2014 +0200

    Fix DiaCairoRenderer::draw_rounded_rect() to use fill color

 plug-ins/cairo/diacairo-renderer.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/cairo/diacairo-renderer.c b/plug-ins/cairo/diacairo-renderer.c
index be660c7..610d97c 100644
--- a/plug-ins/cairo/diacairo-renderer.c
+++ b/plug-ins/cairo/diacairo-renderer.c
@@ -1083,13 +1083,16 @@ draw_rounded_rect (DiaRenderer *self,
   cairo_new_path (renderer->cr);
   cairo_move_to (renderer->cr, ul_corner->x + radius, ul_corner->y);
   renderer->stroke_pending = TRUE;
+  /* only stroke, no fill gives us the contour */
   DIA_RENDERER_CLASS(parent_class)->draw_rounded_rect(self, 
                                                      ul_corner, lr_corner,
-                                                     NULL, fill, radius);
+                                                     NULL, stroke ? stroke : fill, radius);
   renderer->stroke_pending = FALSE;
   cairo_close_path (renderer->cr);
-  if (fill) /* if a stroke follows preserve the path */
+  if (fill) { /* if a stroke follows preserve the path */
+    cairo_set_source_rgba (renderer->cr, fill->red, fill->green, fill->blue, fill->alpha);
     _dia_cairo_fill (renderer, stroke ? TRUE : FALSE);
+  }
   if (stroke) {
     cairo_set_source_rgba (renderer->cr, stroke->red, stroke->green, stroke->blue, stroke->alpha);
     cairo_stroke (renderer->cr);


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