mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Implement rect methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@13288 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bd8b65f942
commit
238dbb850c
4 changed files with 30 additions and 4 deletions
|
@ -1,6 +1,9 @@
|
|||
2002-04-01 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/xlib/GSContext (-GSCurrentCTM): Implement
|
||||
* Source/gsc/GSContext.m (-GSSendBezierPath:): Implement
|
||||
(-GSRectClipList::): Likewise.
|
||||
(-GSRectFillList::): Likewise.
|
||||
(-GSCurrentCTM): Likewise.
|
||||
(-GSSetCTM:): Likewise.
|
||||
(-GSConcatCTM:): Likewise.
|
||||
* Source/xlib/XGGState.m ([XGGState -DPSsetmiterlimit:]): Implement
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
- (void) DPSstroke;
|
||||
|
||||
- (void) GSSendBezierPath: (NSBezierPath *)path;
|
||||
- (void) GSRectClipList: (const NSRect *)rects : (int) count;
|
||||
- (void) GSRectFillList: (const NSRect *)rects : (int) count;
|
||||
|
||||
- (void)DPSimage: (NSAffineTransform*) matrix
|
||||
|
|
|
@ -699,17 +699,17 @@ static unsigned int unique_index = 0;
|
|||
|
||||
- (void) GSSendBezierPath: (NSBezierPath *)path
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
[gstate GSSendBezierPath: path];
|
||||
}
|
||||
|
||||
- (void) GSRectClipList: (const NSRect *)rects : (int) count
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
[gstate GSRectClipList: rects : count];
|
||||
}
|
||||
|
||||
- (void) GSRectFillList: (const NSRect *)rects : (int) count
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
[gstate GSRectFillList: rects : count];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
|
|
@ -580,6 +580,28 @@
|
|||
[path appendBezierPath: path];
|
||||
}
|
||||
|
||||
- (void) GSRectClipList: (const NSRect *)rects : (int) count
|
||||
{
|
||||
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
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Reference in a new issue