Revision: 16809
          http://sourceforge.net/p/skim-app/code/16809
Author:   hofman
Date:     2026-11-25 17:11:34 +0000 (Wed, 25 Nov 2026)
Log Message:
-----------
get intermediate border

Modified Paths:
--------------
    trunk/PDFAnnotation_SKExtensions.m

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2026-11-25 16:56:32 UTC (rev 16808)
+++ trunk/PDFAnnotation_SKExtensions.m  2026-11-25 17:11:34 UTC (rev 16809)
@@ -890,6 +890,7 @@
 
 - (void)drawShadowWithUnitWidth:(CGFloat)unitWidth 
inContext:(CGContextRef)context {
     NSRect bounds = [self bounds];
+    PDFBorder *border = [self border];
     CGFloat r = fmin(2.0, 2.0 * unitWidth);
     CGRect rect = NSRectToCGRect(NSInsetRect(bounds, 2.0 * r, 2.0 * r));
     CGAffineTransform t = CGAffineTransformConcat(CGContextGetCTM(context), 
CGAffineTransformInvert(CGContextGetBaseCTM_func(context)));
@@ -901,9 +902,9 @@
     CGContextSaveGState(context);
     CGContextSetAlpha(context, [[self color] alphaComponent]);
     CGContextBeginTransparencyLayerWithRect(context, rect, NULL);
-    CGContextSetLineWidth(context, [self lineWidth]);
-    if ([self borderStyle] == kPDFBorderStyleDashed) {
-        NSArray *dashPattern = [self dashPattern];
+    CGContextSetLineWidth(context, border ? [border lineWidth] : 0.0);
+    if ([border style] == kPDFBorderStyleDashed) {
+        NSArray *dashPattern = [border dashPattern];
         NSUInteger i, count = [dashPattern count];
         CGFloat pattern[count];
         for (i = 0; i < count; i++)
@@ -936,6 +937,7 @@
         default:  offset.height = -r; break;
     }
     NSRect bounds = [self bounds];
+    PDFBorder *border = [self border];
     NSRect rect = NSIntersectionRect(NSOffsetRect(NSInsetRect(bounds, -r * 
unitWidth, -r * unitWidth), offset.width * unitWidth, offset.height * 
unitWidth), NSRectFromCGRect(CGContextGetClipBoundingBox(context)));
     if (NSIsEmptyRect(rect) == NO) {
         NSRect imgRect = NSMakeRect(0.0, 0.0, ceil(NSWidth(rect) / unitWidth), 
ceil(NSHeight(rect) / unitWidth));
@@ -948,10 +950,10 @@
             NSBezierPath *path = [NSBezierPath bezierPath];
             for (NSBezierPath *aPath in [self paths])
                 [path appendBezierPath:aPath];
-            [path setLineWidth:fmax(1.0, [self lineWidth])];
+            [path setLineWidth:fmax(1.0, [border lineWidth])];
             [path setLineJoinStyle:NSRoundLineJoinStyle];
-            if ([self borderStyle] == kPDFBorderStyleDashed) {
-                [path setDashPattern:[self dashPattern]];
+            if ([border style] == kPDFBorderStyleDashed) {
+                [path setDashPattern:[border dashPattern]];
                 [path setLineCapStyle:NSButtLineCapStyle];
             } else {
                 [path setLineCapStyle:NSRoundLineCapStyle];

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