Revision: 14642
          http://sourceforge.net/p/skim-app/code/14642
Author:   hofman
Date:     2024-11-05 15:27:46 +0000 (Tue, 05 Nov 2024)
Log Message:
-----------
always set line join to round for icons

Modified Paths:
--------------
    trunk/SkimNotes/SKNPDFAnnotationNote.m

Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m      2024-11-05 15:03:02 UTC (rev 
14641)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m      2024-11-05 15:27:46 UTC (rev 
14642)
@@ -396,7 +396,6 @@
 static inline void drawIconNewParagraph(CGContextRef context, NSRect bounds) {
     bounds = NSInsetRect(bounds, 0.075 * NSWidth(bounds) + 0.5, 0.5);
     CGFloat x = NSMinX(bounds), y = NSMinY(bounds), w = NSWidth(bounds), h = 
NSHeight(bounds);
-    CGContextSetLineJoin(context, kCGLineJoinRound);
     CGPoint points1[3] = {{x + 0.1 * w, y + 0.5 * h},
         {x + 0.5 * w, y + h},
         {x + 0.9 * w, y + 0.5 * h}};
@@ -403,12 +402,13 @@
     CGContextAddLines(context, points1, 3);
     CGContextClosePath(context);
     CGContextDrawPath(context, kCGPathFillStroke);
-    CGPoint points2[4] = {{x + 0.1 * w, y - 0.5},
+    CGContextSetLineCap(context, kCGLineCapRound);
+   CGPoint points2[4] = {{x + 0.1 * w, y},
         {x + 0.1 * w, y + 0.4 * h},
         {x + 0.4 * w, y},
-        {x + 0.4 * w, y + 0.4 * h + 0.5}};
+        {x + 0.4 * w, y + 0.4 * h}};
     CGContextAddLines(context, points2, 4);
-    CGContextMoveToPoint(context, x + 0.6 * w, y - 0.5);
+    CGContextMoveToPoint(context, x + 0.6 * w, y);
     CGContextAddLineToPoint(context, x + 0.6 * w, y + 0.4 * h);
     CGContextAddLineToPoint(context, x + 0.8 * w, y + 0.4 * h);
     CGContextAddCurveToPoint(context, x + (0.8 + 0.1 * KAPPA) * w, y + 0.4 * 
h, x + 0.9 * w, y + (0.3 + 0.1 * KAPPA) * h, x + 0.9 * w, y + 0.3 * h);
@@ -439,7 +439,6 @@
 static inline void drawIconInsert(CGContextRef context, NSRect bounds) {
     bounds = NSInsetRect(bounds, 0.5, 0.5);
     CGFloat x = NSMinX(bounds), y = NSMinY(bounds), w = NSWidth(bounds), h = 
NSHeight(bounds);
-    CGContextSetLineJoin(context, kCGLineJoinRound);
     CGContextMoveToPoint(context, x, y);
     CGContextAddLineToPoint(context, x + 0.5 * w, y + h);
     CGContextAddLineToPoint(context, x + w, y);
@@ -450,7 +449,7 @@
 static inline void drawIcon(CGContextRef context, NSRect bounds, 
PDFTextAnnotationIconType iconType) {
     CGContextSetLineWidth(context, 1.0);
     CGContextSetLineCap(context, kCGLineCapButt);
-    CGContextSetLineJoin(context, kCGLineJoinMiter);
+    CGContextSetLineJoin(context, kCGLineJoinRound);
     CGContextClipToRect(context, NSRectToCGRect(bounds));
     switch (iconType) {
         case kPDFTextAnnotationIconComment:      drawIconComment(context, 
bounds);      break;

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

Reply via email to