作図ソフト dia の改良版
修訂 | 2132a3c0b0366c1862c5f0c7bd60be47405c0ab3 (tree) |
---|---|
時間 | 2014-06-08 17:58:26 |
作者 | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
Fix DiaCairoRenderer::draw_rounded_rect() to use fill color
@@ -1083,13 +1083,16 @@ draw_rounded_rect (DiaRenderer *self, | ||
1083 | 1083 | cairo_new_path (renderer->cr); |
1084 | 1084 | cairo_move_to (renderer->cr, ul_corner->x + radius, ul_corner->y); |
1085 | 1085 | renderer->stroke_pending = TRUE; |
1086 | + /* only stroke, no fill gives us the contour */ | |
1086 | 1087 | DIA_RENDERER_CLASS(parent_class)->draw_rounded_rect(self, |
1087 | 1088 | ul_corner, lr_corner, |
1088 | - NULL, fill, radius); | |
1089 | + NULL, stroke ? stroke : fill, radius); | |
1089 | 1090 | renderer->stroke_pending = FALSE; |
1090 | 1091 | cairo_close_path (renderer->cr); |
1091 | - if (fill) /* if a stroke follows preserve the path */ | |
1092 | + if (fill) { /* if a stroke follows preserve the path */ | |
1093 | + cairo_set_source_rgba (renderer->cr, fill->red, fill->green, fill->blue, fill->alpha); | |
1092 | 1094 | _dia_cairo_fill (renderer, stroke ? TRUE : FALSE); |
1095 | + } | |
1093 | 1096 | if (stroke) { |
1094 | 1097 | cairo_set_source_rgba (renderer->cr, stroke->red, stroke->green, stroke->blue, stroke->alpha); |
1095 | 1098 | cairo_stroke (renderer->cr); |