Skip to content

Instantly share code, notes, and snippets.

@panupan
Created August 23, 2012 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save panupan/3440412 to your computer and use it in GitHub Desktop.
Save panupan/3440412 to your computer and use it in GitHub Desktop.
NSView post processing
CGContextSetBlendMode([[NSGraphicsContext currentContext] graphicsPort], kCGBlendModeScreen);
CGContextSetRGBFillColor ([[NSGraphicsContext currentContext] graphicsPort], 1, 1, 1, .8);
CGContextFillRect([[NSGraphicsContext currentContext] graphicsPort], self.backgroundRect);
CGContextSetBlendMode([[NSGraphicsContext currentContext] graphicsPort], kCGBlendModeColor);
CGContextSetRGBFillColor ([[NSGraphicsContext currentContext] graphicsPort], 1, 1, 1, 1);
CGContextFillRect([[NSGraphicsContext currentContext] graphicsPort], self.backgroundRect);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment