Last active
August 29, 2015 14:07
-
-
Save steveatinfincia/9c4a281d1432594152e8 to your computer and use it in GitHub Desktop.
Codepoints 1.0.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)drawBackgroundInRect:(NSRect)dirtyRect { | |
// if cellBackground does not exist, create it | |
if (!cellBackground) { | |
// NSImage ivar | |
cellBackground = [[NSImage alloc] initWithSize:dirtyRect.size]; | |
[cellBackground lockFocus]; | |
//cellGradient created elsewhere, just a basic gradient | |
[cellGradient drawInRect:dirtyRect angle:270]; | |
[cellBackground unlockFocus]; | |
} | |
// now actually draw the NSImage into the background rect | |
[cellBackground drawInRect:dirtyRect | |
fromRect:NSZeroRect | |
operation:NSCompositeCopy | |
fraction:1.0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment