Mercurial > dwindows
comparison mac/dw.m @ 1590:9eef6f82ee50
Comment cleanup in the Mac source.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 30 Jan 2012 17:36:12 +0000 |
parents | 021d2966f84d |
children | 19af25f71e1f |
comparison
equal
deleted
inserted
replaced
1589:9a21fbd6ae50 | 1590:9eef6f82ee50 |
---|---|
6907 [NSGraphicsContext saveGraphicsState]; | 6907 [NSGraphicsContext saveGraphicsState]; |
6908 [NSGraphicsContext setCurrentContext:[NSGraphicsContext | 6908 [NSGraphicsContext setCurrentContext:[NSGraphicsContext |
6909 graphicsContextWithGraphicsPort:[[NSGraphicsContext graphicsContextWithBitmapImageRep:image] graphicsPort] | 6909 graphicsContextWithGraphicsPort:[[NSGraphicsContext graphicsContextWithBitmapImageRep:image] graphicsPort] |
6910 flipped:YES]]; | 6910 flipped:YES]]; |
6911 [[[NSDictionary alloc] initWithObjectsAndKeys:image, NSGraphicsContextDestinationAttributeName, nil] autorelease]; | 6911 [[[NSDictionary alloc] initWithObjectsAndKeys:image, NSGraphicsContextDestinationAttributeName, nil] autorelease]; |
6912 // make a new transform: | 6912 /* Make a new transform */ |
6913 NSAffineTransform *t = [NSAffineTransform transform]; | 6913 NSAffineTransform *t = [NSAffineTransform transform]; |
6914 | 6914 |
6915 // by scaling Y negatively, we effectively flip the image: | 6915 /* By scaling Y negatively, we effectively flip the image */ |
6916 [t scaleXBy:1.0 yBy:-1.0]; | 6916 [t scaleXBy:1.0 yBy:-1.0]; |
6917 | 6917 |
6918 // but we also have to translate it back by its height: | 6918 /* But we also have to translate it back by its height */ |
6919 [t translateXBy:0.0 yBy:-size.height]; | 6919 [t translateXBy:0.0 yBy:-size.height]; |
6920 | 6920 |
6921 // apply the transform: | 6921 /* Apply the transform */ |
6922 [t concat]; | 6922 [t concat]; |
6923 [tmpimage drawAtPoint:NSMakePoint(0, 0) fromRect:NSMakeRect(0, 0, size.width, size.height) | 6923 [tmpimage drawAtPoint:NSMakePoint(0, 0) fromRect:NSMakeRect(0, 0, size.width, size.height) |
6924 operation:NSCompositeSourceOver fraction:1.0]; | 6924 operation:NSCompositeSourceOver fraction:1.0]; |
6925 [NSGraphicsContext restoreGraphicsState]; | 6925 [NSGraphicsContext restoreGraphicsState]; |
6926 } | 6926 } |