From 4fce98042d99cdef6018cc483fd7c1fc15ef66b4 Mon Sep 17 00:00:00 2001 From: Simon Budig Date: Sun, 28 Sep 2003 22:33:08 +0000 Subject: [PATCH] Fixed glitch to enable dashed strokes with width < 1.0. 2003-09-29 Simon Budig * app/core/gimpscanconvert.c: Fixed glitch to enable dashed strokes with width < 1.0. * app/core/gimpdrawable-stroke.c: Actually pass the miter limit to gimp_scan_convert_stroke (). --- ChangeLog | 8 ++++++++ app/core/gimpdrawable-stroke.c | 4 +++- app/core/gimpscanconvert.c | 6 ++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 228f5e9cd7..87564c17bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-09-29 Simon Budig + + * app/core/gimpscanconvert.c: Fixed glitch to enable dashed + strokes with width < 1.0. + + * app/core/gimpdrawable-stroke.c: Actually pass the miter + limit to gimp_scan_convert_stroke (). + 2003-09-28 Ville Pätsi * gimp/themes/Default/images/stock-join-bevel-16.png: Corrected the diff --git a/app/core/gimpdrawable-stroke.c b/app/core/gimpdrawable-stroke.c index 8d6a102270..b87f3c3776 100644 --- a/app/core/gimpdrawable-stroke.c +++ b/app/core/gimpdrawable-stroke.c @@ -62,6 +62,7 @@ gimp_drawable_stroke_vectors (GimpDrawable *drawable, gdouble width; GimpJoinStyle join; GimpCapStyle cap; + gdouble miter; gboolean antialias; GArray *dash_array = NULL; @@ -87,6 +88,7 @@ gimp_drawable_stroke_vectors (GimpDrawable *drawable, "width", &width, "join-style", &join, "cap-style", &cap, + "miter", &miter, "antialias", &antialias, NULL); @@ -151,7 +153,7 @@ gimp_drawable_stroke_vectors (GimpDrawable *drawable, return; } - gimp_scan_convert_stroke (scan_convert, width, join, cap, 10.0, + gimp_scan_convert_stroke (scan_convert, width, join, cap, miter, 0.0, dash_array); /* fill a 1-bpp Tilemanager with black, this will describe the shape diff --git a/app/core/gimpscanconvert.c b/app/core/gimpscanconvert.c index aa37a2a7ec..3c2ede8fb6 100644 --- a/app/core/gimpscanconvert.c +++ b/app/core/gimpscanconvert.c @@ -289,14 +289,12 @@ gimp_scan_convert_stroke (GimpScanConvert *sc, gdouble *dashes; gint i; - width = MAX (width, 1.0); - - dash.offset = dash_offset * width; + dash.offset = dash_offset * MAX (width, 1.0); dashes = g_new (gdouble, dash_info->len); for (i=0; i < dash_info->len ; i++) - dashes[i] = width * g_array_index (dash_info, gdouble, i); + dashes[i] = MAX (width, 1.0) * g_array_index (dash_info, gdouble, i); dash.n_dash = dash_info->len; dash.dash = dashes;