Created
May 27, 2011 02:59
-
-
Save Uncommon/994562 to your computer and use it in GitHub Desktop.
Write tiffs for all standard NSCursor images
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
NSArray *cursorNames = [NSArray arrayWithObjects: | |
@"arrowCursor", | |
@"IBeamCursor", | |
@"pointingHandCursor", | |
@"closedHandCursor", | |
@"openHandCursor", | |
@"resizeLeftCursor", | |
@"resizeRightCursor", | |
@"resizeLeftRightCursor", | |
@"resizeUpCursor", | |
@"resizeDownCursor", | |
@"resizeUpDownCursor", | |
@"crosshairCursor", | |
@"disappearingItemCursor", | |
@"operationNotAllowedCursor", | |
@"dragLinkCursor", | |
@"dragCopyCursor", | |
@"contextualMenuCursor", | |
nil]; | |
for (NSString *name in cursorNames) { | |
NSCursor *cursor = [NSCursor performSelector: | |
NSSelectorFromString(name)]; | |
NSData *data = [[cursor image] TIFFRepresentation]; | |
[data writeToFile:[NSString stringWithFormat:@"%@.tif",name] atomically:NO]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment