diff options
author | dgp <dgp@users.sourceforge.net> | 2014-08-13 11:39:50 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-08-13 11:39:50 (GMT) |
commit | 2d22dd5c2be401b2a9336d8e9d5e46a2c71b15f3 (patch) | |
tree | 0747b9ad6cf467b8e80a7d4266d714e363fdbdb8 /macosx/tkMacOSXDraw.c | |
parent | 2379def90ccf62cffcb5419ab4feb419f4fc3938 (diff) | |
parent | acb6f7b259137644e34ba799e20432a0ced9be0a (diff) | |
download | tk-2d22dd5c2be401b2a9336d8e9d5e46a2c71b15f3.zip tk-2d22dd5c2be401b2a9336d8e9d5e46a2c71b15f3.tar.gz tk-2d22dd5c2be401b2a9336d8e9d5e46a2c71b15f3.tar.bz2 |
merge 8.5
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 5512669..a9364fa 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -145,7 +145,7 @@ BitmapRepFromDrawableRect( NSBitmapImageRep *bitmap_rep=NULL; NSView *view=NULL; if ( mac_drawable->flags & TK_IS_PIXMAP ) { - /* + /* This means that the MacDrawable is functioning as a Tk Pixmap, so its view field is NULL. It's context field should point to a CGImage. */ @@ -1478,7 +1478,7 @@ TkScrollWindow( TkRegion damageRgn) /* Region to accumulate damage in. */ { Drawable drawable = Tk_WindowId(tkwin); - MacDrawable *macDraw = (MacDrawable *) drawable; + MacDrawable *macDraw = (MacDrawable *) drawable; NSView *view = TkMacOSXDrawableView(macDraw); CGRect visRect, srcRect, dstRect, scroll_src, scroll_dst; HIShapeRef dmgRgn = NULL; @@ -1489,7 +1489,7 @@ TkScrollWindow( /* Get the scroll area in NSView coordinates (origin at bottom left). */ bounds = [view bounds]; scroll_src = CGRectMake( - macDraw->xOff + x, + macDraw->xOff + x, bounds.size.height - height - (macDraw->yOff + y), width, height); scroll_dst = CGRectOffset(scroll_src, dx, -dy); @@ -1516,7 +1516,7 @@ TkScrollWindow( /* Scroll the rectangle. */ [view scrollRect:NSRectFromCGRect(scroll_src) by:NSMakeSize(dx, -dy)]; [view displayRect:NSRectFromCGRect(scroll_dst)]; - + /* * When a Text widget contains embedded images, scrolling generates * lots of artifacts involving multiple copies of the images @@ -1535,7 +1535,7 @@ TkScrollWindow( * them as damaged. Use Tk coordinates, shifted to account for the * future scrolling. */ - + for (NSView *subview in [view subviews] ) { NSRect frame = [subview frame]; CGRect subviewRect = CGRectMake( @@ -1553,14 +1553,12 @@ TkScrollWindow( CFRelease(dstRgn); } } - } } if ( dmgRgn == NULL ) { dmgRgn = HIShapeCreateEmpty(); } - //TkMacOSXInvalidateViewRegion(view, dmgRgn); TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn); result = HIShapeIsEmpty(dmgRgn) ? 0 : 1; CFRelease(dmgRgn); |