diff options
author | culler <culler> | 2020-05-31 21:19:29 (GMT) |
---|---|---|
committer | culler <culler> | 2020-05-31 21:19:29 (GMT) |
commit | 11b02278eef59eb2b8412727e92256477ea6188b (patch) | |
tree | 512163e824ec5b5b0ee18442f5b0792d01db770d /macosx/tkMacOSXDraw.c | |
parent | 7fd7b7a12166879c8e7471f370e57b56a50b7834 (diff) | |
download | tk-11b02278eef59eb2b8412727e92256477ea6188b.zip tk-11b02278eef59eb2b8412727e92256477ea6188b.tar.gz tk-11b02278eef59eb2b8412727e92256477ea6188b.tar.bz2 |
Add some methods for managing damage rectangles.
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index d2d72e4..dcc3d79 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1646,15 +1646,13 @@ TkMacOSXSetupDrawingContext( if (![NSApp isDrawing] || view != [NSView focusView]) { NSRect dirtyRect = [view bounds]; if (dc.clipRgn) { - CGRect clipRect; CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0, .ty = dirtyRect.size.height}; - HIShapeGetBounds(dc.clipRgn, &clipRect); - clipRect = CGRectApplyAffineTransform(clipRect, t); - dirtyRect = NSRectFromCGRect(clipRect); + HIShapeGetBounds(dc.clipRgn, &clipBounds); + clipBounds = CGRectApplyAffineTransform(clipBounds, t); + dirtyRect = NSRectFromCGRect(clipBounds); } - [view setTkNeedsDisplay:YES]; - [view setTkDirtyRect:NSUnionRect([view tkDirtyRect], dirtyRect)]; + [view addTkDirtyRect:dirtyRect]; canDraw = false; goto end; } |