Browse Source

【2025】【Markup】马克笔属性界面处理

niehaoyu 3 months ago
parent
commit
a6c2e59af9
13 changed files with 808 additions and 186 deletions
  1. 24 3
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationConfig.swift
  2. 2 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationModel.m
  3. 110 54
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift
  4. 0 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CStringConstants.h
  5. 1 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CStringConstants.m
  6. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_dash.imageset/Contents.json
  7. 89 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_dash.imageset/lineStyle_dash.pdf
  8. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_solid.imageset/Contents.json
  9. 71 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_solid.imageset/lineStyle_solid.pdf
  10. 11 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift
  11. 303 53
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Pen/KMPenController.swift
  12. 47 4
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Pen/KMPenController.xib
  13. 126 67
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 24 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationConfig.swift

@@ -29,8 +29,10 @@ class CPDFAnnotationConfig: NSObject {
             CPDFAnnotationConfig.setDefaultColor(color, toKey: CSquigglyNoteColorKey)
         } else if type == .anchored {
             CPDFAnnotationConfig.setDefaultColor(color, toKey: CAnchoredNoteColorKey)
+        } else if type == .anchored {
+            CPDFAnnotationConfig.setDefaultColor(color, toKey: CInkNoteColorKey)
         }
-    } 
+    }
     
     func colorWithType(_ type: CAnnotationType) -> NSColor? {
         if type == .highlight {
@@ -43,6 +45,8 @@ class CPDFAnnotationConfig: NSObject {
             return CPDFAnnotationConfig.getDefaultColor(forKey: CSquigglyNoteColorKey)
         } else if type == .anchored {
             return CPDFAnnotationConfig.getDefaultColor(forKey: CAnchoredNoteColorKey)
+        } else if type == .ink {
+            return CPDFAnnotationConfig.getDefaultColor(forKey: CInkNoteColorKey)
         }
         return nil
     }
@@ -57,6 +61,8 @@ class CPDFAnnotationConfig: NSObject {
             CPDFAnnotationConfig.setDefaultFloatValue(opacity, toKey: CUnderlineNoteOpacityKey)
         } else if type == .squiggly {
             CPDFAnnotationConfig.setDefaultFloatValue(opacity, toKey: CSquigglyNoteOpacityKey)
+        } else if type == .ink {
+            CPDFAnnotationConfig.setDefaultFloatValue(opacity, toKey: CInkNoteOpacityKey)
         }
     }
     
@@ -67,8 +73,8 @@ class CPDFAnnotationConfig: NSObject {
            return CPDFAnnotationConfig.getFloatValue(forKey: CStrikeOutNoteOpacityKey)
         } else if type == .underline {
            return CPDFAnnotationConfig.getFloatValue(forKey: CUnderlineNoteOpacityKey)
-        } else if type == .squiggly {
-           return CPDFAnnotationConfig.getFloatValue(forKey: CSquigglyNoteOpacityKey)
+        } else if type == .ink {
+           return CPDFAnnotationConfig.getFloatValue(forKey: CInkNoteOpacityKey)
         }
         return 1
     }
@@ -140,5 +146,20 @@ extension CPDFAnnotationConfig {
         UserDefaults.standard.synchronize()
     }
     
+    //MARK: - Array
+    class func getArrayValue(forKey key: String) -> [Any] {
+        if let value = UserDefaults.standard.value(forKey: key) {
+            if let data = value as? [Any] {
+                return data
+            }
+        }
+        return []
+    }
+    
+    class func setDefaultArrayValue(_ value: [Any], toKey key: String) {
+        UserDefaults.standard.setValue(value, forKey: key)
+        UserDefaults.standard.synchronize()
+    }
+    
     
 }

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

@@ -586,7 +586,7 @@
                 break;
             case CAnnotationTypeInk:
             case CAnnotationTypeEraser:
-                style = [userDefaults integerForKey:CInkNoteLineStyleyKey];
+                style = [userDefaults integerForKey:CInkNoteLineStyleKey];
                 break;
             case CAnnotationTypeTextField:
                 style = [userDefaults integerForKey:CAnnotationTextWidgetLineStyleKey];
@@ -644,7 +644,7 @@
                 break;
             case CAnnotationTypeInk:
             case CAnnotationTypeEraser:
-                [userDefaults setInteger:style forKey:CInkNoteLineStyleyKey];
+                [userDefaults setInteger:style forKey:CInkNoteLineStyleKey];
                 break;
             case CAnnotationTypeTextField:
                 [userDefaults setInteger:style forKey:CAnnotationTextWidgetLineStyleKey];

+ 110 - 54
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift

@@ -27,28 +27,7 @@ import Foundation
             self.opacity = model.opacity()
         }
     }
-    
-    private static var _i_keys: Set<AnyHashable>?
-    override func keysForValuesToObserveForUndo() -> Set<AnyHashable>! {
-        if (CPDFInkAnnotation._i_keys == nil) {
-            CPDFInkAnnotation._i_keys = super.keysForValuesToObserveForUndo()
-            _ = CPDFInkAnnotation._i_keys?.insert(CPDFAnnotationPathsKey)
-        }
-        return CPDFInkAnnotation._i_keys
-    }
-    
-    override func lineWidth() -> CGFloat {
-        return self.borderWidth
-    }
-    
-    override func isResizable() -> Bool {
-        return true
-    }
-    
-    override func isMovable() -> Bool {
-        return true
-    }
-    
+     
     class func addPoint(_ point: NSPoint, toCNotesPath path: NSBezierPath) {
         let count = path.elementCount
         if (count == 0) {
@@ -241,11 +220,120 @@ import Foundation
         return nil
     }
     
+    func pagePaths() -> [Any] {
+        var paths: NSMutableArray = NSMutableArray(array: self.paths, copyItems: true)
+        let bounds = self.bounds
+        let transform = NSAffineTransform()
+        transform.translateX(by: NSMinX(bounds), yBy: NSMinY(bounds))
+        for path in paths {
+            guard let _path = path as? NSBezierPath else {
+                continue
+            }
+            _path.transform(using: transform as AffineTransform)
+        }
+        return paths as? [Any] ?? []
+    }
+    
+    func pointLists() -> NSArray {
+        var pointLists: NSMutableArray = NSMutableArray()
+        var pointValues: NSMutableArray?
+        var point: NSPoint = .zero
+        var iMax = 0
+        for path in self.paths {
+            guard let _path = path as? NSBezierPath else {
+                continue
+            }
+            iMax = _path.elementCount
+            pointValues = NSMutableArray(capacity: iMax)
+            for i in 0 ..< iMax {
+                point = _path.associatedPointForElementAtIndex(UInt(i))
+                pointValues?.add(NSValue(point: point))
+            }
+            pointLists.add(pointValues as Any)
+        }
+        return pointLists
+    }
+    
+    //MARK: - Update
+    func updateColor(_ color: NSColor?, withPDFView pdfView: CPDFListView?) {
+        guard let resultColor = color else {
+            return
+        }
+        guard let pdfView = pdfView else {
+            return
+        }
+         self.color = resultColor
+            pdfView.setNeedsDisplay(self)
+        
+        CPDFAnnotationConfig.standard.setColor(resultColor, toType: .ink)
+     }
+    
+    func updateOpacity(_ opacity: CGFloat, withPDFView pdfView: CPDFListView?) {
+         guard let pdfView = pdfView else {
+            return
+        }
+         self.opacity = opacity
+        pdfView.setNeedsDisplay(self)
+        
+        CPDFAnnotationConfig.standard.setOpacity(opacity, toType: .ink)
+    }
+    
+    func updateStyle(_ style: CPDFBorderStyle, withPDFView pdfView: CPDFListView?) {
+        guard let pdfView = pdfView else {
+           return
+       }
+        self.setBorderStyle(style)
+        pdfView.setNeedsDisplay(self)
+        
+        CPDFAnnotationConfig.setDefaultIntValue(style.rawValue, toKey: CInkNoteLineStyleKey)
+    }
+    
+    func updateLineWidth(_ lineWidth: CGFloat, withPDFView pdfView: CPDFListView?) {
+        guard let pdfView = pdfView else {
+           return
+       }
+        self.setLineWidth(lineWidth)
+        pdfView.setNeedsDisplay(self)
+        
+        CPDFAnnotationConfig.setDefaultFloatValue(lineWidth, toKey: CInkNoteLineWidthKey)
+    }
+    
+    func updateDashPattern(_ dashPattern: CGFloat, withPDFView pdfView: CPDFListView?) {
+        guard let pdfView = pdfView else {
+           return
+       }
+        self.setDashPattern([dashPattern])
+        pdfView.setNeedsDisplay(self)
+        
+        CPDFAnnotationConfig.setDefaultArrayValue([dashPattern], toKey: CInkNoteDashPatternKey)
+    }
+    
 }
 
 // MARK: - PDFAnnotationInk_SKExtensions
 
 @objc extension CPDFInkAnnotation {
+    private static var _i_keys: Set<AnyHashable>?
+    override func keysForValuesToObserveForUndo() -> Set<AnyHashable>! {
+        if (CPDFInkAnnotation._i_keys == nil) {
+            CPDFInkAnnotation._i_keys = super.keysForValuesToObserveForUndo()
+            _ = CPDFInkAnnotation._i_keys?.insert(CPDFAnnotationPathsKey)
+        }
+        return CPDFInkAnnotation._i_keys
+    }
+    
+    override func lineWidth() -> CGFloat {
+        return self.borderWidth
+    }
+    
+    override func isResizable() -> Bool {
+        return true
+    }
+    
+    override func isMovable() -> Bool {
+        return true
+    }
+    
     override func fdfString() -> String {
         var fdfString = super.fdfString()
         var point: NSPoint = .zero
@@ -270,19 +358,6 @@ import Foundation
         return fdfString
     }
     
-    func pagePaths() -> [Any] {
-        var paths: NSMutableArray = NSMutableArray(array: self.paths, copyItems: true)
-        let bounds = self.bounds
-        let transform = NSAffineTransform()
-        transform.translateX(by: NSMinX(bounds), yBy: NSMinY(bounds))
-        for path in paths {
-            guard let _path = path as? NSBezierPath else {
-                continue
-            }
-            _path.transform(using: transform as AffineTransform)
-        }
-        return paths as? [Any] ?? []
-    }
     
     override func displayRectForBounds(_ bounds: NSRect, lineWidth: CGFloat) -> NSRect {
         if (bounds.size.width == 0 || bounds.size.height == 0) {
@@ -365,25 +440,6 @@ import Foundation
         
     }
     
-    func pointLists() -> NSArray {
-        var pointLists: NSMutableArray = NSMutableArray()
-        var pointValues: NSMutableArray?
-        var point: NSPoint = .zero
-        var iMax = 0
-        for path in self.paths {
-            guard let _path = path as? NSBezierPath else {
-                continue
-            }
-            iMax = _path.elementCount
-            pointValues = NSMutableArray(capacity: iMax)
-            for i in 0 ..< iMax {
-                point = _path.associatedPointForElementAtIndex(UInt(i))
-                pointValues?.add(NSValue(point: point))
-            }
-            pointLists.add(pointValues as Any)
-        }
-        return pointLists
-    }
     
     override func colorDefaultKey() -> String? {
         return KMInkNoteColorKey

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CStringConstants.h

@@ -29,7 +29,6 @@ extern NSString *CEraserkNoteLineWidthKey;
 extern NSString *CInkNoteColorKey;
 extern NSString *CInkNoteOpacityKey;
 extern NSString *CInkNoteLineWidthKey;
-extern NSString *CInkNoteLineStyleyKey;
 extern NSString *CInkNoteDashPatternKey;
 extern NSString *CInkNoteLineStyleKey;
 

+ 1 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CStringConstants.m

@@ -28,9 +28,8 @@ NSString *CSquigglyNoteOpacityKey = @"SKSquigglyNoteOpacity";
 NSString *CInkNoteColorKey = @"SKInkNoteColor";
 NSString *CInkNoteOpacityKey = @"CInkNoteOpacity";
 NSString *CInkNoteLineWidthKey = @"SKInkNoteLineWidth";
-NSString *CInkNoteLineStyleyKey = @"CInkNoteLineStyley";
-NSString *CInkNoteDashPatternKey = @"SKInkNoteDashPattern";
 NSString *CInkNoteLineStyleKey = @"SKInkNoteLineStyle";
+NSString *CInkNoteDashPatternKey = @"SKInkNoteDashPattern";
 
 NSString *CEraserkNoteLineWidthKey = @"CEraserkNoteLineWidth";
 

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_dash.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "lineStyle_dash.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 89 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_dash.imageset/lineStyle_dash.pdf

@@ -0,0 +1,89 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 1.469727 1.469681 cm
+0.062745 0.094118 0.156863 scn
+13.060659 11.999993 m
+11.860661 10.799994 l
+10.800000 11.860654 l
+12.000000 13.060654 l
+13.060659 11.999993 l
+h
+10.260659 9.199993 m
+7.860660 6.799994 l
+6.800000 7.860653 l
+9.200000 10.260653 l
+10.260659 9.199993 l
+h
+6.260660 5.199994 m
+3.860660 2.799994 l
+2.800000 3.860654 l
+5.200000 6.260653 l
+6.260660 5.199994 l
+h
+2.260660 1.199994 m
+1.060660 -0.000006 l
+0.000000 1.060654 l
+1.200000 2.260654 l
+2.260660 1.199994 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  548
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000638 00000 n
+0000000660 00000 n
+0000000833 00000 n
+0000000907 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+966
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_solid.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "lineStyle_solid.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 71 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Property/lineStyle_solid.imageset/lineStyle_solid.pdf

@@ -0,0 +1,71 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 1.469727 1.469681 cm
+0.062745 0.094118 0.156863 scn
+0.000000 1.060654 m
+12.000000 13.060654 l
+13.060659 11.999993 l
+1.060660 -0.000006 l
+0.000000 1.060654 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  233
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000323 00000 n
+0000000345 00000 n
+0000000518 00000 n
+0000000592 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+651
+%%EOF

+ 11 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift

@@ -30,6 +30,8 @@ class KMRightSideController: NSViewController {
     var highlight_Controller: KMHighlightController?
     
     var note_Controller: KMNoteController?
+    var pen_Controller: KMPenController?
+    var eraser_Controller: KMEraserController?
     
     //Edit
     var edit_textController: KMEditPDFTextPropertyViewController?
@@ -169,6 +171,13 @@ class KMRightSideController: NSViewController {
             note_Controller?.pdfView = self.pdfView
             
             contentViewController = note_Controller
+        } else if firstAnnotation is CPDFInkAnnotation {
+            if pen_Controller == nil {
+                pen_Controller = KMPenController.init()
+            }
+            pen_Controller?.pdfView = self.pdfView
+            
+            contentViewController = pen_Controller
         }
         
         
@@ -231,6 +240,8 @@ class KMRightSideController: NSViewController {
             (contentViewController as? KMHighlightController)?.reloadData()
         } else if (contentViewController is KMNoteController) {
             (contentViewController as? KMNoteController)?.reloadData()
+        } else if (contentViewController is KMPenController) {
+            (contentViewController as? KMPenController)?.reloadData()
         }
         
         if toolMode == .Markup {

+ 303 - 53
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Pen/KMPenController.swift

@@ -22,10 +22,14 @@ class KMPenController: NSViewController {
     @IBOutlet var lineTypeSelector: ComponentCSelectorGroup!
     @IBOutlet var lineWidthSlider: ComponentSlider!
     @IBOutlet var lineWidthSelect: ComponentSelect!
+    @IBOutlet var linedashInfoView: NSView!
+    @IBOutlet var lineDashSlider: ComponentSlider!
+    @IBOutlet var lineDashSelect: ComponentSelect!
     
+    private let solidProperty = ComponentCSelectorProperty.init(size: .s, state: .normal, text: "", iconImage: NSImage(named: "lineStyle_solid"))
+    private let dashProperty = ComponentCSelectorProperty.init(size: .s, state: .normal, text: "", iconImage: NSImage(named: "lineStyle_dash"))
     
-    
-    private var annotations: [CPDFAnnotation] = []
+    private var annotations: [CPDFInkAnnotation] = []
     
     var pdfView: CPDFListView?
     
@@ -35,6 +39,10 @@ class KMPenController: NSViewController {
         
         
         colorSlider.reloadData()
+        
+        lineWidthSlider.reloadData()
+        
+        lineDashSlider.reloadData()
     }
     
     override func viewDidLoad() {
@@ -83,15 +91,18 @@ class KMPenController: NSViewController {
         lineLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         lineLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
         
+        lineTypeSelector.updateItemProperty([solidProperty, dashProperty])
+        lineTypeSelector.delegate = self
+        
         lineWidthSlider.properties = ComponentSliderProperty(size: .m, percent: 1)
         lineWidthSlider.delegate = self
         
         lineWidthSelect.properties = ComponentSelectProperties(size: .s,
-                                                                  state: .normal,
-                                                                  creatable: true,
-                                                                  text: "2",
-                                                                  textUnit: " pt",
-                                                                  regexString: "0123456789 pt")
+                                                               state: .normal,
+                                                               creatable: true,
+                                                               text: "2",
+                                                               textUnit: " pt",
+                                                               regexString: "0123456789 pt")
         if true {
             var opacityItems: [ComponentMenuitemProperty] = []
             for string in ["1 pt", "3 pt", "6 pt", "9 pt", "12 pt", "15 pt", "18 pt"] {
@@ -102,6 +113,25 @@ class KMPenController: NSViewController {
         }
         lineWidthSelect.delegate = self
         
+        lineDashSlider.properties = ComponentSliderProperty(size: .m, percent: 1)
+        lineDashSlider.delegate = self
+        
+        lineDashSelect.properties = ComponentSelectProperties(size: .s,
+                                                              state: .normal,
+                                                              creatable: true,
+                                                              text: "2",
+                                                              textUnit: " pt",
+                                                              regexString: "0123456789 pt")
+        if true {
+            var opacityItems: [ComponentMenuitemProperty] = []
+            for string in ["1 pt", "3 pt", "6 pt", "9 pt", "12 pt", "15 pt", "18 pt"] {
+                let item = ComponentMenuitemProperty(type: .normal, text: string)
+                opacityItems.append(item)
+            }
+            lineDashSelect.updateMenuItemsArr(opacityItems)
+        }
+        lineDashSelect.delegate = self
+        
     }
     
     func reloadData() {
@@ -113,77 +143,241 @@ class KMPenController: NSViewController {
         self.annotations.removeAll()
         let allAnnotations: [CPDFAnnotation] = pdfView.activeAnnotations as? [CPDFAnnotation] ?? []
         for annotation in allAnnotations {
-            if annotation is CPDFMarkupAnnotation {
-                annotations.append((annotation as! CPDFMarkupAnnotation))
+            if annotation is CPDFInkAnnotation {
+                annotations.append((annotation as! CPDFInkAnnotation))
             }
         }
         if annotations.count == 0 {
             return
         }
-        let firstAnnotation = annotations.first
+        guard let firstAnnotation = annotations.first else {
+            return
+        }
         
         if annotations.count == 1 {
-            colorGroup.currentColor = firstAnnotation?.color
+            colorGroup.currentColor = firstAnnotation.color
             colorGroup.refreshUI()
             
-            let opacity = firstAnnotation?.opacity ?? 0
+            let opacity = firstAnnotation.opacity
             colorSlider.properties.percent = opacity
             colorSlider.reloadData()
             
             colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
             colorOpacitySelect.reloadData()
             
+            let border: CPDFBorder = firstAnnotation.border
+            
+            dashProperty.state = .normal
+            solidProperty.state = .normal
+            if border.style == .dashed {
+                dashProperty.state = .pressed
+            } else if border.style == .solid {
+                solidProperty.state = .pressed
+            }
+            lineTypeSelector.reloadData()
+            
+            let percent = (border.lineWidth - 1)/17
+            lineWidthSlider.properties.percent = percent
+            lineWidthSlider.reloadData()
+            
+            lineWidthSelect.properties.text = String(format: "%.0f%@", border.lineWidth, " pt")
+            lineWidthSelect.reloadData()
             
+            linedashInfoView.isHidden = true
+            if border.style == .dashed {
+                linedashInfoView.isHidden = false
+                
+                var dash = 1.0
+                for dashPattern in border.dashPattern {
+                    if let value = dashPattern as? CGFloat {
+                        dash = value
+                        break
+                    }
+                }
+                let percent: CGFloat = (CGFloat(dash) - 1)/17
+                lineDashSlider.properties.percent = percent
+                lineDashSlider.reloadData()
+                
+                lineDashSelect.properties.text = String(format: "%.0f%@", CGFloat(dash), " pt")
+                lineDashSelect.reloadData()
+            }
         } else {
-            var multiColor: Bool = false
-            for annotationA in annotations {
-                for annotationB in annotations {
-                    if annotationA != annotationB {
-                        if annotationA.color != annotationB.color {
-                            multiColor = true
-                            break
+            if true {
+                var multiColor: Bool = false
+                for annotationA in annotations {
+                    for annotationB in annotations {
+                        if annotationA != annotationB {
+                            if annotationA.color != annotationB.color {
+                                multiColor = true
+                                break
+                            }
                         }
                     }
+                    if multiColor == true {
+                        break
+                    }
                 }
                 if multiColor == true {
-                    break
+                    colorGroup.currentColor = NSColor.clear
+                } else {
+                    colorGroup.currentColor = firstAnnotation.color
                 }
+                colorGroup.refreshUI()
             }
-            if multiColor == true {
-                colorGroup.currentColor = NSColor.clear
-            } else {
-                colorGroup.currentColor = firstAnnotation?.color
+            
+            if true {
+                var multiOpacity: Bool = false
+                for annotationA in annotations {
+                    for annotationB in annotations {
+                        if annotationA != annotationB {
+                            if annotationA.opacity != annotationB.opacity {
+                                multiOpacity = true
+                                break
+                            }
+                        }
+                    }
+                    if multiOpacity == true {
+                        break
+                    }
+                }
+                
+                if multiOpacity {
+                    colorSlider.properties.percent = 0
+                    colorSlider.reloadData()
+                    
+                    colorOpacitySelect.resetText("-")
+                } else {
+                    let opacity = firstAnnotation.opacity
+                    
+                    colorSlider.properties.percent = opacity
+                    colorSlider.reloadData()
+                    
+                    colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
+                    colorOpacitySelect.reloadData()
+                 }
             }
-            colorGroup.refreshUI()
             
-            var multiOpacity: Bool = false
-            for annotationA in annotations {
-                for annotationB in annotations {
-                    if annotationA != annotationB {
-                        if annotationA.opacity != annotationB.opacity {
-                            multiOpacity = true
-                            break
+            if true {
+                var multiStyle: Bool = false
+                for annotationA in annotations {
+                    for annotationB in annotations {
+                        if annotationA != annotationB {
+                            if annotationA.borderStyle() != annotationB.borderStyle() {
+                                multiStyle = true
+                                break
+                            }
                         }
                     }
+                    if multiStyle == true {
+                        break
+                    }
                 }
-                if multiOpacity == true {
-                    break
+                
+                linedashInfoView.isHidden = true
+                if multiStyle {
+                    dashProperty.state = .normal
+                    solidProperty.state = .normal
+                    
+                    lineTypeSelector.reloadData()
+                } else {
+                    let style = firstAnnotation.border.style
+                    dashProperty.state = .normal
+                    solidProperty.state = .normal
+                    if style == .dashed {
+                        dashProperty.state = .pressed
+                    } else if style == .solid {
+                        solidProperty.state = .pressed
+                    }
+                    lineTypeSelector.reloadData()
+                    
+                    if style == .dashed {
+                        linedashInfoView.isHidden = false
+                    }
                 }
             }
             
-            if multiOpacity {
-                colorSlider.properties.percent = 0
-                colorSlider.reloadData()
-                
-                colorOpacitySelect.resetText("-")
-            } else {
-                let opacity = firstAnnotation?.opacity ?? 0
-                
-                colorSlider.properties.percent = opacity
-                colorSlider.reloadData()
-                
-                colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
-                colorOpacitySelect.reloadData()
+            if true {
+                var multiLineWidth: Bool = false
+                for annotationA in annotations {
+                    for annotationB in annotations {
+                        if annotationA != annotationB {
+                            if annotationA.borderStyle() != annotationB.borderStyle() {
+                                multiLineWidth = true
+                                break
+                            }
+                        }
+                    }
+                    if multiLineWidth == true {
+                        break
+                    }
+                }
+                if multiLineWidth {
+                    lineWidthSlider.properties.percent = 0
+                    lineWidthSlider.reloadData()
+                    
+                    lineWidthSelect.resetText("-")
+                } else {
+                    let border: CPDFBorder = firstAnnotation.border
+                    
+                    let percent = (border.lineWidth - 1)/17
+                    lineWidthSlider.properties.percent = percent
+                    lineWidthSlider.reloadData()
+                    
+                    lineWidthSelect.properties.text = String(format: "%.0f%@", border.lineWidth, " pt")
+                    lineWidthSelect.reloadData()
+                }
+            }
+             
+            if true {
+                var multiLineDash: Bool = false
+                for annotationA in annotations {
+                    var dashA = 1.0
+                    for dashPattern in annotationA.border.dashPattern {
+                        if let value = dashPattern as? CGFloat {
+                            dashA = value
+                            break
+                        }
+                    }
+                    for annotationB in annotations {
+                        if annotationA != annotationB {
+                            var dashB = 1.0
+                            for dashPattern in annotationB.border.dashPattern {
+                                if let value = dashPattern as? CGFloat {
+                                    dashB = value
+                                    break
+                                }
+                            }
+                            if dashA != dashB {
+                                multiLineDash = true
+                                break
+                            }
+                        }
+                    }
+                    if multiLineDash == true {
+                        break
+                    }
+                }
+                if multiLineDash {
+                    lineDashSlider.properties.percent = 0
+                    lineDashSlider.reloadData()
+                    
+                    lineDashSelect.resetText("-")
+                } else {
+                    var dashA = 1.0
+                    for dashPattern in firstAnnotation.border.dashPattern {
+                        if let value = dashPattern as? CGFloat {
+                            dashA = value
+                            break
+                        }
+                    }
+                    
+                    let percent = (dashA - 1)/17
+                    lineDashSlider.properties.percent = percent
+                    lineDashSlider.reloadData()
+                    
+                    lineDashSelect.properties.text = String(format: "%.0f%@", dashA, " pt")
+                    lineDashSelect.reloadData()
+                }
             }
         }
         
@@ -203,8 +397,9 @@ class KMPenController: NSViewController {
 //MARK: - ComponentCColorDelegate
 extension KMPenController: ComponentCColorDelegate {
     func componentCColorDidChooseColor(_ view: NSView, _ color: NSColor?) {
-         
-        
+        for annotation in self.annotations {
+            annotation.updateColor(color, withPDFView: pdfView)
+        }
         reloadData()
     }
 }
@@ -212,8 +407,22 @@ extension KMPenController: ComponentCColorDelegate {
 //MARK: - ComponentSliderDelegate
 extension KMPenController: ComponentSliderDelegate {
     func componentSliderDidUpdate(_ view: ComponentSlider) {
-        let percent = view.properties.percent
-       
+        if view == colorSlider {
+            let percent = view.properties.percent
+            for annotation in self.annotations {
+                annotation.updateOpacity(percent, withPDFView: pdfView)
+            }
+        } else if view == lineWidthSlider {
+            let percent = view.properties.percent * 17 + 1
+            for annotation in self.annotations {
+                annotation.updateLineWidth(percent, withPDFView: pdfView)
+            }
+        } else if view == lineDashSlider {
+            let percent = view.properties.percent * 17 + 1
+            for annotation in self.annotations {
+                annotation.updateDashPattern(percent, withPDFView: pdfView)
+            }
+        }
         reloadData()
     }
 }
@@ -222,9 +431,50 @@ extension KMPenController: ComponentSliderDelegate {
 extension KMPenController: ComponentSelectDelegate {
     func componentSelectTextDidEndEditing(_ view: ComponentSelect, removeUnit text: String?) {
         if let result = text {
-            let opacity = max(0, min(1, result.stringToCGFloat()/100))
-             
+            if view == colorOpacitySelect {
+                let opacity = max(0, min(1, result.stringToCGFloat()/100))
+                for annotation in self.annotations {
+                    annotation.updateOpacity(opacity, withPDFView: pdfView)
+                }
+            } else if view == lineWidthSelect {
+                var value = result.stringToCGFloat()
+                if value > 18 {
+                    value = 18
+                } else if value < 1 {
+                    value = 1
+                }
+                for annotation in self.annotations {
+                    annotation.updateLineWidth(value, withPDFView: pdfView)
+                }
+            } else if view == lineDashSelect {
+                var value = result.stringToCGFloat()
+                if value > 18 {
+                    value = 18
+                } else if value < 1 {
+                    value = 1
+                }
+                for annotation in self.annotations {
+                    annotation.updateDashPattern(value, withPDFView: pdfView)
+                }
+            }
             reloadData()
         }
     }
 }
+
+
+//MARK: - ComponentCSelectorGroupDelegate
+extension KMPenController: ComponentCSelectorGroupDelegate {
+    func componentCSelectorGroupDidChoose(_ view: ComponentCSelectorGroup, _ item: ComponentCSelectorItem) {
+        if item.properties == solidProperty {
+            for annotation in self.annotations {
+                annotation.updateStyle(.solid, withPDFView: pdfView)
+            }
+        } else if item.properties == dashProperty {
+            for annotation in self.annotations {
+                annotation.updateStyle(.dashed, withPDFView: pdfView)
+            }
+        }
+        reloadData()
+    }
+}

+ 47 - 4
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Pen/KMPenController.xib

@@ -14,10 +14,13 @@
                 <outlet property="colorOpacitySelect" destination="Tvp-kB-R4T" id="clJ-kr-SsJ"/>
                 <outlet property="colorSlider" destination="KDZ-cB-TkN" id="XGJ-VX-KTQ"/>
                 <outlet property="lineBGView" destination="9SI-zI-C10" id="wnf-x2-kF1"/>
+                <outlet property="lineDashSelect" destination="leL-IW-pYm" id="Gsg-Nb-qVW"/>
+                <outlet property="lineDashSlider" destination="Tx8-cX-vrt" id="eLG-B0-Itm"/>
                 <outlet property="lineLabel" destination="FEb-Ts-oUI" id="g09-H4-HZd"/>
                 <outlet property="lineTypeSelector" destination="IMh-fN-7hp" id="ycb-ar-8Gb"/>
                 <outlet property="lineWidthSelect" destination="ngL-wR-FYP" id="Cav-le-kTb"/>
                 <outlet property="lineWidthSlider" destination="emO-bT-9PY" id="Hpf-iB-uq2"/>
+                <outlet property="linedashInfoView" destination="wyI-tl-SHg" id="zHW-u9-Jwe"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
             </connections>
         </customObject>
@@ -109,10 +112,10 @@
                             </constraints>
                         </customView>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="9SI-zI-C10">
-                            <rect key="frame" x="47" y="182" width="232" height="104"/>
+                            <rect key="frame" x="47" y="174" width="232" height="112"/>
                             <subviews>
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="9T0-s1-WLF">
-                                    <rect key="frame" x="0.0" y="64" width="232" height="40"/>
+                                    <rect key="frame" x="0.0" y="72" width="232" height="40"/>
                                     <subviews>
                                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FEb-Ts-oUI">
                                             <rect key="frame" x="-2" y="12" width="30" height="16"/>
@@ -139,7 +142,7 @@
                                     </constraints>
                                 </customView>
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="hDQ-AO-zYF">
-                                    <rect key="frame" x="0.0" y="32" width="232" height="32"/>
+                                    <rect key="frame" x="0.0" y="40" width="232" height="32"/>
                                     <subviews>
                                         <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Goc-Hz-nNM">
                                             <rect key="frame" x="0.0" y="6" width="20" height="20"/>
@@ -174,16 +177,55 @@
                                         <constraint firstItem="Goc-Hz-nNM" firstAttribute="centerY" secondItem="hDQ-AO-zYF" secondAttribute="centerY" id="w2h-7v-yan"/>
                                     </constraints>
                                 </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="wyI-tl-SHg">
+                                    <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                    <subviews>
+                                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="IJk-ZX-K1d">
+                                            <rect key="frame" x="0.0" y="6" width="20" height="20"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="20" id="Brs-J8-PHY"/>
+                                                <constraint firstAttribute="width" constant="20" id="rDt-TH-Ua0"/>
+                                            </constraints>
+                                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="lineStyle_dash" id="iWF-Zc-6Ib"/>
+                                        </imageView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Tx8-cX-vrt" customClass="ComponentSlider" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="28" y="10" width="116" height="12"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="12" id="h1J-59-My3"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="leL-IW-pYm" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="152" y="0.0" width="80" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="QGe-UC-d7L"/>
+                                                <constraint firstAttribute="width" constant="80" id="dVs-v2-IbE"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="Tx8-cX-vrt" firstAttribute="leading" secondItem="wyI-tl-SHg" secondAttribute="leading" constant="28" id="4Ml-LC-PRY"/>
+                                        <constraint firstAttribute="trailing" secondItem="leL-IW-pYm" secondAttribute="trailing" id="Ajg-Gg-QqQ"/>
+                                        <constraint firstItem="leL-IW-pYm" firstAttribute="top" secondItem="wyI-tl-SHg" secondAttribute="top" id="Hj1-af-1sC"/>
+                                        <constraint firstItem="Tx8-cX-vrt" firstAttribute="centerY" secondItem="wyI-tl-SHg" secondAttribute="centerY" id="HyT-IA-sUC"/>
+                                        <constraint firstItem="IJk-ZX-K1d" firstAttribute="leading" secondItem="wyI-tl-SHg" secondAttribute="leading" id="Qnm-LR-8NS"/>
+                                        <constraint firstItem="leL-IW-pYm" firstAttribute="leading" secondItem="Tx8-cX-vrt" secondAttribute="trailing" constant="8" id="kmd-9I-ICH"/>
+                                        <constraint firstAttribute="height" constant="32" id="tAz-Eo-dTc"/>
+                                        <constraint firstItem="IJk-ZX-K1d" firstAttribute="centerY" secondItem="wyI-tl-SHg" secondAttribute="centerY" id="yhb-pV-eba"/>
+                                    </constraints>
+                                </customView>
                             </subviews>
                             <constraints>
                                 <constraint firstAttribute="trailing" secondItem="9T0-s1-WLF" secondAttribute="trailing" id="26W-yh-dxD"/>
+                                <constraint firstAttribute="trailing" secondItem="wyI-tl-SHg" secondAttribute="trailing" id="2hz-I6-sgQ"/>
                                 <constraint firstItem="hDQ-AO-zYF" firstAttribute="top" secondItem="9T0-s1-WLF" secondAttribute="bottom" id="84I-YR-x0m"/>
                                 <constraint firstItem="hDQ-AO-zYF" firstAttribute="leading" secondItem="9SI-zI-C10" secondAttribute="leading" id="9fy-lS-J1j"/>
                                 <constraint firstItem="9T0-s1-WLF" firstAttribute="top" secondItem="9SI-zI-C10" secondAttribute="top" id="Eik-Fn-qen"/>
+                                <constraint firstItem="wyI-tl-SHg" firstAttribute="top" secondItem="hDQ-AO-zYF" secondAttribute="bottom" constant="8" id="Kc9-qc-THi"/>
                                 <constraint firstAttribute="width" constant="232" id="PgP-T0-XHQ"/>
                                 <constraint firstItem="9T0-s1-WLF" firstAttribute="leading" secondItem="9SI-zI-C10" secondAttribute="leading" id="l2p-Re-HZV"/>
                                 <constraint firstAttribute="trailing" secondItem="hDQ-AO-zYF" secondAttribute="trailing" id="nlk-Cf-XTF"/>
-                                <constraint firstAttribute="height" constant="104" id="odr-pv-Tcg"/>
+                                <constraint firstAttribute="height" constant="112" id="odr-pv-Tcg"/>
+                                <constraint firstItem="wyI-tl-SHg" firstAttribute="leading" secondItem="9SI-zI-C10" secondAttribute="leading" id="vM8-Cf-9Wx"/>
                             </constraints>
                         </customView>
                     </subviews>
@@ -206,6 +248,7 @@
     </objects>
     <resources>
         <image name="edit_ocapity" width="16" height="16"/>
+        <image name="lineStyle_dash" width="16" height="16"/>
         <image name="lineWidth_icon" width="16" height="16"/>
     </resources>
 </document>

+ 126 - 67
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3074,6 +3074,21 @@
                   endingLineNumber = "2418"
                   offsetFromSymbolStart = "3204">
                </Location>
+               <Location
+                  uuid = "18021D19-EAF7-4279-A121-953E8941B3AE - 9dfcffc52ba50739"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfViewCurrentPageDidChanged(Swift.Optional&lt;__C.CPDFView&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "2418"
+                  endingLineNumber = "2418"
+                  offsetFromSymbolStart = "2812">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -3121,7 +3136,7 @@
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "674"
             endingLineNumber = "674"
-            landmarkName = "enterPageEditMode()"
+            landmarkName = "updatePDFDisplaySettingView()"
             landmarkType = "7">
             <Locations>
                <Location
@@ -3169,6 +3184,21 @@
                   endingLineNumber = "674"
                   offsetFromSymbolStart = "108">
                </Location>
+               <Location
+                  uuid = "E7AD4267-48AC-4DD5-867F-6A958C288C52 - 8f5a5dbe646a827b"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.updatePDFDisplaySettingView() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "674"
+                  endingLineNumber = "674"
+                  offsetFromSymbolStart = "2660">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -3220,69 +3250,6 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "CA957B0F-74F0-4ECF-9BE5-F996315D44F7"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2902"
-            endingLineNumber = "2902"
-            landmarkName = "pdfListViewChangeatioActiveAnnotations(_:forActiveAnnotations:isRightMenu:)"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "CA957B0F-74F0-4ECF-9BE5-F996315D44F7 - 55adff6b3ed3b63"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfListViewMenuItemsEditing(at: __C.CGPoint, for: Swift.Optional&lt;__C.CPDFPage&gt;, menuItems: Swift.Optional&lt;Swift.Array&lt;__C.NSMenuItem&gt;&gt;) -&gt; Swift.Optional&lt;Swift.Array&lt;__C.NSMenuItem&gt;&gt;"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2903"
-                  endingLineNumber = "2903"
-                  offsetFromSymbolStart = "312">
-               </Location>
-               <Location
-                  uuid = "CA957B0F-74F0-4ECF-9BE5-F996315D44F7 - 55adff6b3ed3b8c"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfListViewMenuItemsEditing(at: __C.CGPoint, for: Swift.Optional&lt;__C.CPDFPage&gt;, menuItems: Swift.Optional&lt;Swift.Array&lt;__C.NSMenuItem&gt;&gt;) -&gt; Swift.Optional&lt;Swift.Array&lt;__C.NSMenuItem&gt;&gt;"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2902"
-                  endingLineNumber = "2902"
-                  offsetFromSymbolStart = "136">
-               </Location>
-               <Location
-                  uuid = "CA957B0F-74F0-4ECF-9BE5-F996315D44F7 - f9f96c359432b668"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfListViewChangeatioActiveAnnotations(_: Swift.Optional&lt;__C.CPDFListView&gt;, forActiveAnnotations: Swift.Optional&lt;Swift.Array&lt;__C.CPDFAnnotation&gt;&gt;, isRightMenu: Swift.Bool) -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2902"
-                  endingLineNumber = "2902"
-                  offsetFromSymbolStart = "5072">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -3295,7 +3262,7 @@
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "2718"
             endingLineNumber = "2718"
-            landmarkName = "pdfListViewKeyDownIsContinue(_:theEvent:)"
+            landmarkName = "pdfViewEditingDoubleClick(_:imageArea:)"
             landmarkType = "7">
             <Locations>
                <Location
@@ -3343,6 +3310,21 @@
                   endingLineNumber = "2718"
                   offsetFromSymbolStart = "188">
                </Location>
+               <Location
+                  uuid = "E36E1A66-A8B1-4248-9550-68D820499376 - e2025f40cf5c2f69"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfViewEditingDoubleClick(_: Swift.Optional&lt;__C.CPDFView&gt;, imageArea: Swift.Optional&lt;__C.CPDFEditArea&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "2719"
+                  endingLineNumber = "2719"
+                  offsetFromSymbolStart = "44">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -3438,6 +3420,21 @@
                   endingLineNumber = "3871"
                   offsetFromSymbolStart = "1448">
                </Location>
+               <Location
+                  uuid = "92759DD6-8CD9-4B54-BF74-D83EF6A6D5A5 - 1c7307af3eb166da"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.enterRedact() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "3870"
+                  endingLineNumber = "3870"
+                  offsetFromSymbolStart = "792">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -3531,6 +3528,21 @@
                   endingLineNumber = "4161"
                   offsetFromSymbolStart = "1340">
                </Location>
+               <Location
+                  uuid = "C11A5EAB-3C0F-444C-8EDC-40823949B391 - 427a2b67eb7fcc62"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 (PDF_Reader_Pro.KMPurchaseLimitWindowController) -&gt; () in closure #1 (PDF_Reader_Pro.KMGuideInfoWindowController) -&gt; () in closure #7 @Swift.MainActor () -&gt; () in PDF_Reader_Pro.KMMainViewController.loadOpenFileFunctionGuide(PDF_Reader_Pro.KMGuideInfoType) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "4161"
+                  endingLineNumber = "4161"
+                  offsetFromSymbolStart = "28">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -3594,6 +3606,21 @@
                   endingLineNumber = "4202"
                   offsetFromSymbolStart = "2504">
                </Location>
+               <Location
+                  uuid = "4E0E8246-D746-4D5F-A4A2-89C78AEA0880 - cdeb46f11008bc2b"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.checkFirstTrialController() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "4202"
+                  endingLineNumber = "4202"
+                  offsetFromSymbolStart = "1672">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -3799,10 +3826,42 @@
             filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "107"
-            endingLineNumber = "107"
+            startingLineNumber = "86"
+            endingLineNumber = "86"
             landmarkName = "annotationImage(annotationModel:)"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "0C95D7BA-3681-47AA-9277-5F7552FB3C71 - de11b6884028a106"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "static __C.CPDFInkAnnotation.addPoint(_: __C.CGPoint, toCNotesPath: __C.NSBezierPath) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "86"
+                  endingLineNumber = "86"
+                  offsetFromSymbolStart = "1612">
+               </Location>
+               <Location
+                  uuid = "0C95D7BA-3681-47AA-9277-5F7552FB3C71 - 5805554134180535"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "static __C.CPDFInkAnnotation.annotationImage(annotationModel: __C.CPDFAnnotationModel) -&gt; Swift.Optional&lt;__C.NSImage&gt;"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "86"
+                  endingLineNumber = "86"
+                  offsetFromSymbolStart = "428">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy