Revision: 5716
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5716&view=rev
Author:   hofman
Date:     2009-09-08 16:17:36 +0000 (Tue, 08 Sep 2009)

Log Message:
-----------
rename category

Modified Paths:
--------------
    trunk/NSImage_SKExtensions.m
    trunk/PDFAnnotationInk_SKExtensions.m
    trunk/PDFAnnotation_SKExtensions.m
    trunk/SKMainWindowController.m
    trunk/SKNavigationWindow.m
    trunk/SKPDFToolTipWindow.m
    trunk/SKPDFView.m
    trunk/SKRemoteStateWindow.m
    trunk/SKSideWindow.m
    trunk/Skim.xcodeproj/project.pbxproj

Added Paths:
-----------
    trunk/NSBezierPath_SKExtensions.h
    trunk/NSBezierPath_SKExtensions.m

Removed Paths:
-------------
    trunk/NSBezierPath_BDSKExtensions.h
    trunk/NSBezierPath_BDSKExtensions.m

Deleted: trunk/NSBezierPath_BDSKExtensions.h
===================================================================
--- trunk/NSBezierPath_BDSKExtensions.h 2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/NSBezierPath_BDSKExtensions.h 2009-09-08 16:17:36 UTC (rev 5716)
@@ -1,58 +0,0 @@
-//
-//  NSBezierPath_BDSKExtensions.h
-//  Bibdesk
-//
-//  Created by Adam Maxwell on 10/22/05.
-/*
- This software is Copyright (c) 2005-2009-2008
- Adam Maxwell. 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 Adam Maxwell 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>
-
-
-...@interface NSBezierPath (BDSKExtensions)
-
-+ (void)fillLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
-+ (void)strokeLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
-+ (NSBezierPath *)bezierPathWithLeftRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius;
-+ (void)fillRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
-+ (void)strokeRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
-+ (NSBezierPath *)bezierPathWithRightRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius;
-
-+ (void)fillHorizontalOvalAroundRect:(NSRect)rect;
-+ (void)strokeHorizontalOvalAroundRect:(NSRect)rect;
-+ (NSBezierPath*)bezierPathWithHorizontalOvalAroundRect:(NSRect)rect;
-
-- (NSRect)nonEmptyBounds;
-
-- (NSPoint)associatedPointForElementAtIndex:(NSUInteger)anIndex;
-
-...@end

Deleted: trunk/NSBezierPath_BDSKExtensions.m
===================================================================
--- trunk/NSBezierPath_BDSKExtensions.m 2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/NSBezierPath_BDSKExtensions.m 2009-09-08 16:17:36 UTC (rev 5716)
@@ -1,196 +0,0 @@
-//
-//  NSBezierPath_BDSKExtensions.m
-//  Bibdesk
-//
-//  Created by Adam Maxwell on 10/22/05.
-/*
- This software is Copyright (c) 2005-2009-2008
- Adam Maxwell. 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 Adam Maxwell 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 "NSBezierPath_BDSKExtensions.h"
-
-
-...@implementation NSBezierPath (BDSKExtensions)
-
-// code from http://www.cocoadev.com/index.pl?NSBezierPathCategory
-// removed UK rect function calls, changed spacing/alignment
-
-+ (void)fillLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
-{
-    NSBezierPath *p = [self bezierPathWithLeftRoundRectInRect:rect 
radius:radius];
-    [p fill];
-}
-
-
-+ (void)strokeLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
-{
-    NSBezierPath *p = [self bezierPathWithLeftRoundRectInRect:rect 
radius:radius];
-    [p stroke];
-}
-
-+ (NSBezierPath *)bezierPathWithLeftRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius
-{
-    // Make sure radius doesn't exceed a maximum size to avoid artifacts:
-    radius = SKMin(radius, SKMin(0.5f * NSHeight(rect), NSWidth(rect)));
-    
-    // Make sure silly values simply lead to un-rounded corners:
-    if( radius <= 0 )
-        return [self bezierPathWithRect:rect];
-    
-    NSRect ignored, innerRect;
-    NSDivideRect(NSInsetRect(rect, 0.0, radius), &ignored, &innerRect, radius, 
NSMinXEdge); // Make rect with corners being centers of the corner circles.
-    NSBezierPath *path = [self bezierPath];
-    
-    [path removeAllPoints];    
-    
-    // Now draw our rectangle:
-    [path moveToPoint: NSMakePoint(NSMaxX(rect), NSMinY(rect))];
-    
-    // Right edge:
-    [path lineToPoint:NSMakePoint(NSMaxX(rect), NSMaxY(rect))];
-    // Top edge and top left:
-    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(innerRect), 
NSMaxY(innerRect)) radius:radius startAngle:90.0  endAngle:180.0];
-    // Left edge and bottom left:
-    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(innerRect), 
NSMinY(innerRect)) radius:radius startAngle:180.0  endAngle:270.0 ];
-    // Bottom edge:
-    [path closePath];
-    
-    return path;
-}
-
-+ (void)fillRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
-{
-    NSBezierPath *p = [self bezierPathWithRightRoundRectInRect:rect 
radius:radius];
-    [p fill];
-}
-
-
-+ (void)strokeRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
-{
-    NSBezierPath *p = [self bezierPathWithRightRoundRectInRect:rect 
radius:radius];
-    [p stroke];
-}
-
-+ (NSBezierPath *)bezierPathWithRightRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius
-{
-    // Make sure radius doesn't exceed a maximum size to avoid artifacts:
-    radius = SKMin(radius, SKMin(0.5f * NSHeight(rect), NSWidth(rect)));
-    
-    // Make sure silly values simply lead to un-rounded corners:
-    if( radius <= 0 )
-        return [self bezierPathWithRect:rect];
-    
-    NSRect ignored, innerRect;
-    NSDivideRect(NSInsetRect(rect, 0.0, radius), &ignored, &innerRect, radius, 
NSMaxXEdge); // Make rect with corners being centers of the corner circles.
-    NSBezierPath *path = [self bezierPath];
-    
-    [path removeAllPoints];    
-    
-    // Now draw our rectangle:
-    [path moveToPoint: NSMakePoint(NSMinX(rect), NSMaxY(rect))];
-    
-    // Left edge:
-    [path lineToPoint:NSMakePoint(NSMinX(rect), NSMinY(rect))];
-    // Bottom edge and bottom right:
-    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(innerRect), 
NSMinY(innerRect)) radius:radius startAngle:270.0 endAngle:360.0];
-    // Right edge and top right:
-    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(innerRect), 
NSMaxY(innerRect)) radius:radius startAngle:0.0  endAngle:90.0 ];
-    // Top edge:
-    [path closePath];
-    
-    return path;
-}
-
-+ (void)fillHorizontalOvalAroundRect:(NSRect)rect
-{
-    NSBezierPath *p = [self bezierPathWithHorizontalOvalAroundRect:rect];
-    [p fill];
-}
-
-
-+ (void)strokeHorizontalOvalAroundRect:(NSRect)rect
-{
-    NSBezierPath *p = [self bezierPathWithHorizontalOvalAroundRect:rect];
-    [p stroke];
-}
-
-+ (NSBezierPath *)bezierPathWithHorizontalOvalAroundRect:(NSRect)rect
-{
-    CGFloat radius = 0.5f * rect.size.height;
-    NSBezierPath *path = [self bezierPath];
-    
-    [path removeAllPoints];
-    
-    // Now draw our rectangle:
-    [path moveToPoint: NSMakePoint(NSMinX(rect), NSMaxY(rect))];
-    
-    // Left half circle:
-    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(rect), 
NSMidY(rect)) radius:radius startAngle:90.0 endAngle:270.0];
-    // Bottom edge and right half circle:
-    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(rect), 
NSMidY(rect)) radius:radius startAngle:-90.0 endAngle:90.0];
-    // Top edge:
-    [path closePath];
-    
-    return path;
-}
-
-- (NSPoint)associatedPointForElementAtIndex:(NSUInteger)anIndex {
-    NSPoint points[3];
-    if (NSCurveToBezierPathElement == [self elementAtIndex:anIndex 
associatedPoints:points])
-        return points[2];
-    else
-        return points[0];
-}
-
-- (NSRect)nonEmptyBounds {
-    NSRect bounds = [self bounds];
-    if (NSIsEmptyRect(bounds) && [self elementCount]) {
-        NSPoint point, minPoint = NSZeroPoint, maxPoint = NSZeroPoint;
-        NSUInteger i, count = [self elementCount];
-        for (i = 0; i < count; i++) {
-            point = [self associatedPointForElementAtIndex:i];
-            if (i == 0) {
-                minPoint = maxPoint = point;
-            } else {
-                minPoint.x = SKMin(minPoint.x, point.x);
-                minPoint.y = SKMin(minPoint.y, point.y);
-                maxPoint.x = SKMax(maxPoint.x, point.x);
-                maxPoint.y = SKMax(maxPoint.y, point.y);
-            }
-        }
-        bounds = NSMakeRect(minPoint.x - 0.1, minPoint.y - 0.1, maxPoint.x - 
minPoint.x + 0.2, maxPoint.y - minPoint.y + 0.2);
-    }
-    return bounds;
-}
-
-...@end
-

Copied: trunk/NSBezierPath_SKExtensions.h (from rev 5715, 
trunk/NSBezierPath_BDSKExtensions.h)
===================================================================
--- trunk/NSBezierPath_SKExtensions.h                           (rev 0)
+++ trunk/NSBezierPath_SKExtensions.h   2009-09-08 16:17:36 UTC (rev 5716)
@@ -0,0 +1,58 @@
+//
+//  NSBezierPath_SKExtensions.h
+//  Bibdesk
+//
+//  Created by Adam Maxwell on 10/22/05.
+/*
+ This software is Copyright (c) 2005-2009-2008
+ Adam Maxwell. 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 Adam Maxwell 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>
+
+
+...@interface NSBezierPath (SKExtensions)
+
++ (void)fillLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
++ (void)strokeLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
++ (NSBezierPath *)bezierPathWithLeftRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius;
++ (void)fillRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
++ (void)strokeRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius;
++ (NSBezierPath *)bezierPathWithRightRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius;
+
++ (void)fillHorizontalOvalAroundRect:(NSRect)rect;
++ (void)strokeHorizontalOvalAroundRect:(NSRect)rect;
++ (NSBezierPath*)bezierPathWithHorizontalOvalAroundRect:(NSRect)rect;
+
+- (NSRect)nonEmptyBounds;
+
+- (NSPoint)associatedPointForElementAtIndex:(NSUInteger)anIndex;
+
+...@end

Copied: trunk/NSBezierPath_SKExtensions.m (from rev 5715, 
trunk/NSBezierPath_BDSKExtensions.m)
===================================================================
--- trunk/NSBezierPath_SKExtensions.m                           (rev 0)
+++ trunk/NSBezierPath_SKExtensions.m   2009-09-08 16:17:36 UTC (rev 5716)
@@ -0,0 +1,189 @@
+//
+//  NSBezierPath_SKExtensions.m
+//  Bibdesk
+//
+//  Created by Adam Maxwell on 10/22/05.
+/*
+ This software is Copyright (c) 2005-2009-2008
+ Adam Maxwell. 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 Adam Maxwell 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 "NSBezierPath_SKExtensions.h"
+
+
+...@implementation NSBezierPath (SKExtensions)
+
++ (void)fillLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
+{
+    NSBezierPath *p = [self bezierPathWithLeftRoundRectInRect:rect 
radius:radius];
+    [p fill];
+}
+
+
++ (void)strokeLeftRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
+{
+    NSBezierPath *p = [self bezierPathWithLeftRoundRectInRect:rect 
radius:radius];
+    [p stroke];
+}
+
++ (NSBezierPath *)bezierPathWithLeftRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius
+{
+    // Make sure radius doesn't exceed a maximum size to avoid artifacts:
+    radius = SKMin(radius, SKMin(0.5f * NSHeight(rect), NSWidth(rect)));
+    
+    // Make sure silly values simply lead to un-rounded corners:
+    if( radius <= 0 )
+        return [self bezierPathWithRect:rect];
+    
+    NSRect ignored, innerRect;
+    NSDivideRect(NSInsetRect(rect, 0.0, radius), &ignored, &innerRect, radius, 
NSMinXEdge); // Make rect with corners being centers of the corner circles.
+    NSBezierPath *path = [self bezierPath];
+    
+    // Now draw our rectangle:
+    [path moveToPoint: NSMakePoint(NSMaxX(rect), NSMinY(rect))];
+    
+    // Right edge:
+    [path lineToPoint:NSMakePoint(NSMaxX(rect), NSMaxY(rect))];
+    // Top edge and top left:
+    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(innerRect), 
NSMaxY(innerRect)) radius:radius startAngle:90.0  endAngle:180.0];
+    // Left edge and bottom left:
+    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(innerRect), 
NSMinY(innerRect)) radius:radius startAngle:180.0  endAngle:270.0 ];
+    // Bottom edge:
+    [path closePath];
+    
+    return path;
+}
+
++ (void)fillRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
+{
+    NSBezierPath *p = [self bezierPathWithRightRoundRectInRect:rect 
radius:radius];
+    [p fill];
+}
+
+
++ (void)strokeRightRoundRectInRect:(NSRect)rect radius:(CGFloat)radius
+{
+    NSBezierPath *p = [self bezierPathWithRightRoundRectInRect:rect 
radius:radius];
+    [p stroke];
+}
+
++ (NSBezierPath *)bezierPathWithRightRoundRectInRect:(NSRect)rect 
radius:(CGFloat)radius
+{
+    // Make sure radius doesn't exceed a maximum size to avoid artifacts:
+    radius = SKMin(radius, SKMin(0.5f * NSHeight(rect), NSWidth(rect)));
+    
+    // Make sure silly values simply lead to un-rounded corners:
+    if( radius <= 0 )
+        return [self bezierPathWithRect:rect];
+    
+    NSRect ignored, innerRect;
+    NSDivideRect(NSInsetRect(rect, 0.0, radius), &ignored, &innerRect, radius, 
NSMaxXEdge); // Make rect with corners being centers of the corner circles.
+    NSBezierPath *path = [self bezierPath];
+    
+    // Now draw our rectangle:
+    [path moveToPoint: NSMakePoint(NSMinX(rect), NSMaxY(rect))];
+    
+    // Left edge:
+    [path lineToPoint:NSMakePoint(NSMinX(rect), NSMinY(rect))];
+    // Bottom edge and bottom right:
+    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(innerRect), 
NSMinY(innerRect)) radius:radius startAngle:270.0 endAngle:360.0];
+    // Right edge and top right:
+    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(innerRect), 
NSMaxY(innerRect)) radius:radius startAngle:0.0  endAngle:90.0 ];
+    // Top edge:
+    [path closePath];
+    
+    return path;
+}
+
++ (void)fillHorizontalOvalAroundRect:(NSRect)rect
+{
+    NSBezierPath *p = [self bezierPathWithHorizontalOvalAroundRect:rect];
+    [p fill];
+}
+
+
++ (void)strokeHorizontalOvalAroundRect:(NSRect)rect
+{
+    NSBezierPath *p = [self bezierPathWithHorizontalOvalAroundRect:rect];
+    [p stroke];
+}
+
++ (NSBezierPath *)bezierPathWithHorizontalOvalAroundRect:(NSRect)rect
+{
+    CGFloat radius = 0.5f * rect.size.height;
+    NSBezierPath *path = [self bezierPath];
+    
+    [path removeAllPoints];
+    
+    // Now draw our rectangle:
+    [path moveToPoint: NSMakePoint(NSMinX(rect), NSMaxY(rect))];
+    
+    // Left half circle:
+    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(rect), 
NSMidY(rect)) radius:radius startAngle:90.0 endAngle:270.0];
+    // Bottom edge and right half circle:
+    [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(rect), 
NSMidY(rect)) radius:radius startAngle:-90.0 endAngle:90.0];
+    // Top edge:
+    [path closePath];
+    
+    return path;
+}
+
+- (NSPoint)associatedPointForElementAtIndex:(NSUInteger)anIndex {
+    NSPoint points[3];
+    if (NSCurveToBezierPathElement == [self elementAtIndex:anIndex 
associatedPoints:points])
+        return points[2];
+    else
+        return points[0];
+}
+
+- (NSRect)nonEmptyBounds {
+    NSRect bounds = [self bounds];
+    if (NSIsEmptyRect(bounds) && [self elementCount]) {
+        NSPoint point, minPoint = NSZeroPoint, maxPoint = NSZeroPoint;
+        NSUInteger i, count = [self elementCount];
+        for (i = 0; i < count; i++) {
+            point = [self associatedPointForElementAtIndex:i];
+            if (i == 0) {
+                minPoint = maxPoint = point;
+            } else {
+                minPoint.x = SKMin(minPoint.x, point.x);
+                minPoint.y = SKMin(minPoint.y, point.y);
+                maxPoint.x = SKMax(maxPoint.x, point.x);
+                maxPoint.y = SKMax(maxPoint.y, point.y);
+            }
+        }
+        bounds = NSMakeRect(minPoint.x - 0.1, minPoint.y - 0.1, maxPoint.x - 
minPoint.x + 0.2, maxPoint.y - minPoint.y + 0.2);
+    }
+    return bounds;
+}
+
+...@end
+

Modified: trunk/NSImage_SKExtensions.m
===================================================================
--- trunk/NSImage_SKExtensions.m        2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/NSImage_SKExtensions.m        2009-09-08 16:17:36 UTC (rev 5716)
@@ -37,7 +37,7 @@
  */
 
 #import "NSImage_SKExtensions.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 
 @implementation NSImage (SKExtensions)
 

Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m       2009-09-08 16:15:07 UTC (rev 
5715)
+++ trunk/PDFAnnotationInk_SKExtensions.m       2009-09-08 16:17:36 UTC (rev 
5716)
@@ -44,7 +44,7 @@
 #import "NSUserDefaults_SKExtensions.h"
 #import "NSGeometry_SKExtensions.h"
 #import "NSData_SKExtensions.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 
 NSString *SKPDFAnnotationScriptingPointListsKey = @"scriptingPointLists";
 

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/PDFAnnotation_SKExtensions.m  2009-09-08 16:17:36 UTC (rev 5716)
@@ -55,7 +55,7 @@
 #import "NSGeometry_SKExtensions.h"
 #import "NSData_SKExtensions.h"
 #import "NSString_SKExtensions.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 
 
 FourCharCode SKScriptingBorderStyleFromBorderStyle(PDFBorderStyle borderStyle) 
{

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/SKMainWindowController.m      2009-09-08 16:17:36 UTC (rev 5716)
@@ -63,7 +63,7 @@
 #import "SKPDFAnnotationTemporary.h"
 #import "SKSplitView.h"
 #import "NSScrollView_SKExtensions.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 #import "NSUserDefaultsController_SKExtensions.h"
 #import "NSUserDefaults_SKExtensions.h"
 #import "SKTocOutlineView.h"

Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m  2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/SKNavigationWindow.m  2009-09-08 16:17:36 UTC (rev 5716)
@@ -38,7 +38,7 @@
 
 #import "SKNavigationWindow.h"
 #import <Quartz/Quartz.h>
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 #import "SKMainWindowController.h"
 #import "NSParagraphStyle_SKExtensions.h"
 

Modified: trunk/SKPDFToolTipWindow.m
===================================================================
--- trunk/SKPDFToolTipWindow.m  2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/SKPDFToolTipWindow.m  2009-09-08 16:17:36 UTC (rev 5716)
@@ -40,7 +40,7 @@
 #import "PDFPage_SKExtensions.h"
 #import <SkimNotes/SkimNotes.h>
 #import "PDFAnnotation_SKExtensions.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 #import "NSParagraphStyle_SKExtensions.h"
 #import "NSGeometry_SKExtensions.h"
 #import "NSAffineTransform_SKExtensions.h"

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/SKPDFView.m   2009-09-08 16:17:36 UTC (rev 5716)
@@ -56,7 +56,7 @@
 #import "SKMainDocument.h"
 #import "SKPDFSynchronizer.h"
 #import "PDFSelection_SKExtensions.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 #import "SKLineWell.h"
 #import <CoreServices/CoreServices.h>
 #import "NSGeometry_SKExtensions.h"

Modified: trunk/SKRemoteStateWindow.m
===================================================================
--- trunk/SKRemoteStateWindow.m 2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/SKRemoteStateWindow.m 2009-09-08 16:17:36 UTC (rev 5716)
@@ -38,7 +38,7 @@
 
 #import "SKRemoteStateWindow.h"
 #import "NSGeometry_SKExtensions.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 #import "SKStringConstants.h"
 
 #define ALPHA_VALUE 0.95

Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m        2009-09-08 16:15:07 UTC (rev 5715)
+++ trunk/SKSideWindow.m        2009-09-08 16:17:36 UTC (rev 5716)
@@ -38,7 +38,7 @@
 
 #import "SKSideWindow.h"
 #import "SKMainWindowController.h"
-#import "NSBezierPath_BDSKExtensions.h"
+#import "NSBezierPath_SKExtensions.h"
 #import "NSEvent_SKExtensions.h"
 #import "SKRuntime.h"
 

Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj        2009-09-08 16:15:07 UTC (rev 
5715)
+++ trunk/Skim.xcodeproj/project.pbxproj        2009-09-08 16:17:36 UTC (rev 
5716)
@@ -90,7 +90,7 @@
                CE39C6E70E9BCA7B003FF992 /* NotesDocument.nib in Resources */ = 
{isa = PBXBuildFile; fileRef = CE39C6E60E9BCA7B003FF992 /* NotesDocument.nib 
*/; };
                CE3A3D2C0B78C0A0006B64D3 /* SKNPDFAnnotationNote_SKExtensions.m 
in Sources */ = {isa = PBXBuildFile; fileRef = CE3A3D2B0B78C0A0006B64D3 /* 
SKNPDFAnnotationNote_SKExtensions.m */; };
                CE3A41580B790C56006B64D3 /* BDSKDragImageView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = CE3A41570B790C56006B64D3 /* BDSKDragImageView.m 
*/; };
-               CE3A45530B7A04A4006B64D3 /* NSBezierPath_BDSKExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CE3A45520B7A04A4006B64D3 /* 
NSBezierPath_BDSKExtensions.m */; };
+               CE3A45530B7A04A4006B64D3 /* NSBezierPath_SKExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CE3A45520B7A04A4006B64D3 /* 
NSBezierPath_SKExtensions.m */; };
                CE41A6CC0B975E5000ECF819 /* Skim.sdef in Resources */ = {isa = 
PBXBuildFile; fileRef = CE41A6CB0B975E5000ECF819 /* Skim.sdef */; };
                CE41B2A70C08CFA900E36EB7 /* NSArray_SKExtensions.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = CE41B2A50C08CFA900E36EB7 /* 
NSArray_SKExtensions.m */; };
                CE41B2CC0C08D17100E36EB7 /* NSValue_SKExtensions.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = CE41B2CA0C08D17100E36EB7 /* 
NSValue_SKExtensions.m */; };
@@ -551,8 +551,8 @@
                CE3A3D2B0B78C0A0006B64D3 /* SKNPDFAnnotationNote_SKExtensions.m 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = SKNPDFAnnotationNote_SKExtensions.m; sourceTree = 
"<group>"; };
                CE3A41560B790C56006B64D3 /* BDSKDragImageView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
BDSKDragImageView.h; sourceTree = "<group>"; };
                CE3A41570B790C56006B64D3 /* BDSKDragImageView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= BDSKDragImageView.m; sourceTree = "<group>"; };
-               CE3A45510B7A04A4006B64D3 /* NSBezierPath_BDSKExtensions.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = NSBezierPath_BDSKExtensions.h; sourceTree = "<group>"; };
-               CE3A45520B7A04A4006B64D3 /* NSBezierPath_BDSKExtensions.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = NSBezierPath_BDSKExtensions.m; sourceTree = 
"<group>"; };
+               CE3A45510B7A04A4006B64D3 /* NSBezierPath_SKExtensions.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = NSBezierPath_SKExtensions.h; sourceTree = "<group>"; };
+               CE3A45520B7A04A4006B64D3 /* NSBezierPath_SKExtensions.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = NSBezierPath_SKExtensions.m; sourceTree = "<group>"; 
};
                CE41A6CB0B975E5000ECF819 /* Skim.sdef */ = {isa = 
PBXFileReference; explicitFileType = text.sdef; fileEncoding = 4; path = 
Skim.sdef; sourceTree = "<group>"; };
                CE41B2A40C08CFA900E36EB7 /* NSArray_SKExtensions.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
NSArray_SKExtensions.h; sourceTree = "<group>"; };
                CE41B2A50C08CFA900E36EB7 /* NSArray_SKExtensions.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= NSArray_SKExtensions.m; sourceTree = "<group>"; };
@@ -1588,8 +1588,8 @@
                CEE1776D0DBDF54000E6C317 /* AppKit Categories */ = {
                        isa = PBXGroup;
                        children = (
-                               CE3A45510B7A04A4006B64D3 /* 
NSBezierPath_BDSKExtensions.h */,
-                               CE3A45520B7A04A4006B64D3 /* 
NSBezierPath_BDSKExtensions.m */,
+                               CE3A45510B7A04A4006B64D3 /* 
NSBezierPath_SKExtensions.h */,
+                               CE3A45520B7A04A4006B64D3 /* 
NSBezierPath_SKExtensions.m */,
                                F968C5A00C036E9D000BD1B2 /* 
NSBitmapImageRep_SKExtensions.h */,
                                F968C5A10C036E9D000BD1B2 /* 
NSBitmapImageRep_SKExtensions.m */,
                                CE7C204D0C259A5D0059E08C /* 
NSColor_SKExtensions.h */,
@@ -2017,7 +2017,7 @@
                                453DC2770B4F242200A72509 /* BDAlias.m in 
Sources */,
                                CE3A3D2C0B78C0A0006B64D3 /* 
SKNPDFAnnotationNote_SKExtensions.m in Sources */,
                                CE3A41580B790C56006B64D3 /* BDSKDragImageView.m 
in Sources */,
-                               CE3A45530B7A04A4006B64D3 /* 
NSBezierPath_BDSKExtensions.m in Sources */,
+                               CE3A45530B7A04A4006B64D3 /* 
NSBezierPath_SKExtensions.m in Sources */,
                                CE4EBDDA0B7BF3B30091F228 /* SKSideWindow.m in 
Sources */,
                                CE4EC88C0B7E6EDB0091F228 /* SKSplitView.m in 
Sources */,
                                CE38ECD30B8093B200A1B779 /* 
NSString_SKExtensions.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

Reply via email to