mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
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:
parent
a374aad6f9
commit
512be5eca2
3 changed files with 16 additions and 10 deletions
|
@ -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>
|
2003-12-30 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/art/path.m (-DPSrectstroke::::,
|
* Source/art/path.m (-DPSrectstroke::::,
|
||||||
|
|
|
@ -841,7 +841,7 @@
|
||||||
|
|
||||||
- (void) GSSendBezierPath: (NSBezierPath *)newpath
|
- (void) GSSendBezierPath: (NSBezierPath *)newpath
|
||||||
{
|
{
|
||||||
int count;
|
int count = 10;
|
||||||
float pattern[10];
|
float pattern[10];
|
||||||
float phase;
|
float phase;
|
||||||
|
|
||||||
|
|
|
@ -835,10 +835,11 @@ static Region emptyRegion;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case path_eofill:
|
case path_eofill:
|
||||||
gcv.fill_rule = EvenOddRule;
|
fill_rule = EvenOddRule;
|
||||||
[self setGCValues: gcv withMask: GCFillRule];
|
|
||||||
/* NO BREAK */
|
/* NO BREAK */
|
||||||
case path_fill:
|
case path_fill:
|
||||||
|
gcv.fill_rule = fill_rule;
|
||||||
|
[self setGCValues: gcv withMask: GCFillRule];
|
||||||
// Hack: Only draw when alpha is not zero
|
// Hack: Only draw when alpha is not zero
|
||||||
if (drawingAlpha == NO || fillColor.field[AINDEX] != 0.0)
|
if (drawingAlpha == NO || fillColor.field[AINDEX] != 0.0)
|
||||||
XFillPolygon(XDPY, draw, xgcntxt, pts, count, Complex,
|
XFillPolygon(XDPY, draw, xgcntxt, pts, count, Complex,
|
||||||
|
@ -852,11 +853,6 @@ static Region emptyRegion;
|
||||||
CoordModeOrigin);
|
CoordModeOrigin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gcv.fill_rule == EvenOddRule)
|
|
||||||
{
|
|
||||||
gcv.fill_rule = WindingRule;
|
|
||||||
[self setGCValues: gcv withMask: GCFillRule];
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case path_eoclip:
|
case path_eoclip:
|
||||||
fill_rule = EvenOddRule;
|
fill_rule = EvenOddRule;
|
||||||
|
@ -1487,7 +1483,9 @@ typedef enum {
|
||||||
// FIXME: How to convert those values?
|
// FIXME: How to convert those values?
|
||||||
dash_offset = (int)pat_offset;
|
dash_offset = (int)pat_offset;
|
||||||
for (i = 0; i < size; i++)
|
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.
|
// We can only set the dash pattern, if xgcntxt exists.
|
||||||
if (xgcntxt == 0)
|
if (xgcntxt == 0)
|
||||||
|
|
Loading…
Reference in a new issue