Просмотр исходного кода

【测量】修复多边形、矩形填充颜色默认为透明色

wanjun 6 месяцев назад
Родитель
Сommit
6ca9dc528e

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationModel.m

@@ -2296,16 +2296,16 @@
     NSColor  *color = nil;
     if (_annotation && self.annotations.count == 1) {
         if ([self.annotation isKindOfClass:[CPDFPolygonAnnotation class]]) {
-            color = [(CPDFPolygonAnnotation *)self.annotation interiorColor] ? : NSColor.clearColor;
+            color = [(CPDFPolygonAnnotation *)self.annotation interiorColor] ? : [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.0];
         }
     } else {
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
         switch (_annotationType) {
             case CAnnotationTypePolyGon:
-                color = [userDefaults PDFListViewColorForKey:CMeasurePolygonalLineColorKey] ? : NSColor.clearColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasurePolygonalLineColorKey] ? : [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.0];
                 break;
             case CAnnotationTypeSquare:
-                color = [userDefaults PDFListViewColorForKey:CMeasureRectanglesLineColorKey] ? : NSColor.clearColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasureRectanglesLineColorKey] ? : [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.0];
                 break;
             default:
                 break;