No description, website, or topics provided.
Objective-C
Switch branches/tags
Nothing to show
Latest commit a8af2ae Jan 3, 2013 foundry foundry fixed warnings
Permalink
Failed to load latest commit information.
DrawingTest.xcodeproj first commit Dec 27, 2012
DrawingTest fixed warnings Jan 3, 2013
.gitignore first commit Dec 27, 2012
Readme.md first commit Dec 27, 2012

Readme.md

Drawing Test

This is a little toy interface to test this NSImage method

- (void)drawInRect:(NSRect)dstRect 
		  fromRect:(NSRect)srcRect 
		  operation:(NSCompositingOperation)op 
		  fraction:(CGFloat)delta

It provides slider controls to alter dstRect and srcRect interactively and view the effects immediately.

Two source images are provided and the method is sent to each.

The drawing context is a new NSImage which combines the results. This image is then drawn in an NSView:

- (void) drawRect:(NSRect)dirtyRect
{
	[NSColor blackColor];
	NSFrameRect(self.bounds);
	if (self.combinedImage) {
		[self.combinedImage drawInRect:self.bounds
							  fromRect:NSZeroRect
							 operation:NSCompositeSourceOver
							  fraction:1.0];
	}
}