+2008-02-01 Geoff Norton <gnorton@novell.com>
+
+ * carbonFunctions.cs: Ensure we save/restore the GState before
+ modifying the clipping path as QD contexts can be reused.
+
2008-02-01 Geoff Norton <gnorton@novell.com>
* carbonFunction.cs: Rework the clipping interaction with
// Create the original rect path and clip to it
Rect rc_clip = new Rect (0, 0, view_bounds.size.width, view_bounds.size.height);
+ CGContextSaveGState (context);
+
Rectangle [] clip_rectangles = (Rectangle []) hwnd_delegate.DynamicInvoke (new object [] {handle});
if (clip_rectangles != null && clip_rectangles.Length > 0) {
int length = clip_rectangles.Length;
}
internal static void ReleaseContext (IntPtr port, IntPtr context) {
+ CGContextRestoreGState (context);
+
lock (lockobj) {
if (contextReference [port] != null && context == (IntPtr) contextReference [port]) {
QDEndCGContext (port, ref context);
internal static extern void CGContextEOClip (IntPtr context);
[DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
internal static extern void CGContextEOFillPath (IntPtr context);
+ [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
+ internal static extern void CGContextSaveGState (IntPtr context);
+ [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
+ internal static extern void CGContextRestoreGState (IntPtr context);
}
internal struct CGSize {