Created
July 14, 2011 17:16
-
-
Save SquaredTiki/1082923 to your computer and use it in GitHub Desktop.
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
[NSGraphicsContext saveGraphicsState]; | |
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:[self bounds] cornerRadius:30]; | |
[path addClip]; | |
NSGradient* aGradient = [[[NSGradient alloc] initWithColorsAndLocations: | |
[NSColor colorWithDeviceRed:0.5569 green:0.5137 blue:0.4588 alpha:1.0000], 0.0, | |
[NSColor colorWithDeviceRed:0.5569 green:0.5137 blue:0.4588 alpha:1.0000], 1.0, | |
nil] autorelease]; | |
[aGradient drawInBezierPath:path angle:90]; | |
[path setLineWidth:4]; | |
[[NSColor colorWithDeviceRed:0.4235 green:0.3922 blue:0.3451 alpha:0.9000] setStroke]; | |
[path strokeInside]; | |
[path setLineWidth:3]; | |
[[NSColor colorWithDeviceRed:0.8431 green:0.8314 blue:0.8078 alpha:1.0000] setStroke]; | |
[path strokeInside]; | |
[path setLineWidth:1]; | |
[[NSColor colorWithDeviceRed:0.4235 green:0.3922 blue:0.3451 alpha:0.9000] setStroke]; | |
[path strokeInside]; | |
[NSGraphicsContext restoreGraphicsState]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment