Fixed glitch to enable dashed strokes with width < 1.0.

2003-09-29  Simon Budig  <simon@gimp.org>

	* 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 ().
This commit is contained in:
Simon Budig 2003-09-28 22:33:08 +00:00 committed by Simon Budig
parent b823aa0d5c
commit 4fce98042d
3 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,11 @@
2003-09-29 Simon Budig <simon@gimp.org>
* 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 <drc@gimp.org>
* gimp/themes/Default/images/stock-join-bevel-16.png: Corrected the

View File

@ -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

View File

@ -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;