diff options
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r-- | cocoa/PlatCocoa.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index b662c25e6..f5f69608e 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1270,9 +1270,14 @@ XYPOSITION SurfaceImpl::AverageCharWidth(const Font *font_) { } void SurfaceImpl::SetClip(PRectangle rc) { + CGContextSaveGState(gc); CGContextClipToRect(gc, PRectangleToCGRect(rc)); } +void SurfaceImpl::PopClip() { + CGContextRestoreGState(gc); +} + void SurfaceImpl::FlushCachedState() { CGContextSynchronize(gc); } |