Revision: 14410
http://sourceforge.net/p/skim-app/code/14410
Author: hofman
Date: 2024-08-02 16:27:19 +0000 (Fri, 02 Aug 2024)
Log Message:
-----------
draw camera cursor more like the screenshot cursor
Modified Paths:
--------------
trunk/NSCursor_SKExtensions.m
Modified: trunk/NSCursor_SKExtensions.m
===================================================================
--- trunk/NSCursor_SKExtensions.m 2024-08-01 14:35:47 UTC (rev 14409)
+++ trunk/NSCursor_SKExtensions.m 2024-08-02 16:27:19 UTC (rev 14410)
@@ -292,29 +292,50 @@
cursor = [[NSCursor alloc] initWithImage:image hotSpot:hotspot];
[customCursors setObject:cursor forKey:@"zoomOutCursor"];
- hotspot = NSMakePoint(9.0, 8.0);
+ hotspot = NSMakePoint(9.0, 7.0);
- image = [[NSImage alloc] initPDFWithSize:NSMakeSize(18.0, 16.0)
drawingHandler:^(NSRect dstRect){
+ image = [[NSImage alloc] initPDFWithSize:NSMakeSize(18.0, 15.0)
drawingHandler:^(NSRect dstRect){
+ NSBezierPath *path = [NSBezierPath bezierPath];
+ [path moveToPoint:NSMakePoint(14.0, 12.0)];
+ [path lineToPoint:NSMakePoint(13.5, 12.0)];
+ [path curveToPoint:NSMakePoint(12.5, 14.0)
controlPoint1:NSMakePoint(13.0, 12.0) controlPoint2:NSMakePoint(13.0, 12.0)];
+ [path curveToPoint:NSMakePoint(11.5, 14.0)
controlPoint1:NSMakePoint(12.0, 14.0) controlPoint2:NSMakePoint(12.0, 14.0)];
+ [path lineToPoint:NSMakePoint(6.5, 14.0)];
+ [path curveToPoint:NSMakePoint(5.5, 13.0)
controlPoint1:NSMakePoint(6.0, 14.0) controlPoint2:NSMakePoint(6.0, 14.0)];
+ [path curveToPoint:NSMakePoint(4.5, 12.0)
controlPoint1:NSMakePoint(5.0, 12.0) controlPoint2:NSMakePoint(5.0, 12.0)];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(1.0, 12.0)
toPoint:NSMakePoint(1.0, 10.0) radius:3.0];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(1.0, 2.0)
toPoint:NSMakePoint(4.0, 2.0) radius:3.0];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(17.0, 2.0)
toPoint:NSMakePoint(17.0, 5.0) radius:3.0];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(17.0, 12.0)
toPoint:NSMakePoint(11.0, 12.0) radius:3.0];
+ [path closePath];
+ [NSGraphicsContext saveGraphicsState];
[cursorOutline set];
- NSBezierPath *path = [NSBezierPath
bezierPathWithRect:NSMakeRect(1.0, 2.0, 16.0, 11.0)];
- [path appendBezierPathWithOvalInRect:NSMakeRect(4.7, 6.7, 8.6,
8.6)];
- [NSGraphicsContext saveGraphicsState];
[NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0
yOffset:-1.0];
[path fill];
[NSGraphicsContext restoreGraphicsState];
[cursorFill set];
- path = [NSBezierPath bezierPathWithRect:NSMakeRect(2.0, 3.0, 14.0,
9.0)];
- [path appendBezierPathWithOvalInRect:NSMakeRect(6.0, 8.0, 6.0,
6.0)];
- [path fill];
- [cursorOutline set];
- [[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(5.3, 4.3, 7.4,
7.4)] stroke];
path = [NSBezierPath bezierPath];
- [path appendBezierPathWithArcWithCenter:NSMakePoint(9.0, 8.0)
radius:1.8 startAngle:45.0 endAngle:225.0];
+ [path moveToPoint:NSMakePoint(14.0, 11.0)];
+ [path lineToPoint:NSMakePoint(13.0, 11.0)];
+ [path curveToPoint:NSMakePoint(12.0, 12.0)
controlPoint1:NSMakePoint(12.5, 11.0) controlPoint2:NSMakePoint(12.5, 11.0)];
+ [path curveToPoint:NSMakePoint(11.0, 13.0)
controlPoint1:NSMakePoint(11.5, 13.0) controlPoint2:NSMakePoint(11.5, 13.0)];
+ [path lineToPoint:NSMakePoint(7.0, 13.0)];
+ [path curveToPoint:NSMakePoint(6.0, 12.0)
controlPoint1:NSMakePoint(6.5, 13.0) controlPoint2:NSMakePoint(6.5, 13.0)];
+ [path curveToPoint:NSMakePoint(5.0, 11.0)
controlPoint1:NSMakePoint(5.5, 11.0) controlPoint2:NSMakePoint(5.5, 11.0)];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(2.0, 11.0)
toPoint:NSMakePoint(2.0, 9.0) radius:2.0];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(2.0, 3.0)
toPoint:NSMakePoint(4.0, 3.0) radius:2.0];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(16.0, 3.0)
toPoint:NSMakePoint(16.0, 5.0) radius:2.0];
+ [path appendBezierPathWithArcFromPoint:NSMakePoint(16.0, 11.0)
toPoint:NSMakePoint(14.0, 11.0) radius:2.0];
[path closePath];
+ [path appendBezierPathWithOvalInRect:NSMakeRect(6.0, 5.0, 6.0,
6.0)];
+ [path appendBezierPathWithOvalInRect:NSMakeRect(7.5, 6.5, 3.0,
3.0)];
+ [path setWindingRule:NSEvenOddWindingRule];
[path fill];
+
}];
cursor = [[NSCursor alloc] initWithImage:image hotSpot:hotspot];
[customCursors setObject:cursor forKey:@"cameraCursor"];
+ [image.TIFFRepresentation
writeToFile:@"/Users/hofman/Desktop/camera.tiff" atomically:YES];
hotspot = NSMakePoint(16.0, 16.0);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit