Revision: 5700
http://skim-app.svn.sourceforge.net/skim-app/?rev=5700&view=rev
Author: hofman
Date: 2009-09-07 00:34:38 +0000 (Mon, 07 Sep 2009)
Log Message:
-----------
remove CIImage category
Modified Paths:
--------------
trunk/Skim.xcodeproj/project.pbxproj
Removed Paths:
-------------
trunk/CIImage_BDSKExtensions.h
trunk/CIImage_BDSKExtensions.m
Deleted: trunk/CIImage_BDSKExtensions.h
===================================================================
--- trunk/CIImage_BDSKExtensions.h 2009-09-07 00:34:02 UTC (rev 5699)
+++ trunk/CIImage_BDSKExtensions.h 2009-09-07 00:34:38 UTC (rev 5700)
@@ -1,80 +0,0 @@
-//
-// CIImage_BDSKExtensions.h
-// Bibdesk
-//
-// Created by Christiaan Hofman on 5/7/06.
-/*
- This software is Copyright (c) 2005-2009-2008
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <QuartzCore/QuartzCore.h>
-
-
-...@interface CIImage (BDSKExtensions)
-
-+ (CIImage *)imageWithConstantColor:(CIColor *)color;
-
-+ (CIImage *)imageInRect:(CGRect)aRect
withLinearGradientFromPoint:(CGPoint)startPoint toPoint:(CGPoint)endPoint
fromColor:(CIColor *)startColor toColor:(CIColor *)endColor;
-
-+ (CIImage *)imageInRect:(CGRect)aRect
withHorizontalGradientFromColor:(CIColor *)startColor toColor:(CIColor
*)endColor;
-
-+ (CIImage *)imageInRect:(CGRect)aRect withVerticalGradientFromColor:(CIColor
*)startColor toColor:(CIColor *)endColor;
-
-+ (CIImage *)imageWithGaussianGradientWithCenter:(CGPoint)center
radius:(CGFloat)radius fromColor:(CIColor *)startColor toColor:(CIColor
*)endColor;
-
-+ (CIImage *)imageInRect:(CGRect)aRect
withHorizontalGradientFromColor:(CIColor *)fgStartColor toColor:(CIColor
*)fgEndColor blendedAtTop:(BOOL)top ofVerticalGradientFromColor:(CIColor
*)bgStartColor toColor:(CIColor *)bgEndColor;
-
-+ (CIImage *)imageInRect:(CGRect)aRect withVerticalGradientFromColor:(CIColor
*)fgStartColor toColor:(CIColor *)fgEndColor blendedAtRight:(BOOL)right
ofHorizontalGradientFromColor:(CIColor *)bgStartColor toColor:(CIColor
*)bgEndColor;
-
-+ (CIImage *)imageInRect:(CGRect)aRect withColor:(CIColor *)fgColor
blendedAtRight:(BOOL)right ofVerticalGradientFromColor:(CIColor *)bgStartColor
toColor:(CIColor *)bgEndColor;
-
-+ (CIImage *)imageInRect:(CGRect)aRect withColor:(CIColor *)fgColor
blendedAtTop:(BOOL)top ofHorizontalGradientFromColor:(CIColor *)bgStartColor
toColor:(CIColor *)bgEndColor;
-
-- (CIImage *)blendedImageWithBackground:(CIImage *)background
usingMask:(CIImage *)mask;
-
-- (CIImage *)blurredImageWithBlurRadius:(CGFloat)radius;
-
-- (CIImage *)croppedImageWithRect:(CGRect)aRect;
-
-...@end
-
-
-...@interface CIColor (BDSKExtensions)
-
-+ (CIColor *)colorWithWhite:(CGFloat)white;
-
-+ (CIColor *)colorWithNSColor:(NSColor *)color;
-
-+ (CIColor *)clearColor;
-
-...@end
Deleted: trunk/CIImage_BDSKExtensions.m
===================================================================
--- trunk/CIImage_BDSKExtensions.m 2009-09-07 00:34:02 UTC (rev 5699)
+++ trunk/CIImage_BDSKExtensions.m 2009-09-07 00:34:38 UTC (rev 5700)
@@ -1,227 +0,0 @@
-//
-// CIImage_BDSKExtensions.m
-// Bibdesk
-//
-// Created by Christiaan Hofman on 5/7/06.
-/*
- This software is Copyright (c) 2005-2009-2008
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "CIImage_BDSKExtensions.h"
-
-
-...@implementation CIImage (BDSKExtensions)
-
-+ (CIImage *)imageWithConstantColor:(CIColor *)color;
-{
- static CIFilter *colorFilter = nil;
- if (colorFilter == nil)
- colorFilter = [[CIFilter filterWithName:@"CIConstantColorGenerator"]
retain];
-
- [colorFilter setValue:color forKey:@"inputColor"];
-
- return [colorFilter valueForKey:@"outputImage"];
-}
-
-+ (CIImage *)imageInRect:(CGRect)aRect
withLinearGradientFromPoint:(CGPoint)startPoint toPoint:(CGPoint)endPoint
fromColor:(CIColor *)startColor toColor:(CIColor *)endColor;
-{
- static CIFilter *linearFilter = nil;
- if (linearFilter == nil)
- linearFilter = [[CIFilter filterWithName:@"CILinearGradient"] retain];
-
- [linearFilter setValue:startColor forKey:@"inputColor0"];
- [linearFilter setValue:endColor forKey:@"inputColor1"];
-
- [linearFilter setValue:[CIVector vectorWithX:startPoint.x Y:startPoint.y]
forKey:@"inputPoint0"];
- [linearFilter setValue:[CIVector vectorWithX:endPoint.x Y:endPoint.y]
forKey:@"inputPoint1"];
-
- return [linearFilter valueForKey:@"outputImage"];
-}
-
-+ (CIImage *)imageInRect:(CGRect)aRect
withHorizontalGradientFromColor:(CIColor *)startColor toColor:(CIColor
*)endColor;
-{
- CGPoint startPoint = aRect.origin;
- CGPoint endPoint = startPoint;
- endPoint.x += CGRectGetWidth(aRect);
- return [self imageInRect:aRect withLinearGradientFromPoint:startPoint
toPoint:endPoint fromColor:startColor toColor:endColor];
-}
-
-+ (CIImage *)imageInRect:(CGRect)aRect withVerticalGradientFromColor:(CIColor
*)startColor toColor:(CIColor *)endColor;
-{
- CGPoint startPoint = aRect.origin;
- CGPoint endPoint = startPoint;
- endPoint.y += CGRectGetHeight(aRect);
- return [self imageInRect:aRect withLinearGradientFromPoint:startPoint
toPoint:endPoint fromColor:startColor toColor:endColor];
-}
-
-+ (CIImage *)imageWithGaussianGradientWithCenter:(CGPoint)center
radius:(CGFloat)radius fromColor:(CIColor *)startColor toColor:(CIColor
*)endColor;
-{
- static CIFilter *gaussianFilter = nil;
- if (gaussianFilter == nil)
- gaussianFilter = [[CIFilter filterWithName:@"CIGaussianGradient"]
retain];
-
- [gaussianFilter setValue:startColor forKey:@"inputColor0"];
- [gaussianFilter setValue:endColor forKey:@"inputColor1"];
-
- [gaussianFilter setValue:[NSNumber numberWithDouble:radius]
forKey:@"inputRadius"];
- [gaussianFilter setValue:[CIVector vectorWithX:center.x Y:center.y]
forKey:@"inputCenter"];
-
- return [gaussianFilter valueForKey:@"outputImage"];
-}
-
-+ (CIImage *)imageInRect:(CGRect)aRect
withHorizontalGradientFromColor:(CIColor *)fgStartColor toColor:(CIColor
*)fgEndColor blendedAtTop:(BOOL)top ofVerticalGradientFromColor:(CIColor
*)bgStartColor toColor:(CIColor *)bgEndColor;
-{
- CGFloat radius = 0.5f * CGRectGetWidth(aRect);
- CGPoint center = CGPointMake(CGRectGetMidX(aRect), top ?
CGRectGetMaxY(aRect) : CGRectGetMinY(aRect));
-
- CIImage *foreground = [self imageInRect:aRect
withHorizontalGradientFromColor:fgStartColor toColor:fgEndColor];
- CIImage *background = [self imageInRect:aRect
withVerticalGradientFromColor:bgStartColor toColor:bgEndColor];
- CIImage *mask = [self imageWithGaussianGradientWithCenter:center
radius:radius fromColor:[CIColor colorWithWhite:1.0] toColor:[CIColor
colorWithWhite:0.0]];
-
- return [foreground blendedImageWithBackground:background usingMask:mask];
-}
-
-+ (CIImage *)imageInRect:(CGRect)aRect withVerticalGradientFromColor:(CIColor
*)fgStartColor toColor:(CIColor *)fgEndColor blendedAtRight:(BOOL)right
ofHorizontalGradientFromColor:(CIColor *)bgStartColor toColor:(CIColor
*)bgEndColor;
-{
- CGFloat radius = 0.5f * CGRectGetHeight(aRect);
- CGPoint center = CGPointMake(right ? CGRectGetMaxX(aRect) :
CGRectGetMinX(aRect), CGRectGetMidY(aRect));
-
- CIImage *foreground = [self imageInRect:aRect
withVerticalGradientFromColor:fgStartColor toColor:fgEndColor];
- CIImage *background = [self imageInRect:aRect
withHorizontalGradientFromColor:bgStartColor toColor:bgEndColor];
- CIImage *mask = [self imageWithGaussianGradientWithCenter:center
radius:radius fromColor:[CIColor colorWithWhite:1.0] toColor:[CIColor
colorWithWhite:0.0]];
-
- return [foreground blendedImageWithBackground:background usingMask:mask];
-}
-
-+ (CIImage *)imageInRect:(CGRect)aRect withColor:(CIColor *)fgColor
blendedAtRight:(BOOL)right ofVerticalGradientFromColor:(CIColor *)bgStartColor
toColor:(CIColor *)bgEndColor;
-{
- CGFloat startWhite = right ? 1.0 : 0.0;
- CGFloat endWhite = 1.0 - startWhite;
-
- CIImage *foreground = [self imageWithConstantColor:fgColor];
- CIImage *background = [self imageInRect:aRect
withVerticalGradientFromColor:bgStartColor toColor:bgEndColor];
- CIImage *mask = [self imageInRect:aRect
withHorizontalGradientFromColor:[CIColor colorWithWhite:startWhite]
toColor:[CIColor colorWithWhite:endWhite]];
-
- return [foreground blendedImageWithBackground:background usingMask:mask];
-}
-
-+ (CIImage *)imageInRect:(CGRect)aRect withColor:(CIColor *)fgColor
blendedAtTop:(BOOL)top ofHorizontalGradientFromColor:(CIColor *)bgStartColor
toColor:(CIColor *)bgEndColor;
-{
- CGFloat startWhite = top ? 1.0 : 0.0;
- CGFloat endWhite = 1.0 - startWhite;
-
- CIImage *foreground = [self imageWithConstantColor:fgColor];
- CIImage *background = [self imageInRect:aRect
withHorizontalGradientFromColor:bgStartColor toColor:bgEndColor];
- CIImage *mask = [self imageInRect:aRect
withVerticalGradientFromColor:[CIColor colorWithWhite:startWhite]
toColor:[CIColor colorWithWhite:endWhite]];
-
- return [foreground blendedImageWithBackground:background usingMask:mask];
-}
-
-- (CIImage *)blendedImageWithBackground:(CIImage *)background
usingMask:(CIImage *)mask;
-{
- static CIFilter *blendFilter = nil;
- if (blendFilter == nil)
- blendFilter = [[CIFilter filterWithName:@"CIBlendWithMask"] retain];
-
- [blendFilter setValue:self forKey:@"inputImage"];
- [blendFilter setValue:background forKey:@"inputBackgroundImage"];
- [blendFilter setValue:mask forKey:@"inputMaskImage"];
-
- return [blendFilter valueForKey:@"outputImage"];
-}
-
-- (CIImage *)blurredImageWithBlurRadius:(CGFloat)radius;
-{
- static CIFilter *gaussianBlurFilter = nil;
- if (gaussianBlurFilter == nil)
- gaussianBlurFilter = [[CIFilter filterWithName:@"CIGaussianBlur"]
retain];
-
- [gaussianBlurFilter setValue:[NSNumber numberWithDouble:radius]
forKey:@"inputRadius"];
- [gaussianBlurFilter setValue:self forKey:@"inputImage"];
-
- return [gaussianBlurFilter valueForKey:@"outputImage"];
-}
-
-- (CIImage *)croppedImageWithRect:(CGRect)aRect;
-{
- static CIFilter *transformFilter = nil;
- static CIFilter *cropFilter = nil;
- if (transformFilter == nil)
- transformFilter = [[CIFilter filterWithName:@"CIAffineTransform"]
retain];
- if (cropFilter == nil)
- cropFilter = [[CIFilter filterWithName:@"CICrop"] retain];
-
- CIImage *image = self;
-
- if (CGPointEqualToPoint(aRect.origin, CGPointZero) == NO) {
- // shift the cropped rect to the origin
- NSAffineTransform *transform = [NSAffineTransform transform];
- [transform translateXBy:-CGRectGetMinX(aRect)
yBy:-CGRectGetMinY(aRect)];
- [transformFilter setValue:transform forKey:@"inputTransform"];
- [transformFilter setValue:self forKey:@"inputImage"];
-
- image = [transformFilter valueForKey:@"outputImage"];
- }
-
- CIVector *cropVector = [CIVector vectorWithX:0 Y:0 Z:CGRectGetWidth(aRect)
W:CGRectGetHeight(aRect)];
-
- [cropFilter setValue:cropVector forKey:@"inputRectangle"];
- [cropFilter setValue:image forKey:@"inputImage"];
-
- return [cropFilter valueForKey:@"outputImage"];
-}
-
-...@end
-
-
-...@implementation CIColor (BDSKExtensions)
-
-+ (CIColor *)colorWithWhite:(CGFloat)white
-{
- return [self colorWithRed:white green:white blue:white];
-}
-
-+ (CIColor *)colorWithNSColor:(NSColor *)color
-{
- color = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
- return [CIColor colorWithRed:[color redComponent] green:[color
greenComponent] blue:[color blueComponent] alpha:[color alphaComponent]];
-}
-
-+ (CIColor *)clearColor;
-{
- static CIColor *clearColor = nil;
- if (clearColor == nil)
- clearColor = [[self colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.0]
retain];
- return clearColor;
-}
-
-...@end
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2009-09-07 00:34:02 UTC (rev
5699)
+++ trunk/Skim.xcodeproj/project.pbxproj 2009-09-07 00:34:38 UTC (rev
5700)
@@ -114,7 +114,6 @@
CE4D97FD0C3C2BFF002C20CB /* SKColorSwatch.m in Sources */ =
{isa = PBXBuildFile; fileRef = CE4D97FB0C3C2BFF002C20CB /* SKColorSwatch.m */;
};
CE4DA9240B9E190D0039E89C /* Skim Help in Resources */ = {isa =
PBXBuildFile; fileRef = CE4DA9190B9E190D0039E89C /* Skim Help */; };
CE4EBDDA0B7BF3B30091F228 /* SKSideWindow.m in Sources */ = {isa
= PBXBuildFile; fileRef = CE4EBDD90B7BF3B30091F228 /* SKSideWindow.m */; };
- CE4EC8830B7E6E920091F228 /* CIImage_BDSKExtensions.m in Sources
*/ = {isa = PBXBuildFile; fileRef = CE4EC8820B7E6E920091F228 /*
CIImage_BDSKExtensions.m */; };
CE4EC88C0B7E6EDB0091F228 /* SKSplitView.m in Sources */ = {isa
= PBXBuildFile; fileRef = CE4EC88B0B7E6EDB0091F228 /* SKSplitView.m */; };
CE4F9DEE0BC1BE3A005BE0A1 /* Localizable.strings in Resources */
= {isa = PBXBuildFile; fileRef = CE4F9DEC0BC1BE3A005BE0A1 /*
Localizable.strings */; };
CE5163380EAB5EE2009FA237 /* Segment_Cap.tiff in Resources */ =
{isa = PBXBuildFile; fileRef = CE51632C0EAB5EE2009FA237 /* Segment_Cap.tiff */;
};
@@ -611,8 +610,6 @@
CE4EBDD90B7BF3B30091F228 /* SKSideWindow.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKSideWindow.m; sourceTree = "<group>"; };
CE4EC4F30B7E24490091F228 /* SKPreferenceController.h */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path
= SKPreferenceController.h; sourceTree = "<group>"; };
CE4EC4F40B7E24490091F228 /* SKPreferenceController.m */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = SKPreferenceController.m; sourceTree = "<group>"; };
- CE4EC8810B7E6E920091F228 /* CIImage_BDSKExtensions.h */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path
= CIImage_BDSKExtensions.h; sourceTree = "<group>"; };
- CE4EC8820B7E6E920091F228 /* CIImage_BDSKExtensions.m */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = CIImage_BDSKExtensions.m; sourceTree = "<group>"; };
CE4EC88A0B7E6EDB0091F228 /* SKSplitView.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKSplitView.h; sourceTree = "<group>"; };
CE4EC88B0B7E6EDB0091F228 /* SKSplitView.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKSplitView.m; sourceTree = "<group>"; };
CE4F96AE0CFB49B100DBEA14 /* ru */ = {isa = PBXFileReference;
lastKnownFileType = wrapper.nib; name = ru; path = ru.lproj/InfoWindow.nib;
sourceTree = "<group>"; };
@@ -1591,8 +1588,6 @@
CEE1776D0DBDF54000E6C317 /* AppKit Categories */ = {
isa = PBXGroup;
children = (
- CE4EC8810B7E6E920091F228 /*
CIImage_BDSKExtensions.h */,
- CE4EC8820B7E6E920091F228 /*
CIImage_BDSKExtensions.m */,
CE3A45510B7A04A4006B64D3 /*
NSBezierPath_BDSKExtensions.h */,
CE3A45520B7A04A4006B64D3 /*
NSBezierPath_BDSKExtensions.m */,
F968C5A00C036E9D000BD1B2 /*
NSBitmapImageRep_SKExtensions.h */,
@@ -2024,7 +2019,6 @@
CE3A41580B790C56006B64D3 /* BDSKDragImageView.m
in Sources */,
CE3A45530B7A04A4006B64D3 /*
NSBezierPath_BDSKExtensions.m in Sources */,
CE4EBDDA0B7BF3B30091F228 /* SKSideWindow.m in
Sources */,
- CE4EC8830B7E6E920091F228 /*
CIImage_BDSKExtensions.m in Sources */,
CE4EC88C0B7E6EDB0091F228 /* SKSplitView.m in
Sources */,
CE38ECD30B8093B200A1B779 /*
NSString_SKExtensions.m in Sources */,
F9CDD67B0B837A7F006363C3 /*
SKPreferenceController.m in Sources */,
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