Created
December 31, 2009 16:38
-
-
Save joelreymont/266793 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
;; retrieve raw image data | |
(multiple-value-bind (background-bitmap background-data) | |
(cocoa-get-image-bytes ns-background) | |
(multiple-value-bind (image-bitmap image-data) | |
(cocoa-get-image-bytes ns-image) | |
(multiple-value-bind (mask-bitmap mask-data) | |
(cocoa-get-image-bytes ns-mask) | |
(cocoa-blend background-data | |
image-data | |
mask-data | |
offset size) | |
(objc:invoke ns-background | |
"removeRepresentation:" | |
(objc:invoke | |
(objc:invoke ns-background "representations") | |
"objectAtIndex:" 0)) | |
(objc:invoke ns-background | |
"addRepresentation:" | |
background-bitmap) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment