Implemented GSRectClipList() in GSStreamContext.m

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@23885 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2006-10-16 02:50:40 +00:00
parent 6fe8675dd8
commit d4ec929e5e
2 changed files with 23 additions and 2 deletions

View file

@ -1,4 +1,9 @@
2006-10-15 11:14-EDT Mark Tracy
2006-10-15 22:48-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/gsc/GSStreamContext.m: GSRectClipList() copied
implementation from GSGState.m.
2006-10-15 11:14-EDT Mark Tracy <tracy454 at concentric dot net>
* Source/gsc/GSStreamContext.m: GSStreamContext did not implement
GSRectFillList fix: copied code from GSGState.m.

View file

@ -717,7 +717,23 @@ fpfloat(FILE *stream, float f)
- (void) GSRectClipList: (const NSRect *)rects: (int)count
{
[self notImplemented: _cmd];
int i;
NSRect union_rect;
if (count == 0)
return;
/*
The specification is not clear if the union of the rects
should produce the new clip rect or if the outline of all rects
should be used as clip path.
*/
union_rect = rects[0];
for (i = 1; i < count; i++)
union_rect = NSUnionRect(union_rect, rects[i]);
[self DPSrectclip: NSMinX(union_rect) : NSMinY(union_rect)
: NSWidth(union_rect) : NSHeight(union_rect)];
}
- (void) GSRectFillList: (const NSRect *)rects: (int)count