diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvUtil.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index 9bd60d4..c0d6bea 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvUtil.c,v 1.19.2.1 2008/12/21 23:52:45 ferrieux Exp $ + * RCS: @(#) $Id: tkCanvUtil.c,v 1.19.2.2 2009/06/23 05:21:38 nijtmans Exp $ */ #include "tkInt.h" @@ -1136,12 +1136,10 @@ Tk_ConfigOutlineGC( if (mask && (dash->number != 0)) { gcValues->line_style = LineOnOffDash; gcValues->dash_offset = outline->offset; - if (dash->number >= 2) { - gcValues->dashes = 4; - } else if (dash->number > 0) { + if (dash->number > 0) { gcValues->dashes = dash->pattern.array[0]; } else { - gcValues->dashes = (char) (4 * width); + gcValues->dashes = (char) (4 * width + 0.5); } mask |= GCLineStyle|GCDashList|GCDashOffset; } @@ -1221,7 +1219,7 @@ Tk_ChangeOutlineGC( } if ((dash->number<-1) || - ((dash->number == -1) && (dash->pattern.array[1] != ','))) { + ((dash->number == -1) && (dash->pattern.array[0] != ','))) { char *q; int i = -dash->number; @@ -1341,13 +1339,11 @@ Tk_ResetOutlineGC( if ((dash->number > 2) || (dash->number < -1) || (dash->number==2 && (dash->pattern.array[0] != dash->pattern.array[1])) || - ((dash->number == -1) && (dash->pattern.array[1] != ','))) { - if (dash->number < 0) { - dashList = (int) (4 * width + 0.5); - } else if (dash->number<3) { + ((dash->number == -1) && (dash->pattern.array[0] != ','))) { + if (dash->number > 0) { dashList = dash->pattern.array[0]; } else { - dashList = 4; + dashList = (char) (4 * width + 0.5); } XSetDashes(((TkCanvas *)canvas)->display, outline->gc, outline->offset, &dashList , 1); |