diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-08-11 13:58:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-08-11 13:58:04 (GMT) |
commit | acb6f7b259137644e34ba799e20432a0ced9be0a (patch) | |
tree | d3d322cb5ec43660782d4baa1dfe04fb6b7b81aa /macosx/tkMacOSXDraw.c | |
parent | 80bbd2bc6dedc72a2f69f46bd38afa499fc349c7 (diff) | |
download | tk-acb6f7b259137644e34ba799e20432a0ced9be0a.zip tk-acb6f7b259137644e34ba799e20432a0ced9be0a.tar.gz tk-acb6f7b259137644e34ba799e20432a0ced9be0a.tar.bz2 |
Fix typo's, debug statements, C++-comment.
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 6ec3e59..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,14 +1535,14 @@ 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( frame.origin.x - macDraw->xOff + dx, (bounds.size.height - frame.origin.y - frame.size.height) - macDraw->yOff + dy, frame.size.width, frame.size.height); - // /* Rectangles with negative coordinates seem to cause trouble. */ + /* Rectangles with negative coordinates seem to cause trouble. */ if (subviewRect.origin.y < 0 && subviewRect.origin.y + subviewRect.size.height > 0) { subviewRect.origin.y = 0; } @@ -1559,7 +1559,6 @@ TkScrollWindow( if ( dmgRgn == NULL ) { dmgRgn = HIShapeCreateEmpty(); } - //TkMacOSXInvalidateViewRegion(view, dmgRgn); TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn); result = HIShapeIsEmpty(dmgRgn) ? 0 : 1; CFRelease(dmgRgn); |