mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
* Source/cairo/CairoContext.m (-supportsDrawGState): Delegate to
gstate. * Headers/cairo/CairoGState.h (-supportsDrawGState): Declare this method. * Source/cairo/CairoGState.m (-supportsDrawGState): Only allow the faster drawing operation when the clip can be represented as a list of rectangles. * Source/cairo/CairoGState.m (-copyWithZone:): Always free the clip rectangle list. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33289 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
938f716f55
commit
5a950060d0
4 changed files with 31 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2011-06-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/cairo/CairoContext.m (-supportsDrawGState): Delegate to gstate.
|
||||||
|
* Headers/cairo/CairoGState.h (-supportsDrawGState): Declare this method.
|
||||||
|
* Source/cairo/CairoGState.m (-supportsDrawGState): Only allow the
|
||||||
|
faster drawing operation when the clip can be represented as a
|
||||||
|
list of rectangles.
|
||||||
|
* Source/cairo/CairoGState.m (-copyWithZone:): Always free the
|
||||||
|
clip rectangle list.
|
||||||
|
|
||||||
2011-06-01 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2011-06-01 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Headers/x11/XGServerWindow.h (GSMaxWMProtocols, _gswindow_device_t):
|
* Headers/x11/XGServerWindow.h (GSMaxWMProtocols, _gswindow_device_t):
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
- (void) GSSetSurface: (CairoSurface *)surface : (int)x : (int)y;
|
- (void) GSSetSurface: (CairoSurface *)surface : (int)x : (int)y;
|
||||||
|
|
||||||
- (void) showPage;
|
- (void) showPage;
|
||||||
|
- (BOOL) supportsDrawGState;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
|
|
||||||
- (BOOL) supportsDrawGState
|
- (BOOL) supportsDrawGState
|
||||||
{
|
{
|
||||||
return YES;
|
return [CGSTATE supportsDrawGState];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) flushGraphics
|
- (void) flushGraphics
|
||||||
|
|
|
@ -229,8 +229,6 @@ static float floatToUserSpace(NSAffineTransform *ctm, float f)
|
||||||
cairo_clip(copy->_ct);
|
cairo_clip(copy->_ct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_rectangle_list_destroy(clip_rects);
|
|
||||||
}
|
}
|
||||||
else if (status == CAIRO_STATUS_CLIP_NOT_REPRESENTABLE)
|
else if (status == CAIRO_STATUS_CLIP_NOT_REPRESENTABLE)
|
||||||
{
|
{
|
||||||
|
@ -248,6 +246,8 @@ static float floatToUserSpace(NSAffineTransform *ctm, float f)
|
||||||
{
|
{
|
||||||
NSLog(@"Cairo status '%s' in copy clip", cairo_status_to_string(status));
|
NSLog(@"Cairo status '%s' in copy clip", cairo_status_to_string(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cairo_rectangle_list_destroy(clip_rects);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1400,6 +1400,23 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
||||||
cairo_restore(_ct);
|
cairo_restore(_ct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) supportsDrawGState
|
||||||
|
{
|
||||||
|
#if CAIRO_VERSION > CAIRO_VERSION_ENCODE(1, 4, 0)
|
||||||
|
cairo_rectangle_list_t *clip_rects;
|
||||||
|
cairo_status_t status;
|
||||||
|
|
||||||
|
clip_rects = cairo_copy_clip_rectangle_list(_ct);
|
||||||
|
status = clip_rects->status;
|
||||||
|
cairo_rectangle_list_destroy(clip_rects);
|
||||||
|
if (status == CAIRO_STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
/** Unlike -compositeGState, -drawGSstate fully respects the AppKit CTM but
|
/** Unlike -compositeGState, -drawGSstate fully respects the AppKit CTM but
|
||||||
doesn't support to use the receiver cairo target as the source. */
|
doesn't support to use the receiver cairo target as the source. */
|
||||||
- (void) drawGState: (CairoGState *)source
|
- (void) drawGState: (CairoGState *)source
|
||||||
|
|
Loading…
Reference in a new issue