Revision: 5697
http://skim-app.svn.sourceforge.net/skim-app/?rev=5697&view=rev
Author: hofman
Date: 2009-09-06 22:32:19 +0000 (Sun, 06 Sep 2009)
Log Message:
-----------
use NSGradient for toolbar images
Modified Paths:
--------------
trunk/NSImage_SKExtensions.m
Modified: trunk/NSImage_SKExtensions.m
===================================================================
--- trunk/NSImage_SKExtensions.m 2009-09-06 21:44:13 UTC (rev 5696)
+++ trunk/NSImage_SKExtensions.m 2009-09-06 22:32:19 UTC (rev 5697)
@@ -38,7 +38,6 @@
#import "NSImage_SKExtensions.h"
#import "NSBezierPath_BDSKExtensions.h"
-#import "NSBezierPath_CoreImageExtensions.h"
@implementation NSImage (SKExtensions)
@@ -296,6 +295,7 @@
NSColor *fgColor = [NSColor whiteColor];
NSBezierPath *path;
+ NSGradient *gradient;
[NSBezierPath setDefaultLineWidth:1.0];
@@ -484,10 +484,10 @@
[path setLineWidth:1.0];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(7.0, 6.0, 13.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(8.0, 7.0, 11.0, 7.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(7.0, 6.0, 13.0, 9.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(8.0, 7.0, 11.0, 7.0) angle:90.0];
[fgColor setFill];
path = [NSBezierPath bezierPath];
[path moveToPoint:NSMakePoint(8.0, 7.0)];
@@ -536,10 +536,10 @@
[path setLineWidth:1.0];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(7.0, 6.0, 13.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(8.0, 7.0, 11.0, 7.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(7.0, 6.0, 13.0, 9.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(8.0, 7.0, 11.0, 7.0) angle:90.0];
[fgColor setFill];
path = [NSBezierPath bezierPath];
[path moveToPoint:NSMakePoint(8.0, 7.0)];
@@ -606,10 +606,10 @@
[path setLineWidth:1.0];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(7.0, 6.0, 13.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(8.0, 7.0, 11.0, 7.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(7.0, 6.0, 13.0, 9.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(8.0, 7.0, 11.0, 7.0) angle:90.0];
[shadow3 set];
[[NSColor colorWithCalibratedRed:1.0 green:0.865 blue:0.296 alpha:1.0]
setFill];
path = [NSBezierPath bezierPathWithRect:NSMakeRect(3.0, 7.0, 21.0, 2.0)];
@@ -682,10 +682,10 @@
[path fill];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(10.0, 5.0, 7.0 , 10.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(11.0, 6.0, 5.0 , 8.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(10.0, 5.0, 7.0 , 10.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(11.0, 6.0, 5.0 , 8.0) angle:90.0];
[NSGraphicsContext restoreGraphicsState];
[toolbarSinglePageImage unlockFocus];
[toolbarSinglePageImage setName:SKImageNameToolbarSinglePage];
@@ -702,12 +702,12 @@
[path fill];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(5.0, 5.0, 7.0 , 10.0)];
- [path appendBezierPathWithRect:NSMakeRect(15.0, 5.0, 7.0 , 10.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(6.0, 6.0, 5.0 , 8.0)];
- [path appendBezierPathWithRect:NSMakeRect(16.0, 6.0, 5.0 , 8.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(5.0, 5.0, 7.0 , 10.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(15.0, 5.0, 7.0 , 10.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(6.0, 6.0, 5.0 , 8.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(16.0, 6.0, 5.0 , 8.0) angle:90.0];
[NSGraphicsContext restoreGraphicsState];
[toolbarTwoUpImage unlockFocus];
[toolbarTwoUpImage setName:SKImageNameToolbarTwoUp];
@@ -726,14 +726,12 @@
[NSGraphicsContext saveGraphicsState];
path = [NSBezierPath bezierPathWithRect:NSMakeRect(9.0, 4.0, 9.0 , 12.0)];
[path addClip];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(10.0, 12.0, 7.0 ,
10.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(11.0, 13.0, 5.0 , 8.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(10.0, -1.0, 7.0 ,
10.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(11.0, 0.0, 5.0 , 8.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(10.0, 12.0, 7.0 , 10.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(10.0, -1.0, 7.0 , 10.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(11.0, 13.0, 5.0 , 8.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(11.0, 0.0, 5.0 , 8.0) angle:90.0];
[NSGraphicsContext restoreGraphicsState];
[toolbarSinglePageContinuousImage unlockFocus];
[toolbarSinglePageContinuousImage
setName:SKImageNameToolbarSinglePageContinuous];
@@ -754,18 +752,16 @@
[NSGraphicsContext saveGraphicsState];
path = [NSBezierPath bezierPathWithRect:NSMakeRect(4.0, 4.0, 19.0 , 12.0)];
[path addClip];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(5.0, 12.0, 7.0 , 10.0)];
- [path appendBezierPathWithRect:NSMakeRect(15.0, 12.0, 7.0 , 10.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(6.0, 13.0, 5.0 , 8.0)];
- [path appendBezierPathWithRect:NSMakeRect(16.0, 13.0, 5.0 , 8.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(5.0, -1.0, 7.0 , 10.0)];
- [path appendBezierPathWithRect:NSMakeRect(15.0, -1.0, 7.0 , 10.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(6.0, 0.0, 5.0 , 8.0)];
- [path appendBezierPathWithRect:NSMakeRect(16.0, 0.0, 5.0 , 8.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(5.0, 12.0, 7.0 , 10.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(15.0, 12.0, 7.0 , 10.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(5.0, -1.0, 7.0 , 10.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(15.0, -1.0, 7.0 , 10.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(6.0, 13.0, 5.0 , 8.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(16.0, 13.0, 5.0 , 8.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(6.0, 0.0, 5.0 , 8.0) angle:90.0];
+ [gradient drawInRect:NSMakeRect(16.0, 0.0, 5.0 , 8.0) angle:90.0];
[NSGraphicsContext restoreGraphicsState];
[toolbarTwoUpContinuousImage unlockFocus];
[toolbarTwoUpContinuousImage setName:SKImageNameToolbarTwoUpContinuous];
@@ -783,10 +779,10 @@
[path setLineWidth:1.0];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(7.0, 6.0, 13.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(8.0, 7.0, 11.0, 7.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(7.0, 6.0, 13.0, 9.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(8.0, 7.0, 11.0, 7.0) angle:90.0];
[NSGraphicsContext restoreGraphicsState];
[toolbarMediaBoxImage unlockFocus];
[toolbarMediaBoxImage setName:SKImageNameToolbarMediaBox];
@@ -804,10 +800,10 @@
[path setLineWidth:1.0];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(7.0, 6.0, 13.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.337 blue:0.814 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.584 blue:0.872 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(8.0, 7.0, 11.0, 7.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.0
green:0.431 blue:0.891 alpha:1.0] endColor:[CIColor colorWithRed:0.0
green:0.636 blue:0.944 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.337 blue:0.814 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.584 blue:0.872
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(7.0, 6.0, 13.0, 9.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.0 green:0.431 blue:0.891 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.0 green:0.636 blue:0.944
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(8.0, 7.0, 11.0, 7.0) angle:90.0];
[shadow3 set];
[[NSColor colorWithCalibratedRed:1.0 green:0.865 blue:0.296 alpha:1.0]
setFill];
path = [NSBezierPath bezierPathWithRect:NSMakeRect(3.0, 7.0, 21.0, 2.0)];
@@ -832,15 +828,16 @@
[path fill];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:outStartGray
green:outStartGray blue:outStartGray alpha:1.0] endColor:[CIColor
colorWithRed:outEndGray green:outEndGray blue:outEndGray alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(12.0, 5.0, 9.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:inStartGray
green:inStartGray blue:inStartGray alpha:1.0] endColor:[CIColor
colorWithRed:inEndGray green:inEndGray blue:inEndGray alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(10.0, 4.0, 1.0, 11.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.431
green:0.478 blue:0.589 alpha:1.0] endColor:[CIColor colorWithRed:0.714
green:0.744 blue:0.867 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(5.0, 4.0, 5.0, 11.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.502
green:0.537 blue:0.640 alpha:1.0] endColor:[CIColor colorWithRed:0.761
green:0.784 blue:0.900 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(6.0, 5.0, 3.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.382
green:0.435 blue:0.547 alpha:1.0] endColor:[CIColor colorWithRed:0.696
green:0.722 blue:0.843 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:outStartGray green:outStartGray blue:outStartGray
alpha:1.0] endingColor:[NSColor colorWithCalibratedRed:outEndGray
green:outEndGray blue:outEndGray alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(5.0, 4.0, 17.0 , 11.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:inStartGray green:inStartGray blue:inStartGray
alpha:1.0] endingColor:[NSColor colorWithCalibratedRed:inEndGray
green:inEndGray blue:inEndGray alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(12.0, 5.0, 9.0, 9.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.431 green:0.478 blue:0.589 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.714 green:0.744 blue:0.867
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(10.0, 4.0, 1.0, 11.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.502 green:0.537 blue:0.640 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.761 green:0.784 blue:0.900
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(5.0, 4.0, 5.0, 11.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.382 green:0.435 blue:0.547 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.696 green:0.722 blue:0.843
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(6.0, 5.0, 3.0, 9.0) angle:90.0];
[fgColor setFill];
path = [NSBezierPath bezierPath];
[path appendBezierPathWithRect:NSMakeRect(6.0, 5.0, 3.0, 1.0)];
@@ -864,15 +861,16 @@
[path fill];
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:outStartGray
green:outStartGray blue:outStartGray alpha:1.0] endColor:[CIColor
colorWithRed:outEndGray green:outEndGray blue:outEndGray alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(6.0, 5.0, 9.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:inStartGray
green:inStartGray blue:inStartGray alpha:1.0] endColor:[CIColor
colorWithRed:inEndGray green:inEndGray blue:inEndGray alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(16.0, 4.0, 1.0, 11.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.431
green:0.478 blue:0.589 alpha:1.0] endColor:[CIColor colorWithRed:0.714
green:0.744 blue:0.867 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(17.0, 4.0, 5.0, 11.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.502
green:0.537 blue:0.640 alpha:1.0] endColor:[CIColor colorWithRed:0.761
green:0.784 blue:0.900 alpha:1.0]];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(18.0, 5.0, 3.0, 9.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.382
green:0.435 blue:0.547 alpha:1.0] endColor:[CIColor colorWithRed:0.696
green:0.722 blue:0.843 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:outStartGray green:outStartGray blue:outStartGray
alpha:1.0] endingColor:[NSColor colorWithCalibratedRed:outEndGray
green:outEndGray blue:outEndGray alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(5.0, 4.0, 17.0 , 11.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:inStartGray green:inStartGray blue:inStartGray
alpha:1.0] endingColor:[NSColor colorWithCalibratedRed:inEndGray
green:inEndGray blue:inEndGray alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(6.0, 5.0, 9.0, 9.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.431 green:0.478 blue:0.589 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.714 green:0.744 blue:0.867
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(16.0, 4.0, 1.0, 11.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.502 green:0.537 blue:0.640 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.761 green:0.784 blue:0.900
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(17.0, 4.0, 5.0, 11.0) angle:90.0];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.382 green:0.435 blue:0.547 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.696 green:0.722 blue:0.843
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(18.0, 5.0, 3.0, 9.0) angle:90.0];
[fgColor setFill];
path = [NSBezierPath bezierPath];
[path appendBezierPathWithRect:NSMakeRect(18.0, 5.0, 3.0, 1.0)];
@@ -1002,7 +1000,8 @@
[path closePath];
[path appendBezierPathWithRect:NSMakeRect(12.0, 7.0, 2.0, 2.0)];
[path setWindingRule:NSEvenOddWindingRule];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.988
green:0.988 blue:0.988 alpha:1.0] endColor:[CIColor colorWithRed:0.762
green:0.762 blue:0.762 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.988 green:0.988 blue:0.988 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.762 green:0.762 blue:0.762
alpha:1.0]] autorelease];
+ [gradient drawInBezierPath:path angle:90.0];
[NSGraphicsContext restoreGraphicsState];
[toolbarAnchoredNoteImage unlockFocus];
[toolbarAnchoredNoteImage setName:SKImageNameToolbarAnchoredNote];
@@ -1069,8 +1068,8 @@
[NSGraphicsContext saveGraphicsState];
[[NSColor clearColor] setFill];
NSRectFill(NSMakeRect(0.0, 0.0, 27.0, 19.0));
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(6.0, 2.0, 15.0, 16.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:1.0
green:0.925 blue:0.0 alpha:1.0] endColor:[CIColor colorWithRed:1.0 green:0.745
blue:0.0 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:1.0 green:0.925 blue:0.0 alpha:1.0] endingColor:[NSColor
colorWithCalibratedRed:1.0 green:0.745 blue:0.0 alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(6.0, 2.0, 15.0, 16.0) angle:90.0];
NSShadow *redShadow = [[NSShadow alloc] init];
[redShadow setShadowBlurRadius:2.0];
[redShadow setShadowOffset:NSZeroSize];
@@ -1269,8 +1268,8 @@
[NSGraphicsContext restoreGraphicsState];
[NSGraphicsContext saveGraphicsState];
[path setClip];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(7.0, 4.0, 13.0, 6.0)];
- [path fillPathVerticallyWithStartColor:[CIColor colorWithRed:0.976
green:0.976 blue:0.976 alpha:1.0] endColor:[CIColor colorWithRed:0.798
green:0.798 blue:0.798 alpha:1.0]];
+ gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedRed:0.976 green:0.976 blue:0.976 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:0.798 green:0.798 blue:0.798
alpha:1.0]] autorelease];
+ [gradient drawInRect:NSMakeRect(7.0, 4.0, 13.0, 6.0) angle:90.0];
[NSGraphicsContext restoreGraphicsState];
[toolbarTextToolImage unlockFocus];
[toolbarTextToolImage setName:SKImageNameToolbarTextTool];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit