Made non-zero fill winding rule and dash patterns working.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@18291 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2003-12-30 15:29:16 +00:00
parent a374aad6f9
commit 512be5eca2
3 changed files with 16 additions and 10 deletions

View file

@ -1,3 +1,11 @@
2003-12-30 Fred Kiefer <FredKiefer@gmx.de>
* Source/gsc/path.m (-GSSendBezierPath:) preset the count
variable, as this is expected by the method [NSBezierPath
getLineDash:count:phase:].
* Source/xlib/XGGState.m (-_doPath::draw:) allways set fill rule
for path_fill.
2003-12-30 Fred Kiefer <FredKiefer@gmx.de>
* Source/art/path.m (-DPSrectstroke::::,

View file

@ -841,7 +841,7 @@
- (void) GSSendBezierPath: (NSBezierPath *)newpath
{
int count;
int count = 10;
float pattern[10];
float phase;

View file

@ -835,10 +835,11 @@ static Region emptyRegion;
}
break;
case path_eofill:
gcv.fill_rule = EvenOddRule;
[self setGCValues: gcv withMask: GCFillRule];
fill_rule = EvenOddRule;
/* NO BREAK */
case path_fill:
gcv.fill_rule = fill_rule;
[self setGCValues: gcv withMask: GCFillRule];
// Hack: Only draw when alpha is not zero
if (drawingAlpha == NO || fillColor.field[AINDEX] != 0.0)
XFillPolygon(XDPY, draw, xgcntxt, pts, count, Complex,
@ -851,12 +852,7 @@ static Region emptyRegion;
XFillPolygon(XDPY, alpha_buffer, agcntxt, pts, count, Complex,
CoordModeOrigin);
}
if (gcv.fill_rule == EvenOddRule)
{
gcv.fill_rule = WindingRule;
[self setGCValues: gcv withMask: GCFillRule];
}
break;
case path_eoclip:
fill_rule = EvenOddRule;
@ -1487,7 +1483,9 @@ typedef enum {
// FIXME: How to convert those values?
dash_offset = (int)pat_offset;
for (i = 0; i < size; i++)
dash_list[i] = (char)pat[i];
{
dash_list[i] = (char)pat[i];
}
// We can only set the dash pattern, if xgcntxt exists.
if (xgcntxt == 0)