Change NSBezierPath to use NSInteger and CGFloat and adjust uses to

this.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36054 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2013-02-01 14:03:08 +00:00
parent f4ebbf89ed
commit e1e0c6e38c
6 changed files with 104 additions and 135 deletions

View file

@ -1427,46 +1427,7 @@ NSGraphicsContext *GSCurrentContext(void)
/** Set the bezier path as the current path */
- (void) GSSendBezierPath: (NSBezierPath *)path
{
NSBezierPathElement type;
NSPoint pts[3];
int i, count;
float pattern[10];
float phase;
DPSnewpath(self);
DPSsetlinewidth(self, [path lineWidth]);
DPSsetlinejoin(self, [path lineJoinStyle]);
DPSsetlinecap(self, [path lineCapStyle]);
DPSsetmiterlimit(self, [path miterLimit]);
DPSsetflat(self, [path flatness]);
[path getLineDash: pattern count: &count phase: &phase];
// Always sent the dash pattern. When NULL this will reset to a solid line.
DPSsetdash(self, pattern, count, phase);
count = [path elementCount];
for (i = 0; i < count; i++)
{
type = [path elementAtIndex: i associatedPoints: pts];
switch(type)
{
case NSMoveToBezierPathElement:
DPSmoveto(self, pts[0].x, pts[0].y);
break;
case NSLineToBezierPathElement:
DPSlineto(self, pts[0].x, pts[0].y);
break;
case NSCurveToBezierPathElement:
DPScurveto(self, pts[0].x, pts[0].y,
pts[1].x, pts[1].y, pts[2].x, pts[2].y);
break;
case NSClosePathBezierPathElement:
DPSclosepath(self);
break;
default:
break;
}
}
[self subclassResponsibility: _cmd];
}
/** Append the array of rects to the current clip path (DPS, Quartz). */