Kaynağa Gözat

【测量】测量主功能补充

wanjun 7 ay önce
ebeveyn
işleme
f543989a81
43 değiştirilmiş dosya ile 2669 ekleme ve 524 silme
  1. 0 5
      PDF Office/PDF Master/Class/DigtalSignature/CPDFDigtalView/CPDFDigtalView.m
  2. 14 0
      PDF Office/PDF Master/Class/DigtalSignature/CPDFDigtalView/Event/NSGeometry+PDFListView.h
  3. 1 0
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift
  4. 23 23
      PDF Office/PDF Master/Class/PDFTools/Measure/Side/KMMeasureSideVC.xib
  5. 9 9
      PDF Office/PDF Master/Class/PDFTools/Measure/Window/CPerimeterMeasureInfoWindowController.xib
  6. 35 3
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationModel.m
  7. 92 274
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLineAnnotation+PDFListView.swift
  8. 142 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFPolygonAnnotation+PDFListView.swift
  9. 99 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFPolylineAnnotation+PDFListView.swift
  10. 16 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView+Private.h
  11. 11 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.h
  12. 33 4
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m
  13. 31 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewConfig.swift
  14. 913 71
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m
  15. 7 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+KeyEvent.m
  16. 4 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Tool.h
  17. 120 65
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Tool.m
  18. 12 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/KMAnnotationTool/KMBOTAAnnotationTool.swift
  19. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/KMAnnotationViewController.swift
  20. 4 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/KMScreenViewController/ScreenCollectionView/View/KMAnnotationScreenTypeViewItem.swift
  21. 4 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMAnnotationTableCellView.swift
  22. 20 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTypeCollectionViewItem.swift
  23. 31 6
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTypeImageView.swift
  24. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Note.swift
  25. 36 1
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m
  26. 1 0
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarController.swift
  27. 32 2
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift
  28. 3 1
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/PublicKey.swift
  29. 208 0
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  30. 132 0
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift
  31. 14 0
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift
  32. 53 0
      PDF Office/PDF Master/Strings/de.lproj/Localizable.strings
  33. 53 0
      PDF Office/PDF Master/Strings/en.lproj/Localizable.strings
  34. 53 0
      PDF Office/PDF Master/Strings/es.lproj/Localizable.strings
  35. 53 0
      PDF Office/PDF Master/Strings/fr.lproj/Localizable.strings
  36. 54 0
      PDF Office/PDF Master/Strings/it.lproj/Localizable.strings
  37. 54 0
      PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings
  38. 54 0
      PDF Office/PDF Master/Strings/pl.lproj/Localizable.strings
  39. 54 0
      PDF Office/PDF Master/Strings/ru.lproj/Localizable.strings
  40. 53 0
      PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings
  41. 53 0
      PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings
  42. 71 7
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj
  43. 15 48
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanwj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 0 - 5
PDF Office/PDF Master/Class/DigtalSignature/CPDFDigtalView/CPDFDigtalView.m

@@ -240,11 +240,6 @@
 
 - (void)dragAnnotationReferenceLine:(CPDFAnnotation *)annotation {
     
-//    if ([self isAlignedWithOtherForms:annotation] && annotation) {
-//        CGRect bounds = annotation.bounds;
-//        NSRect rect = [self convertRect:bounds fromPage:self.currentPage];
-//        [self drawLineOfDashByCAShapeLayer:rect];
-//    }
 }
 
 - (void)editAnnotation:(CPDFAnnotation *)annotation {

+ 14 - 0
PDF Office/PDF Master/Class/DigtalSignature/CPDFDigtalView/Event/NSGeometry+PDFListView.h

@@ -21,6 +21,7 @@ typedef NS_OPTIONS(NSUInteger, CRectEdges) {
     CMaxXEdgeMask = (1UL << 2),
     CMaxYEdgeMask = (1UL << 3),
     CEditInEdgeMask = (1UL << 4),
+    CMidEdgeMask = (1UL << 5),
 };
 
 static inline NSPoint CPDFListViewIntegralPoint(NSPoint point) {
@@ -120,6 +121,19 @@ static inline BOOL CPDFListViewIntegralCircleRect(NSRect rect,NSPoint point) {
     return dis <= radius;
 }
 
+static inline NSArray<NSValue *> * getSquarePoints(CGRect bounds) {
+    NSMutableArray<NSValue *> *savePoints = [NSMutableArray array];
+    NSValue *minX = [NSValue valueWithPoint:bounds.origin];
+    [savePoints addObject:minX];
+    NSValue *minY = [NSValue valueWithPoint:NSMakePoint(bounds.origin.x + bounds.size.width, bounds.origin.y)];
+    [savePoints addObject:minY];
+    NSValue *maxY = [NSValue valueWithPoint:NSMakePoint(bounds.origin.x + bounds.size.width, bounds.origin.y + bounds.size.height)];
+    [savePoints addObject:maxY];
+    NSValue *maxX = [NSValue valueWithPoint:NSMakePoint(bounds.origin.x, bounds.origin.y + bounds.size.height)];
+    [savePoints addObject:maxX];
+    return savePoints;
+}
+
 #pragma mark -
 
 extern NSPoint CPDFListViewConstrainPointInRect(NSPoint point, NSRect boundary);

+ 1 - 0
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -515,6 +515,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     // MARK: Autosaving
     
     override func close() {
+        mainViewController?.cancelMeasureType()
         if self.isActive {
             if browser != nil {
                 var activeIndex = 0

+ 23 - 23
PDF Office/PDF Master/Class/PDFTools/Measure/Side/KMMeasureSideVC.xib

@@ -6,7 +6,7 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMMeasureSideVC" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMMeasureSideVC" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="borderColor_Button" destination="XvA-Bn-AeO" id="9oR-Pu-3k9"/>
                 <outlet property="borderColor_TopConstant" destination="sEI-Fd-AZW" id="V2d-RS-68o"/>
@@ -250,7 +250,7 @@
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="N2U-lW-qsA">
                                 <rect key="frame" x="16" y="464" width="449" height="52"/>
                                 <subviews>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MZR-XZ-OPP">
+                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MZR-XZ-OPP">
                                         <rect key="frame" x="-2" y="18" width="79" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Border &amp; Fill" id="ns4-CT-KPW">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -304,7 +304,7 @@
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="FAa-Xh-Opn">
                                 <rect key="frame" x="16" y="412" width="449" height="52"/>
                                 <subviews>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cSO-iT-PnE">
+                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cSO-iT-PnE">
                                         <rect key="frame" x="-2" y="18" width="66" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Line Color" id="Eov-fT-vpH">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -361,7 +361,7 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="yez-pY-pMf">
                                         <rect key="frame" x="0.0" y="32" width="449" height="32"/>
                                         <subviews>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mpp-tC-cK7">
+                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mpp-tC-cK7">
                                                 <rect key="frame" x="-2" y="8" width="51" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Opacity" id="nWh-yV-CcS">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -388,12 +388,12 @@
                                                     <action selector="opacitySliderAction:" target="-2" id="8St-ge-iCd"/>
                                                 </connections>
                                             </slider>
-                                            <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="foS-bG-3Om" customClass="KMComboBox" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                            <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="foS-bG-3Om" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                 <rect key="frame" x="368" y="-2" width="84" height="35"/>
                                                 <constraints>
                                                     <constraint firstAttribute="width" constant="80" id="GCu-Yc-CvY"/>
                                                 </constraints>
-                                                <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" alignment="center" completes="NO" numberOfVisibleItems="7" id="MFH-nL-08V" customClass="KMComboBoxCell" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                                <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" alignment="center" completes="NO" numberOfVisibleItems="7" id="MFH-nL-08V" customClass="KMComboBoxCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <font key="font" metaFont="system"/>
                                                     <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -438,7 +438,7 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="k6F-1F-H7j">
                                         <rect key="frame" x="0.0" y="32" width="449" height="32"/>
                                         <subviews>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gbM-Ej-Q9c">
+                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gbM-Ej-Q9c">
                                                 <rect key="frame" x="-2" y="8" width="66" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Thickness" id="8d4-fj-CMl">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -465,12 +465,12 @@
                                                     <action selector="thicknessSliderAction:" target="-2" id="nwk-mO-W8b"/>
                                                 </connections>
                                             </slider>
-                                            <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e9g-Xy-gwD" customClass="KMComboBox" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                            <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e9g-Xy-gwD" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                 <rect key="frame" x="368" y="-2" width="84" height="35"/>
                                                 <constraints>
                                                     <constraint firstAttribute="width" constant="80" id="nbN-ue-T9n"/>
                                                 </constraints>
-                                                <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" alignment="center" completes="NO" numberOfVisibleItems="4" id="2V3-C6-5Y2" customClass="KMComboBoxCell" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                                <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" alignment="center" completes="NO" numberOfVisibleItems="4" id="2V3-C6-5Y2" customClass="KMComboBoxCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <font key="font" metaFont="system"/>
                                                     <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -517,7 +517,7 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="QPc-Pt-nlu">
                                         <rect key="frame" x="0.0" y="72" width="449" height="32"/>
                                         <subviews>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YdU-MQ-e0v">
+                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YdU-MQ-e0v">
                                                 <rect key="frame" x="-2" y="8" width="64" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Line Style" id="plB-2D-Cap">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -590,7 +590,7 @@
                                                 </constraints>
                                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="Gc0-EO-5ne"/>
                                             </imageView>
-                                            <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gjr-Sd-Sa0">
+                                            <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gjr-Sd-Sa0">
                                                 <rect key="frame" x="369" y="0.0" width="80" height="32"/>
                                                 <constraints>
                                                     <constraint firstAttribute="width" constant="80" id="MHQ-Hy-D4o"/>
@@ -635,7 +635,7 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="Q0n-es-MlW">
                                         <rect key="frame" x="0.0" y="32" width="449" height="32"/>
                                         <subviews>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="N5b-9k-Q9U">
+                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="N5b-9k-Q9U">
                                                 <rect key="frame" x="-2" y="8" width="74" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Start &amp; End" id="vNb-39-gWK">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -653,17 +653,17 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="QsI-2P-QDa">
                                         <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
                                         <subviews>
-                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="Wib-02-9dq" customClass="KMPopUpButton" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="Wib-02-9dq" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                 <rect key="frame" x="-5" y="0.0" width="228" height="32"/>
-                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="rKK-kz-Z0l" customClass="KMPopUpButtonCell" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="rKK-kz-Z0l" customClass="KMPopUpButtonCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="menu"/>
                                                     <menu key="menu" id="rZf-rF-NEO"/>
                                                 </popUpButtonCell>
                                             </popUpButton>
-                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="7Er-ld-5uZ" customClass="KMPopUpButton" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="7Er-ld-5uZ" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                 <rect key="frame" x="222" y="0.0" width="227" height="32"/>
-                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="Fte-Qa-oBp" customClass="KMPopUpButtonCell" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="Fte-Qa-oBp" customClass="KMPopUpButtonCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="menu"/>
                                                     <menu key="menu" id="t7e-yw-29f"/>
@@ -700,7 +700,7 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="L0c-Gg-trb">
                                         <rect key="frame" x="0.0" y="72" width="449" height="32"/>
                                         <subviews>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="z3C-Fy-Fql">
+                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="z3C-Fy-Fql">
                                                 <rect key="frame" x="-2" y="8" width="32" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Font" id="Ysc-do-dSr">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -752,9 +752,9 @@
                                                     <constraint firstAttribute="trailing" secondItem="RDN-7G-Mvt" secondAttribute="trailing" constant="12" id="pga-uJ-rf8"/>
                                                 </constraints>
                                             </customView>
-                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="LLr-HQ-aZL" customClass="KMPopUpButton" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="LLr-HQ-aZL" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                 <rect key="frame" x="-5" y="0.0" width="370" height="32"/>
-                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="ed5-Z9-2S1" customClass="KMPopUpButtonCell" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="ed5-Z9-2S1" customClass="KMPopUpButtonCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="menu"/>
                                                     <menu key="menu" id="U11-VA-wse"/>
@@ -778,9 +778,9 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="NEl-XT-Hvr">
                                         <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
                                         <subviews>
-                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="gul-N2-cdJ" customClass="KMPopUpButton" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                            <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="gul-N2-cdJ" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                 <rect key="frame" x="-5" y="0.0" width="370" height="32"/>
-                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="WBs-AO-T0K" customClass="KMPopUpButtonCell" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                                <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="WBs-AO-T0K" customClass="KMPopUpButtonCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="menu"/>
                                                     <menu key="menu" id="ZBb-hq-bZ9"/>
@@ -789,12 +789,12 @@
                                                     <action selector="fontStylePopUpButtonAction:" target="-2" id="ppT-da-ImM"/>
                                                 </connections>
                                             </popUpButton>
-                                            <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oTS-Yh-ySx" customClass="KMComboBox" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                            <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oTS-Yh-ySx" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                 <rect key="frame" x="368" y="-2" width="84" height="35"/>
                                                 <constraints>
                                                     <constraint firstAttribute="width" constant="80" id="mhS-pZ-N4d"/>
                                                 </constraints>
-                                                <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" alignment="center" completes="NO" numberOfVisibleItems="5" id="QX7-7W-WIT" customClass="KMComboBoxCell" customModule="Cisdem_PDFMaster" customModuleProvider="target">
+                                                <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" alignment="center" completes="NO" numberOfVisibleItems="5" id="QX7-7W-WIT" customClass="KMComboBoxCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <font key="font" metaFont="system"/>
                                                     <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>

+ 9 - 9
PDF Office/PDF Master/Class/PDFTools/Measure/Window/CPerimeterMeasureInfoWindowController.xib

@@ -34,7 +34,7 @@
                         </constraints>
                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ImageNameToolbarPolyline" id="UoC-fH-pS8"/>
                     </imageView>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fuf-bl-vhH">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fuf-bl-vhH">
                         <rect key="frame" x="56" y="193" width="172" height="19"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="19" id="Hwv-xM-Tw4"/>
@@ -46,7 +46,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FkT-se-g48">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FkT-se-g48">
                         <rect key="frame" x="56" y="151" width="44" height="17"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="17" id="6rB-Wj-i1a"/>
@@ -58,7 +58,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GMr-eD-dPe">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GMr-eD-dPe">
                         <rect key="frame" x="56" y="122" width="53" height="17"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="49" id="Iqi-C5-0s6"/>
@@ -70,7 +70,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mx9-KK-QVJ">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mx9-KK-QVJ">
                         <rect key="frame" x="56" y="93" width="68" height="17"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="17" id="RiL-Yi-EzY"/>
@@ -82,7 +82,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S8f-V0-Jcv">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S8f-V0-Jcv">
                         <rect key="frame" x="56" y="64" width="45" height="17"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="17" id="YEn-J3-xqJ"/>
@@ -94,7 +94,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wxE-i8-Oyh">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wxE-i8-Oyh">
                         <rect key="frame" x="148" y="151" width="144" height="17"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="140" id="CZT-BR-EhO"/>
@@ -106,7 +106,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Esk-Mt-wGg">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Esk-Mt-wGg">
                         <rect key="frame" x="148" y="122" width="144" height="17"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="140" id="dBp-dW-QUc"/>
@@ -118,7 +118,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D8T-iy-XgH">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D8T-iy-XgH">
                         <rect key="frame" x="148" y="93" width="84" height="17"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="17" id="3aU-lE-wCe"/>
@@ -130,7 +130,7 @@
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gE6-un-ONi">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gE6-un-ONi">
                         <rect key="frame" x="148" y="64" width="84" height="17"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="80" id="PhV-jC-lXa"/>

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

@@ -110,6 +110,10 @@
     if ([_annotation isKindOfClass:[CSelfSignAnnotationFreeText class]]) {
         CSelfSignAnnotationFreeText *freeText = (CSelfSignAnnotationFreeText *)_annotation;
         annotationType = freeText.subType;
+    } else if ([_annotation isKindOfClass:[CPDFPolygonAnnotation class]]) {
+        annotationType = CAnnotationTypePolyGon;
+    } else if ([_annotation isKindOfClass:[CPDFPolylineAnnotation class]]) {
+        annotationType = CAnnotationTypePolyLine;
     } else if ([_annotation isKindOfClass:[CSelfSignAnnotation class]]) {
         CSelfSignAnnotation *selfSignAnnotation = (CSelfSignAnnotation *)_annotation;
         annotationType = selfSignAnnotation.annotationType;
@@ -1260,6 +1264,12 @@
            [_annotation isKindOfClass:[CPDFChoiceWidgetAnnotation class]] ||
            [_annotation isKindOfClass:[CPDFButtonWidgetAnnotation class]]) {
             color = [(CPDFFreeTextAnnotation *)_annotation fontColor];
+        } else if ([_annotation isKindOfClass:[CPDFLineAnnotation class]]) {
+            color = [(CPDFLineAnnotation *)_annotation fontColor];
+        } else if ([_annotation isKindOfClass:[CPDFPolygonAnnotation class]]) {
+            color = [(CPDFPolygonAnnotation *)_annotation fontColor];
+        } else if ([_annotation isKindOfClass:[CPDFPolylineAnnotation class]]) {
+            color = [(CPDFPolylineAnnotation *)_annotation fontColor];
         }
     } else {
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
@@ -1320,6 +1330,12 @@
                 [(CPDFFreeTextAnnotation *)annotation setFontColor:fontColor?:[NSColor blackColor]];
             } else if([annotation isKindOfClass:[CSelfSignAnnotationFreeText class]]) {
                 [(CSelfSignAnnotationFreeText *)annotation setFontColor:fontColor?:[NSColor blackColor]];
+            } else if ([annotation isKindOfClass:[CPDFLineAnnotation class]]) {
+                [(CPDFLineAnnotation *)annotation setFontColor:fontColor?:[NSColor blackColor]];
+            } else if ([_annotation isKindOfClass:[CPDFPolygonAnnotation class]]) {
+                [(CPDFPolygonAnnotation*)annotation setFontColor:fontColor?:[NSColor blackColor]];
+            } else if ([_annotation isKindOfClass:[CPDFPolylineAnnotation class]]) {
+                [(CPDFPolylineAnnotation*)annotation setFontColor:fontColor?:[NSColor blackColor]];
             }
         }
     }
@@ -1364,6 +1380,12 @@
             fontSize = [(CPDFFreeTextAnnotation *)_annotation font].pointSize;
         } else if ([_annotation isKindOfClass:[CPDFRedactAnnotation class]]) {
             fontSize = [(CPDFRedactAnnotation *)_annotation font].pointSize;
+        } else if ([_annotation isKindOfClass:[CPDFLineAnnotation class]]) {
+            fontSize = [(CPDFLineAnnotation *)_annotation fontSize];
+        } else if ([_annotation isKindOfClass:[CPDFPolygonAnnotation class]]) {
+            fontSize = [(CPDFPolygonAnnotation *)_annotation fontSize];
+        } else if ([_annotation isKindOfClass:[CPDFPolylineAnnotation class]]) {
+            fontSize = [(CPDFPolylineAnnotation *)_annotation fontSize];
         }
     } else {
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
@@ -1444,11 +1466,16 @@
         ([_annotation isKindOfClass:[CPDFFreeTextAnnotation class]] ||
                         [_annotation isKindOfClass:[CPDFTextWidgetAnnotation class]] ||
                         [_annotation isKindOfClass:[CPDFChoiceWidgetAnnotation class]] ||
+                        [_annotation isKindOfClass:[CPDFLineAnnotation class]] ||
+                        [_annotation isKindOfClass:[CPDFPolygonAnnotation class]] ||
+                        [_annotation isKindOfClass:[CPDFPolylineAnnotation class]] ||
                         ([_annotation isKindOfClass:[CPDFButtonWidgetAnnotation class]] && _annotationType == CAnnotationTypeActionButton))) {
         if ([_annotation isKindOfClass:[CPDFFreeTextAnnotation class]]) {
-            fontName = [(CPDFFreeTextAnnotation *)_annotation font].fontName;
+            fontName = [(CPDFFreeTextAnnotation *)_annotation cFont].familyName;
+        } else if ([_annotation isKindOfClass:[CPDFLineAnnotation class]]) {
+            fontName = [(CPDFFreeTextAnnotation *)_annotation cFont].familyName;
         } else {
-            fontName = [(CPDFWidgetAnnotation *)_annotation font].fontName;
+            fontName = [(CPDFWidgetAnnotation *)_annotation cFont].familyName;
         }
     } else {
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
@@ -1597,8 +1624,12 @@
             [_annotation isKindOfClass:[CPDFSquareAnnotation class]] ||
             [_annotation isKindOfClass:[CPDFRedactAnnotation class]]) {
             interiorColor = [(CPDFCircleAnnotation *)_annotation interiorColor];
-        } else if ([_annotation isKindOfClass:[CPDFLineAnnotation class]]) {
+        } else if ([_annotation isKindOfClass:[CPDFLineAnnotation class]]){
             interiorColor = [(CPDFLineAnnotation *)_annotation interiorColor];
+        } else if ([_annotation isKindOfClass:[CPDFPolygonAnnotation class]]){
+            interiorColor = [(CPDFPolygonAnnotation *)_annotation interiorColor];
+        } else if ([_annotation isKindOfClass:[CPDFPolylineAnnotation class]]){
+            interiorColor = [(CPDFPolylineAnnotation *)_annotation color];
         } else if ([_annotation isKindOfClass:[CPDFFreeTextAnnotation class]]) {
             interiorColor = [(CPDFCircleAnnotation *)_annotation color];
         }
@@ -1620,6 +1651,7 @@
                 interiorColor = [userDefaults PDFListViewColorForKey:CAnnotationRedactFillColorKey];
                 break;
             case CAnnotationTypeLine:
+            case CAnnotationTypePolyGon:
                 interiorColor = [userDefaults PDFListViewColorForKey:CLineNoteInteriorColorKey];
                 break;
             case CAnnotationTypeArrow:

+ 92 - 274
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLineAnnotation+PDFListView.swift

@@ -35,25 +35,32 @@ import Foundation
         
         if (self.isResizable()) {
             if((pdfView.activeAnnotations.count == 1 || pdfView.selectAnnotations.count > 0) || isHover) {
-                var point = self.startPoint
+                var point = startPoint
                 let delta = 4.0 * pdfView.unitWidth(on: self.page)
                 CPDFListViewDrawResizeHandle(context, point, delta, true)
                 
-                point = self.endPoint
+                point = endPoint
                 CPDFListViewDrawResizeHandle(context, point, delta, true)
+                if isMeasure {
+                    let translationDistance = measureInfo!.leadLength
+                    let normalVector = calculateNormalVector(startPoint: startPoint, endPoint: endPoint)
+                    let startPoint1 = translate(point: startPoint, withNormalVector: normalVector, distance: translationDistance)
+                    let endPoint1 = translate(point: endPoint, withNormalVector: normalVector, distance: translationDistance)
+                    point = NSMakePoint((startPoint1.x+endPoint1.x)/2, (startPoint1.y+endPoint1.y)/2)
+                    CPDFListViewDrawResizeHandle(context, point, delta, true)
+                }
             } else {
                 let rect = self.bounds
                 let lineWidth = pdfView.unitWidth(on: self.page)
                 context.saveGState()
                 let color = CPDFListViewConfig.defaultManager.annotationBorderColor.cgColor
                 context.setStrokeColor(color)
-                
                 if(isHover) {
-                    var length: [CGFloat] = [5.0, 5.0]
+                    let length: [CGFloat] = [5.0, 5.0]
                     context.setLineDash(phase: 0, lengths: length)
                     context.stroke(rect, width: lineWidth)
                 } else {
-                    context.stroke(KMRectInset(NSRectToCGRect(rect), 0,0), width: lineWidth)
+                    context.stroke(CGRectInset(NSRectToCGRect(rect), 0,0), width: lineWidth)
                 }
                 context.restoreGState()
             }
@@ -75,7 +82,21 @@ import Foundation
     
     override func hitTest(_ point: NSPoint) -> Bool {
         let delta = fmax(4.0, 0.5 * self.lineWidth())
-        return self.shouldDisplay() && CPDFListViewPointNearLineFromPointToPoint(CPDFListViewSubstractPoints(point, self.bounds.origin), CPDFListViewSubstractPoints(self.observedStartPoint(),self.bounds.origin), CPDFListViewSubstractPoints(self.observedEndPoint(),self.bounds.origin), delta)
+        if (self.isMeasure) {
+            let translationDistance = measureInfo!.leadLength
+            let normalVector = calculateNormalVector(startPoint: startPoint, endPoint: endPoint)
+            let translateStartPoint = translate(point: startPoint, withNormalVector: normalVector, distance: translationDistance)
+            if CPDFListViewPointNearLineFromPointToPoint(CPDFListViewSubstractPoints(point, bounds.origin), CPDFListViewSubstractPoints(observedStartPoint(), bounds.origin), CPDFListViewSubstractPoints(translateStartPoint, bounds.origin), delta) {
+                return shouldDisplay() && true
+            } else if CPDFListViewPointNearLineFromPointToPoint(CPDFListViewSubstractPoints(point, bounds.origin), CPDFListViewSubstractPoints(translateStartPoint, bounds.origin), CPDFListViewSubstractPoints(translateStartPoint, bounds.origin), delta) {
+                return shouldDisplay() && true
+            } else if CPDFListViewPointNearLineFromPointToPoint(CPDFListViewSubstractPoints(point, bounds.origin), CPDFListViewSubstractPoints(translateStartPoint, bounds.origin), CPDFListViewSubstractPoints(observedEndPoint(), bounds.origin), delta) {
+                return shouldDisplay() && true
+            }
+            return shouldDisplay() && false
+        } else {
+            return self.shouldDisplay() && CPDFListViewPointNearLineFromPointToPoint(CPDFListViewSubstractPoints(point, self.bounds.origin), CPDFListViewSubstractPoints(self.observedStartPoint(),self.bounds.origin), CPDFListViewSubstractPoints(self.observedEndPoint(),self.bounds.origin), delta)
+        }
     }
     
     func observedStartPoint() -> NSPoint {
@@ -94,20 +115,45 @@ import Foundation
         self.endPoint = point
     }
     
+    func setObservedMeasureInfo(_ distanceMeasureInfo: CPDFDistanceMeasureInfo) {
+        self.measureInfo = distanceMeasureInfo
+    }
+    
     override func resizeHandleForPoint(_ point: NSPoint, scaleFactor: CGFloat) -> CRectEdges {
         if (!self.isResizable()) {
             return CRectEdges(rawValue: 0)
         }
         let size = CPDFListViewMakeSquareSize(8 / scaleFactor)
-        if (NSPointInRect(point, CPDFListViewRectFromCenterAndSize(self.endPoint, size))) {
-            return .maxXEdgeMask
-        } else if (NSPointInRect(point, CPDFListViewRectFromCenterAndSize(self.startPoint, size))) {
-            return .minXEdgeMask
-        } else if (self.hitTest(point)) {
-            return .editInEdgeMask
-        }
         
-        return CRectEdges(rawValue: 0)
+        if (isMeasure) {
+            let translationDistance = measureInfo!.leadLength;
+            let normalVector = calculateNormalVector(startPoint: startPoint, endPoint: endPoint)
+            let translationStartPoint = translate(point: startPoint, withNormalVector: normalVector, distance: translationDistance)
+            let translationEndPoint = translate(point: endPoint, withNormalVector: normalVector, distance: translationDistance)
+            let midPoint = NSMakePoint((translationStartPoint.x+translationEndPoint.x)/2, (translationStartPoint.y+translationEndPoint.y)/2)
+            
+            if (NSPointInRect(point, CPDFListViewRectFromCenterAndSize(endPoint, size))) {
+                return .maxXEdgeMask
+            } else if (NSPointInRect(point, CPDFListViewRectFromCenterAndSize(startPoint, size))) {
+                return .minXEdgeMask
+            } else if (NSPointInRect(point, CPDFListViewRectFromCenterAndSize(midPoint, size))) {
+                return .midEdgeMask
+            } else if (hitTest(point)) {
+                return .editInEdgeMask
+            } else {
+                return CRectEdges(rawValue: 0);
+            }
+        } else {
+            if (NSPointInRect(point, CPDFListViewRectFromCenterAndSize(self.endPoint, size))) {
+                return .maxXEdgeMask;
+            } else if (NSPointInRect(point, CPDFListViewRectFromCenterAndSize(self.startPoint, size))) {
+                return .minXEdgeMask;
+            } else if (hitTest(point)) {
+                return .editInEdgeMask
+            } else {
+                return CRectEdges(rawValue: 0);
+            }
+        }
     }
     
     private static var _l_keys: Set<AnyHashable>?
@@ -124,6 +170,38 @@ import Foundation
         return CPDFLineAnnotation._l_keys
     }
     
+    @objc func pointsFromMeasure(startPoint: CGPoint, endPoint: CGPoint) -> [NSValue] {
+        var pointValues = [NSValue]()
+        guard let distanceMeasureInfo = self.measureInfo else {
+            return pointValues
+        }
+        let normalVector = self.calculateNormalVector(startPoint: startPoint, endPoint: endPoint)
+        let translatedStartPoint = self.translate(point: startPoint, withNormalVector: normalVector, distance: distanceMeasureInfo.leadLength)
+        let translatedEndPoint = self.translate(point: endPoint, withNormalVector: normalVector, distance: distanceMeasureInfo.leadLength)
+        pointValues.append(NSValue(point: startPoint))
+        pointValues.append(NSValue(point: translatedStartPoint))
+        pointValues.append(NSValue(point: translatedEndPoint))
+        pointValues.append(NSValue(point: endPoint))
+        return pointValues
+    }
+
+    @objc func translate(point: CGPoint, withNormalVector normalVector: CGPoint, distance: CGFloat) -> CGPoint {
+        let translatedPoint = CGPoint(x: point.x + normalVector.x * distance, y: point.y + normalVector.y * distance)
+        return translatedPoint
+    }
+
+    @objc func calculateNormalVector(startPoint: CGPoint, endPoint: CGPoint) -> CGPoint {
+        let dx = endPoint.x - startPoint.x
+        let dy = endPoint.y - startPoint.y
+        let length = sqrt(dx * dx + dy * dy)
+        
+        if length > 0 {
+            return CGPoint(x: -dy / length, y: dx / length)
+        } else {
+            return CGPoint.zero
+        }
+    }
+    
     class func annotationImage(annotationModel: CPDFAnnotationModel) -> NSImage? {
         let image = NSImage(size: NSMakeSize(50+annotationModel.lineWidth(), 50+annotationModel.lineWidth()))
         image.lockFocus()
@@ -413,266 +491,6 @@ extension CPDFLineAnnotation {
         return rect
     }
     
-    /*
-     
-     static void (*original_drawWithBox_inContext)(id, SEL, PDFDisplayBox, CGContextRef) = NULL;
-     static void (*original_setBounds)(id, SEL, NSRect) = NULL;
-
-     static inline void addLineTipToPath(CGMutablePathRef path, NSPoint point, CGFloat angle, PDFLineStyle lineStyle, CGFloat lineWidth) {
-         CGAffineTransform transform = CGAffineTransformRotate(CGAffineTransformMakeTranslation(point.x, point.y), angle);
-         switch (lineStyle) {
-             case kPDFLineStyleNone:
-                 return;
-             case kPDFLineStyleSquare:
-                 CGPathAddRect(path, &transform, NSMakeRect(-1.5 * lineWidth, -1.5 * lineWidth, 3.0 * lineWidth, 3.0 * lineWidth));
-                 break;
-             case kPDFLineStyleCircle:
-                 CGPathAddEllipseInRect(path, &transform, CGRectMake(-1.5 * lineWidth, -1.5 * lineWidth, 3.0 * lineWidth, 3.0 * lineWidth));
-                 break;
-             case kPDFLineStyleDiamond:
-                 CGPathMoveToPoint(path, &transform, 1.5 * lineWidth, 0.0);
-                 CGPathAddLineToPoint(path, &transform, 0.0,  1.5 * lineWidth);
-                 CGPathAddLineToPoint(path, &transform, -1.5 * lineWidth, 0.0);
-                 CGPathAddLineToPoint(path, &transform, 0.0,  -1.5 * lineWidth);
-                 CGPathCloseSubpath(path);
-                 break;
-             case kPDFLineStyleOpenArrow:
-                 CGPathMoveToPoint(path, &transform, -3.0 * lineWidth, 1.5 * lineWidth);
-                 CGPathAddLineToPoint(path, &transform, 0.0,  0.0);
-                 CGPathAddLineToPoint(path, &transform, -3.0 * lineWidth, -1.5 * lineWidth);
-                 break;
-             case kPDFLineStyleClosedArrow:
-                 CGPathMoveToPoint(path, &transform, -3.0 * lineWidth, 1.5 * lineWidth);
-                 CGPathAddLineToPoint(path, &transform, 0.0,  0.0);
-                 CGPathAddLineToPoint(path, &transform, -3.0 * lineWidth, -1.5 * lineWidth);
-                 CGPathCloseSubpath(path);
-                 break;
-         }
-     }
-
-     - (void)replacement_drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context {
-         if ([self hasAppearanceStream]) {
-             original_drawWithBox_inContext(self, _cmd, box, context);
-         } else {
-             NSPoint origin = [self bounds].origin;
-             NSPoint startPoint = SKAddPoints(origin, [self startPoint]);
-             NSPoint endPoint = SKAddPoints(origin, [self endPoint]);
-             CGFloat angle = atan2(endPoint.y - startPoint.y, endPoint.x - startPoint.x);
-             CGFloat lineWidth = [self lineWidth];
-             CGMutablePathRef path = CGPathCreateMutable();
-             CGContextSaveGState(context);
-             [[self page] transformContext:context forBox:box];
-             CGContextSetStrokeColorWithColor(context, [[self color] CGColor]);
-             CGContextSetLineWidth(context, lineWidth);
-             CGContextSetLineJoin(context, kCGLineJoinRound);
-             if ([self borderStyle] == kPDFBorderStyleDashed) {
-                 NSArray *dashPattern = [self dashPattern];
-                 NSInteger i, count = [dashPattern count];
-                 CGFloat dash[count];
-                 for (i = 0; i < count; i++)
-                     dash[i] = [[dashPattern objectAtIndex:i] doubleValue];
-                 CGContextSetLineDash(context, 0.0, dash, count);
-                 CGContextSetLineCap(context, kCGLineCapButt);
-             } else {
-                 CGContextSetLineCap(context, kCGLineCapRound);
-             }
-             CGPathMoveToPoint(path, NULL, startPoint.x, startPoint.y);
-             CGPathAddLineToPoint(path, NULL, endPoint.x, endPoint.y);
-             if ([self startLineStyle] != kPDFLineStyleNone)
-                 addLineTipToPath(path, startPoint, angle + M_PI, [self startLineStyle], lineWidth);
-             if ([self endLineStyle] != kPDFLineStyleNone)
-                 addLineTipToPath(path, endPoint, angle, [self endLineStyle], lineWidth);
-             CGContextBeginPath(context);
-             CGContextAddPath(context, path);
-             CGPathRelease(path);
-             CGContextStrokePath(context);
-             CGContextRestoreGState(context);
-         }
-     }
-
-     - (void)replacement_setBounds:(NSRect)newBounds {
-         NSPoint startPoint = [self startPoint];
-         NSPoint endPoint = [self endPoint];
-         original_setBounds(self, _cmd, newBounds);
-         [self setStartPoint:startPoint];
-         [self setEndPoint:endPoint];
-     }
-
-     + (void)load {
-         if (RUNNING(10_11))
-             original_drawWithBox_inContext = (void (*)(id, SEL, PDFDisplayBox, CGContextRef))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(drawWithBox:inContext:), @selector(replacement_drawWithBox:inContext:));
-         if (RUNNING(10_13))
-             original_setBounds = (void (*)(id, SEL, NSRect))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(setBounds:), @selector(replacement_setBounds:));
-     }
-
-     - (id)initSkimNoteWithBounds:(NSRect)bounds {
-         self = [super initSkimNoteWithBounds:bounds];
-         if (self) {
-             [self setColor:[[NSUserDefaults standardUserDefaults] colorForKey:SKLineNoteColorKey]];
-             NSColor *color = [[NSUserDefaults standardUserDefaults] colorForKey:SKLineNoteInteriorColorKey];
-             if ([color alphaComponent] > 0.0)
-                 [self setInteriorColor:color];
-             [self setStartLineStyle:[[NSUserDefaults standardUserDefaults] integerForKey:SKLineNoteStartLineStyleKey]];
-             [self setEndLineStyle:[[NSUserDefaults standardUserDefaults] integerForKey:SKLineNoteEndLineStyleKey]];
-             [self setStartPoint:NSMakePoint(0.0, 0.0)];
-             [self setEndPoint:NSMakePoint(NSWidth(bounds), NSHeight(bounds))];
-             PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init];
-             [border setLineWidth:[[NSUserDefaults standardUserDefaults] floatForKey:SKLineNoteLineWidthKey]];
-             [border setDashPattern:[[NSUserDefaults standardUserDefaults] arrayForKey:SKLineNoteDashPatternKey]];
-             [border setStyle:[[NSUserDefaults standardUserDefaults] floatForKey:SKLineNoteLineStyleKey]];
-             [self setBorder:[border lineWidth] > 0.0 ? border : nil];
-             [border release];
-         }
-         return self;
-     }
-
-     - (BOOL)isResizable { return [self isSkimNote]; }
-     - (BOOL)isMovable { return [self isSkimNote]; }
-
-     - (BOOL)hitTest:(NSPoint)point {
-         CGFloat delta = fmax(4.0, 0.5 * [self lineWidth]);
-         return [self shouldDisplay] && SKPointNearLineFromPointToPoint(SKSubstractPoints(point, [self bounds].origin), [self startPoint], [self endPoint], delta);
-     }
-
-     - (CGFloat)boundsOrder {
-         CGFloat delta = ceil(fmax(4.0 * [self lineWidth], 4.0));
-         NSPoint origin = [self bounds].origin;
-         NSRect startBounds = SKRectFromCenterAndSquareSize(SKAddPoints(origin, [self startPoint]), delta);
-         NSRect endBounds = SKRectFromCenterAndSquareSize(SKAddPoints(origin, [self endPoint]), delta);
-         PDFPage *page = [self page];
-         return fmin([page sortOrderForBounds:startBounds], [page sortOrderForBounds:endBounds]);
-     }
-
-     - (SKRectEdges)resizeHandleForPoint:(NSPoint)point scaleFactor:(CGFloat)scaleFactor {
-         if ([self isResizable] == NO)
-             return 0;
-         NSSize size = SKMakeSquareSize(8.0 / scaleFactor);
-         point = SKSubstractPoints(point, [self bounds].origin);
-         if (NSPointInRect(point, SKRectFromCenterAndSize([self endPoint], size)))
-             return SKMaxXEdgeMask;
-         else if (NSPointInRect(point, SKRectFromCenterAndSize([self startPoint], size)))
-             return SKMinXEdgeMask;
-         else
-             return 0;
-     }
-
-     - (void)drawSelectionHighlightForView:(PDFView *)pdfView inContext:(CGContextRef)context {
-         if (NSIsEmptyRect([self bounds]))
-             return;
-         BOOL active = RUNNING_AFTER(10_12) ? YES : [[pdfView window] isKeyWindow] && [[[pdfView window] firstResponder] isDescendantOf:pdfView];
-         NSPoint origin = [self bounds].origin;
-         NSPoint point = SKAddPoints(origin, [self startPoint]);
-         CGFloat delta = 4.0 * [pdfView unitWidthOnPage:[self page]];
-         SKDrawResizeHandle(context, point, delta, active);
-         point = SKAddPoints(origin, [self endPoint]);
-         SKDrawResizeHandle(context, point, delta, active);
-     }
-
-     - (NSSet *)keysForValuesToObserveForUndo {
-         static NSSet *lineKeys = nil;
-         if (lineKeys == nil) {
-             NSMutableSet *mutableKeys = [[super keysForValuesToObserveForUndo] mutableCopy];
-             [mutableKeys addObject:SKNPDFAnnotationStartLineStyleKey];
-             [mutableKeys addObject:SKNPDFAnnotationEndLineStyleKey];
-             [mutableKeys addObject:SKPDFAnnotationObservedStartPointKey];
-             [mutableKeys addObject:SKPDFAnnotationObservedEndPointKey];
-             [mutableKeys addObject:SKNPDFAnnotationInteriorColorKey];
-             lineKeys = [mutableKeys copy];
-             [mutableKeys release];
-         }
-         return lineKeys;
-     }
-
-     #pragma mark Scripting support
-
-     + (NSSet *)customScriptingKeys {
-         static NSSet *customLineScriptingKeys = nil;
-         if (customLineScriptingKeys == nil) {
-             NSMutableSet *customKeys = [[super customScriptingKeys] mutableCopy];
-             [customKeys addObject:SKPDFAnnotationStartPointAsQDPointKey];
-             [customKeys addObject:SKPDFAnnotationEndPointAsQDPointKey];
-             [customKeys addObject:SKPDFAnnotationScriptingStartLineStyleKey];
-             [customKeys addObject:SKPDFAnnotationScriptingEndLineStyleKey];
-             [customKeys addObject:SKPDFAnnotationScriptingInteriorColorKey];
-             customLineScriptingKeys = [customKeys copy];
-             [customKeys release];
-         }
-         return customLineScriptingKeys;
-     }
-
-     - (void)setStartPointAsQDPoint:(NSData *)inQDPointAsData {
-         if ([self isEditable] && inQDPointAsData && [inQDPointAsData isEqual:[NSNull null]] == NO) {
-             NSPoint startPoint = [inQDPointAsData pointValueAsQDPoint];
-             
-             NSRect bounds = [self bounds];
-             NSPoint endPoint = SKIntegralPoint(SKAddPoints([self endPoint], bounds.origin));
-             
-             bounds = SKIntegralRectFromPoints(startPoint, endPoint);
-             
-             if (NSWidth(bounds) < 8.0) {
-                 bounds.size.width = 8.0;
-                 bounds.origin.x = floor(0.5 * (startPoint.x + endPoint.x) - 4.0);
-             }
-             if (NSHeight(bounds) < 8.0) {
-                 bounds.size.height = 8.0;
-                 bounds.origin.y = floor(0.5 * (startPoint.y + endPoint.y) - 4.0);
-             }
-             
-             startPoint = SKSubstractPoints(startPoint, bounds.origin);
-             endPoint = SKSubstractPoints(endPoint, bounds.origin);
-             
-             [self setBounds:bounds];
-             [self setObservedStartPoint:startPoint];
-             [self setObservedEndPoint:endPoint];
-         }
-
-     }
-
-     - (NSData *)startPointAsQDPoint {
-         NSRect bounds = [self bounds];
-         NSPoint startPoint = SKAddPoints([self startPoint], bounds.origin);
-         startPoint.x = floor(startPoint.x);
-         startPoint.y = floor(startPoint.y);
-         return [NSData dataWithPointAsQDPoint:startPoint];
-     }
-
-     - (void)setEndPointAsQDPoint:(NSData *)inQDPointAsData {
-         if ([self isEditable] && inQDPointAsData && [inQDPointAsData isEqual:[NSNull null]] == NO) {
-             NSPoint endPoint = [inQDPointAsData pointValueAsQDPoint];
-             
-             NSRect bounds = [self bounds];
-             NSPoint startPoint = SKIntegralPoint(SKAddPoints([self startPoint], bounds.origin));
-             
-             bounds = SKIntegralRectFromPoints(startPoint, endPoint);
-             
-             if (NSWidth(bounds) < 8.0) {
-                 bounds.size.width = 8.0;
-                 bounds.origin.x = floor(0.5 * (startPoint.x + endPoint.x) - 4.0);
-             }
-             if (NSHeight(bounds) < 8.0) {
-                 bounds.size.height = 8.0;
-                 bounds.origin.y = floor(0.5 * (startPoint.y + endPoint.y) - 4.0);
-             }
-             
-             startPoint = SKSubstractPoints(startPoint, bounds.origin);
-             endPoint = SKSubstractPoints(endPoint, bounds.origin);
-             
-             [self setBounds:bounds];
-             [self setObservedStartPoint:startPoint];
-             [self setObservedEndPoint:endPoint];
-         }
-
-     }
-
-     - (NSData *)endPointAsQDPoint {
-         NSRect bounds = [self bounds];
-         NSPoint endPoint = SKAddPoints([self endPoint], bounds.origin);
-         endPoint.x = floor(endPoint.x);
-         endPoint.y = floor(endPoint.y);
-         return [NSData dataWithPointAsQDPoint:endPoint];
-     }
-     */
-    
     override func colorDefaultKey() -> String? {
         return KMLineNoteColorKey
     }

+ 142 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFPolygonAnnotation+PDFListView.swift

@@ -0,0 +1,142 @@
+//
+//  CPDFPolygonAnnotation+PDFListView.swift
+//  Cisdem PDFMaster
+//
+//  Created by wanjun on 2024/7/17.
+//
+
+import Foundation
+
+@objc extension CPDFPolygonAnnotation {
+    override func drawSelectionHighlightForView(_ pdfView: CPDFListView, inContext context: CGContext, isHover: Bool) {
+        guard !NSIsEmptyRect(self.bounds) else { return }
+
+        if self.isResizable() {
+            if (pdfView.activeAnnotations.count == 1 || pdfView.selectAnnotations.count > 0) || isHover {
+                guard let pointsArray = self.savePoints as? [NSValue] else { return }
+                let delta = 4.0 * pdfView.unitWidth(on: self.page)
+                for saveValue in pointsArray {
+                    let savePoint = saveValue.pointValue
+                    CPDFListViewDrawResizeHandle(context, savePoint, delta, true)
+                }
+            } else {
+                let rect = self.bounds
+                let lineWidth = pdfView.unitWidth(on: self.page)
+                context.saveGState()
+                let color = CPDFListViewConfig.defaultManager.annotationBorderColor.cgColor
+                context.setStrokeColor(color)
+                if isHover {
+                    let lengths: [CGFloat] = [5, 5]
+                    context.setLineDash(phase: 0, lengths: lengths)
+                    context.stroke(rect.insetBy(dx: 0, dy: 0), width: lineWidth)
+                } else {
+                    context.stroke(rect.insetBy(dx: 0, dy: 0), width: lineWidth)
+                }
+                context.restoreGState()
+            }
+        }
+        self.drawPolygonStart(in: context)
+    }
+    
+    override func borderRecct(for pdfView: CPDFListView) -> CGRect {
+        let rect = pdfView.integralRect(bounds, on: page)
+        return rect
+    }
+
+    override func resizeHandleForPoint(_ point: NSPoint, scaleFactor: CGFloat) -> CRectEdges {
+        guard self.isResizable() else { return CRectEdges(rawValue: 0) }
+
+        let size = CPDFListViewMakeSquareSize(8 / scaleFactor)
+        if CPDFListViewConfig.defaultManager.isSquareFromPolygon {
+            guard let savePoints = self.savePoints as? [NSValue] else { return CRectEdges(rawValue: 0) }
+            for saveValue in savePoints {
+                let savePoint = saveValue.pointValue
+                if NSPointInRect(point, CPDFListViewRectFromCenterAndSize(savePoint, size)) {
+                    switch savePoints.firstIndex(of: saveValue) {
+                    case 3:
+                        return [.minXEdgeMask, .maxYEdgeMask]
+                    case 2:
+                        return [.maxXEdgeMask, .maxYEdgeMask]
+                    case 1:
+                        return [.maxXEdgeMask, .minYEdgeMask]
+                    case 0:
+                        return [.minXEdgeMask, .minYEdgeMask]
+                    default:
+                        return CRectEdges(rawValue: 0)
+                    }
+                }
+            }
+        } else {
+            guard let savePoints = self.savePoints as? [NSValue] else { return CRectEdges(rawValue: 0) }
+            for saveValue in savePoints {
+                let savePoint = saveValue.pointValue
+                if NSPointInRect(point, CPDFListViewRectFromCenterAndSize(savePoint, size)) {
+                    CPDFListViewConfig.defaultManager.polygonSelectIndex = savePoints.firstIndex(of: saveValue) ?? NSNotFound
+                    return .minXEdgeMask
+                }
+            }
+        }
+
+        if self.hitTest(point) {
+            return .editInEdgeMask
+        } else {
+            return CRectEdges(rawValue: 0)
+        }
+    }
+
+    override func isResizable() -> Bool {
+        return true
+    }
+
+    override func isMovable() -> Bool {
+        return true
+    }
+
+    override func hitTest(_ point: NSPoint) -> Bool {
+        let delta = max(4.0, 0.5 * self.lineWidth())
+        guard let pointsArray = self.savePoints as? [NSValue] else { return false }
+        if pointsArray.count >= 2 {
+            for i in 0..<pointsArray.count - 1 {
+                let pointValueA = pointsArray[i]
+                let pointValueB = pointsArray[i + 1]
+                let pointA = pointValueA.pointValue
+                let pointB = pointValueB.pointValue
+                if CPDFListViewPointNearLineFromPointToPoint(point, pointA, pointB, delta) {
+                    return self.shouldDisplay() && CPDFListViewPointNearLineFromPointToPoint(point, pointA, pointB, delta)
+                }
+            }
+            let startPoint = pointsArray.first!.pointValue
+            let endPoint = pointsArray.last!.pointValue
+            if CPDFListViewPointNearLineFromPointToPoint(point, startPoint, endPoint, delta) {
+                return self.shouldDisplay() && CPDFListViewPointNearLineFromPointToPoint(point, startPoint, endPoint, delta)
+            }
+        }
+        return false
+    }
+
+    override func keysForValuesToObserveForUndo() -> Set<AnyHashable> {
+        var superKeys = super.keysForValuesToObserveForUndo()
+        let additionalKeys: Set<AnyHashable> = ["cFont",
+                                                "fontColor",
+                                                "savePoints",
+                                                "interiorOpacity",
+                                                "interiorColor"]
+        superKeys!.formUnion(additionalKeys)
+        return superKeys!
+    }
+
+    func drawPolygonStart(in context: CGContext) {
+        guard let pointsArray = self.savePoints as? [NSValue], pointsArray.count == 2 else { return }
+        let startPoint = pointsArray.first!.pointValue
+        let endPoint = pointsArray.last!.pointValue
+        context.saveGState()
+        let color = self.color.cgColor
+        context.setStrokeColor(color)
+        let dashs: [CGFloat] = [5.0, 5.0]
+        context.setLineDash(phase: 0, lengths: dashs)
+        context.move(to: CGPoint(x: startPoint.x, y: startPoint.y))
+        context.addLine(to: CGPoint(x: endPoint.x, y: endPoint.y))
+        context.strokePath()
+        context.restoreGState()
+    }
+}

+ 99 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFPolylineAnnotation+PDFListView.swift

@@ -0,0 +1,99 @@
+//
+//  CPDFPolylineAnnotation+PDFListView.swift
+//  Cisdem PDFMaster
+//
+//  Created by wanjun on 2024/7/17.
+//
+
+import Foundation
+
+@objc extension CPDFPolylineAnnotation {
+    override func drawSelectionHighlightForView(_ pdfView: CPDFListView, inContext context: CGContext, isHover: Bool) {
+        guard !NSIsEmptyRect(self.bounds) else { return }
+        if self.isResizable() {
+            if (pdfView.activeAnnotations.count == 1 || pdfView.selectAnnotations.count > 0) || isHover {
+                let pointsArray = self.savePoints()
+                let delta = 4.0 * pdfView.unitWidth(on: self.page)
+                for saveValue in pointsArray {
+                    let savePoint = saveValue.pointValue
+                    CPDFListViewDrawResizeHandle(context, savePoint, delta, true)
+                }
+            } else {
+                let rect = self.bounds
+                let lineWidth = pdfView.unitWidth(on: self.page)
+                context.saveGState()
+                let color = CPDFListViewConfig.defaultManager.annotationBorderColor.cgColor
+                context.setStrokeColor(color)
+                if isHover {
+                    let lengths: [CGFloat] = [5, 5]
+                    context.setLineDash(phase: 0, lengths: lengths)
+                    context.stroke(rect, width: lineWidth)
+                } else {
+                    context.stroke(rect.insetBy(dx: 0, dy: 0), width: lineWidth)
+                }
+                context.restoreGState()
+            }
+        }
+    }
+    
+    override func borderRecctForView(_ pdfView: CPDFListView) -> CGRect {
+        let rect = pdfView.integralRect(bounds, on: page)
+        return rect
+    }
+    
+    override func resizeHandleForPoint(_ point: NSPoint, scaleFactor: CGFloat) -> CRectEdges {
+        guard self.isResizable() else { return [] }
+        let size = CPDFListViewMakeSquareSize(8 / scaleFactor)
+        for saveValue in self.savePoints() {
+            let savePoint = saveValue.pointValue
+            if NSPointInRect(point, CPDFListViewRectFromCenterAndSize(savePoint, size)) {
+                CPDFListViewConfig.defaultManager.polylineSelectIndex = self.savePoints().firstIndex(of: saveValue)!
+                return .minXEdgeMask
+            }
+        }
+        
+        if self.hitTest(point) {
+            return .editInEdgeMask
+        } else {
+            return CRectEdges(rawValue: 0)
+        }
+    }
+    
+    override func keysForValuesToObserveForUndo() -> Set<AnyHashable> {
+        var superKeys = super.keysForValuesToObserveForUndo()
+        let additionalKeys: Set<AnyHashable> = ["cFont",
+                                                "fontColor",
+                                                "savePoints",
+                                                "interiorOpacity",
+                                                "interiorColor"]
+        superKeys!.formUnion(additionalKeys)
+        return superKeys!
+    }
+    
+    override func isResizable() -> Bool {
+        return true
+    }
+
+    override func isMovable() -> Bool {
+        return true
+    }
+        
+    override func hitTest(_ point: NSPoint) -> Bool {
+        let delta = max(4.0, 0.5 * self.lineWidth())
+        let pointsArray = self.savePoints()
+        if pointsArray.count >= 2 {
+            for i in 0..<pointsArray.count - 1 {
+                let pointValueA = pointsArray[i]
+                let pointValueB = pointsArray[i + 1]
+                let pointA = pointValueA.pointValue
+                let pointB = pointValueB.pointValue
+                
+                let isNear = CPDFListViewPointNearLineFromPointToPoint(point, pointA, pointB, delta)
+                if isNear {
+                    return self.shouldDisplay() && isNear
+                }
+            }
+        }
+        return false
+    }
+}

+ 16 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView+Private.h

@@ -92,6 +92,22 @@ enum {
 
 @property (nonatomic,assign) BOOL isEditImage;
 
+@property (nonatomic, retain) CPDFPolylineAnnotation *clickPolylineAnnotation;
+
+@property (nonatomic, assign) NSUInteger polylineClickNumber;
+
+@property (nonatomic, retain) CPDFPolygonAnnotation *clickPolygonAnnotation;
+
+@property (nonatomic, retain) CPDFPolygonAnnotation *clickSquareFronPolygonAnnotation;
+
+@property (nonatomic, assign) BOOL isActiveSquare;
+
+@property (nonatomic, assign) NSPoint clickSquareFronPolygonOriginalPagePoint;
+
+@property (nonatomic, assign) NSRect clickSquareFronPolygonOriginalBounds;
+
+@property (nonatomic, assign) NSUInteger polygonClickNumber;
+
 - (void)updateIsRightActiveAnnotations:(NSArray<CPDFAnnotation *> *)activeAnnotations;
 
 - (void)addAnnotation:(CPDFAnnotation *)annotation toPage:(CPDFPage *)page;

+ 11 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.h

@@ -52,8 +52,8 @@ typedef NS_ENUM(NSInteger, CAnnotationType) {
     CAnnotationTypeArrow,
     CAnnotationTypeSquare,
     CAnnotationTypeCircle,
-    /*CAnnotationTypePolyGon,*/
-    /*CAnnotationTypePolyLine,*/
+    CAnnotationTypePolyGon,
+    CAnnotationTypePolyLine,
     CAnnotationTypeHighlight,
     CAnnotationTypeUnderline,
 //    CAnnotationTypeSquiggly,
@@ -102,6 +102,7 @@ typedef NS_ENUM(NSInteger, CToolMode) {
     CFormToolMode,
     CSelfSignMode,
     CRedactToolMode,
+    CMeasureToolMode,
     CRedactErasureToolMode,
     CEditPDFToolMode,
 };
@@ -223,6 +224,12 @@ enum {
 
 @property (nonatomic, assign) BOOL editAreaBoundUpdating;
 
+// Measurement attribute setting
+@property (nonatomic, retain) CPDFDistanceMeasureInfo *distanceMeasureInfo;
+@property (nonatomic, retain) CPDFPerimeterMeasureInfo *perimeterMeasureInfo;
+@property (nonatomic, retain) CPDFAreaMeasureInfo *polygonAreaMeasureInfo;
+@property (nonatomic, retain) CPDFAreaMeasureInfo *squareAreaMeasureInfo;
+
 - (CPDFAnnotation *)addAnnotationWithType:(CAnnotationType)annotationType selection:(CPDFSelection *)selection page:(CPDFPage *)page bounds:(NSRect)bounds;
 - (void)addAnnotationWithAnnotation:(CPDFAnnotation *)annotation toPage:(CPDFPage *)page;
 
@@ -337,4 +344,6 @@ enum {
 
 - (void)PDFListView:(CPDFListView *)pdfView documentDataDidChanged:(id)docData withInfo:(NSDictionary *)info;
 
+- (void)PDFListViewAnnotationMeasureInfoChange:(CPDFListView *)pdfListView withAnnotation:(CPDFAnnotation *)annotation;
+
 @end

+ 33 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -91,6 +91,11 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
     self.clickLineAnnotation = nil;
     self.isClickDoubleCreatLine = NO;
     
+    self.perimeterMeasureInfo = [[CPDFPerimeterMeasureInfo alloc] init];
+    self.polygonAreaMeasureInfo = [[CPDFAreaMeasureInfo alloc] init];
+    self.squareAreaMeasureInfo = [[CPDFAreaMeasureInfo alloc] init];
+    self.distanceMeasureInfo = [[CPDFDistanceMeasureInfo alloc] init];
+    
     NSArray *sendTypes = [NSArray arrayWithObjects:NSPasteboardTypePDF, NSPasteboardTypeTIFF, nil];
     [NSApp registerServicesMenuSendTypes:sendTypes returnTypes:[NSArray array]];
     
@@ -333,6 +338,10 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
     if (_annotationType != annotationType) {
         if(CAnnotationTypeLink == annotationType || CAnnotationTypeLink == _annotationType)
             [self setNeedsDisplayAnnotationViewForVisiblePages];
+        
+        if(annotationType == CAnnotationTypeUnkown) {
+            [self endMeasureModeAddAnnotation];
+        }
 
         _annotationType = annotationType;
         
@@ -694,15 +703,26 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
                 annotation.bounds = bounds;
                 break;
             case CAnnotationTypeSquare:
-                annotation = [[CPDFSquareAnnotation alloc]initWithPDFListViewNoteWith:self.document];
-                annotation.bounds = bounds;
+                if (CMeasureToolMode == self.toolMode) {
+                    annotation = [[CPDFPolygonAnnotation alloc] initWithDocument:self.document];
+                    [CPDFListViewConfig defaultManager].isSquareFromPolygon = NO;
+                    annotation.bounds = bounds;
+                } else {
+                    annotation = [[CPDFSquareAnnotation alloc] initWithPDFListViewNoteWith:self.document];
+                    annotation.bounds = bounds;
+                }
                 break;
             case CAnnotationTypeLine:
                 annotation = [[CPDFLineAnnotation alloc]initWithPDFListViewNoteWith:self.document annotationType:CAnnotationTypeLine];
                 [(CPDFLineAnnotation *)annotation setObservedStartPoint:CGPointMake(bounds.origin.x, bounds.origin.y)];
                 [(CPDFLineAnnotation *)annotation setObservedEndPoint:CGPointMake(bounds.origin.x + bounds.size.width,bounds.origin.y+ bounds.size.height)];
-                [(CPDFLineAnnotation *)annotation setStartLineStyle:CPDFLineStyleNone];
-                [(CPDFLineAnnotation *)annotation setEndLineStyle:CPDFLineStyleNone];
+                if (self.toolMode == CMeasureToolMode) {
+                    [(CPDFLineAnnotation *)annotation setStartLineStyle:CPDFLineStyleOpenArrow];
+                    [(CPDFLineAnnotation *)annotation setEndLineStyle:CPDFLineStyleOpenArrow];
+                } else if (self.toolMode == CNoteToolMode) {
+                    [(CPDFLineAnnotation *)annotation setStartLineStyle:CPDFLineStyleNone];
+                    [(CPDFLineAnnotation *)annotation setEndLineStyle:CPDFLineStyleNone];
+                }
                 break;
             case CAnnotationTypeArrow: {
                 annotation = [[CPDFLineAnnotation alloc]initWithPDFListViewNoteWith:self.document annotationType:CAnnotationTypeArrow];
@@ -754,6 +774,15 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
             case CAnnotationTypeRedact:
                 annotation = [self addRedactPDFSelection:selection];
                 break;
+            case CAnnotationTypePolyLine:
+                annotation = [[CPDFPolylineAnnotation alloc] initWithDocument:self.document];
+                annotation.bounds = bounds;
+                break;
+            case CAnnotationTypePolyGon:
+                annotation = [[CPDFPolygonAnnotation alloc] initWithDocument:self.document];
+                [CPDFListViewConfig defaultManager].isSquareFromPolygon = NO;
+                annotation.bounds = bounds;
+                break;
             default:
                 break;
         }

+ 31 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewConfig.swift

@@ -13,7 +13,10 @@ class CPDFListViewConfig: NSObject {
     var _annotationBorderColor: NSColor = NSColor(red: 82.0/255.0, green: 102.0/255.0, blue: 204.0/255.0, alpha: 1)
     var _dragHoverColor: NSColor = NSColor(red: 23/255.0, green: 112/255.0, blue: 244/255.0, alpha: 1.0)
     var isSaveDefault: Bool = false
-    
+    var _isSquareFromPolygon: Bool = false
+    var _polylineSelectIndex: Int = 0
+    var _polygonSelectIndex: Int = 0
+
     static let defaultManager: CPDFListViewConfig = {
         let config = CPDFListViewConfig()
         return config
@@ -47,4 +50,31 @@ class CPDFListViewConfig: NSObject {
             _dragHoverColor = newValue
         }
     }
+    
+    var isSquareFromPolygon: Bool {
+        get {
+            return _isSquareFromPolygon
+        }
+        set {
+            _isSquareFromPolygon = newValue
+        }
+    }
+    
+    var polylineSelectIndex: Int {
+        get {
+            return _polylineSelectIndex
+        }
+        set {
+            _polylineSelectIndex = newValue
+        }
+    }
+    
+    var polygonSelectIndex: Int {
+        get {
+            return _polygonSelectIndex
+        }
+        set {
+            _polygonSelectIndex = newValue
+        }
+    }
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 913 - 71
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m


+ 7 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+KeyEvent.m

@@ -115,6 +115,13 @@
             [self updateActiveAnnotations:@[]];
             [self setNeedsDisplayAnnotationViewForPage:page];
         }
+    } else if ((self.clickPolylineAnnotation ||
+                self.clickPolygonAnnotation ||
+                self.clickSquareFronPolygonAnnotation ||
+                (self.clickLineAnnotation && self.isClickDoubleCreatLine)) && eventChar == CPDFListEscapeCharacter) {
+        [self endMeasureModeAddAnnotation];
+        [self setNeedsDisplayAnnotationViewForVisiblePages];
+        [self setAnnotationType:CAnnotationTypeUnkown];
     } else if (CAnnotationTypeUnkown != [self annotationType] && eventChar == CPDFListEscapeCharacter) {
         if ((self.toolMode == CEditPDFToolMode) && (self.annotationType == CAnnotationTypeAddText || self.annotationType == CAnnotationTypeAddImage)) {
 //            [[NSNotificationCenter defaultCenter] postNotificationName:@"CEditPDFToolModeChangeStateUnkown" object:self];

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Tool.h

@@ -71,6 +71,8 @@ typedef NS_ENUM(NSInteger, CAnnotationAlignState) {
 
 -(void)hidenHUDHint;
 
+- (CGRect)borderRecctForSavePoints:(NSMutableArray<NSValue *> *)savePoints;
+
 // 缩放 鼠标滚轮
 - (void)magnifyWheel:(NSEvent *)theEvent;
 
@@ -89,5 +91,7 @@ typedef NS_ENUM(NSInteger, CAnnotationAlignState) {
 
 - (void)resetPDFToolTipRectsForAfterDelay;
 
+- (void)endMeasureModeAddAnnotation;
+
 @end
 

+ 120 - 65
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Tool.m

@@ -235,7 +235,8 @@
         CFormToolMode == self.toolMode ||
         CSelfSignMode == self.toolMode ||
         CRedactToolMode == self.toolMode ||
-        CRedactErasureToolMode == self.toolMode) {
+        CRedactErasureToolMode == self.toolMode ||
+        CMeasureToolMode == self.toolMode) {
         if (self.annotationType == CAnnotationTypeInk || self.annotationType == CAnnotationTypeEraser) {
             return NO;
         }
@@ -424,82 +425,112 @@
     return points;
 }
 
+- (void)endMeasureModeAddAnnotation {
+    if(self.clickPolylineAnnotation) {
+        NSMutableArray<NSValue *> *savePoints = [NSMutableArray arrayWithArray:self.clickPolylineAnnotation.savePoints];
+        if (savePoints.count >= 2) {
+            if (self.pdfListViewDelegate && [self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewAnnotationMeasureInfoChange:withAnnotation:)]) {
+                [self.pdfListViewDelegate PDFListViewAnnotationMeasureInfoChange:self withAnnotation:self.clickPolylineAnnotation];
+            }
+        }
+        
+        self.clickPolylineAnnotation = nil;
+        self.polylineClickNumber = 0;
+        [self updateActiveAnnotations:@[]];
+
+    } else if (self.clickPolygonAnnotation) {
+        NSMutableArray<NSValue *> *savePoints = [NSMutableArray arrayWithArray:self.clickPolygonAnnotation.savePoints];
+        if (savePoints.count > 2) {
+            if (self.pdfListViewDelegate && [self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewAnnotationMeasureInfoChange:withAnnotation:)]) {
+                [self.pdfListViewDelegate PDFListViewAnnotationMeasureInfoChange:self withAnnotation:self.clickPolygonAnnotation];
+            }
+            
+          
+        } else {
+            [self.clickPolygonAnnotation.page removeAnnotation:self.clickPolygonAnnotation];
+        }
+        self.clickPolygonAnnotation = nil;
+        self.polygonClickNumber = 0;
+        [self updateActiveAnnotations:@[]];
+    } else if (self.clickSquareFronPolygonAnnotation) {
+        if (self.pdfListViewDelegate && [self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewAnnotationMeasureInfoChange:withAnnotation:)]) {
+            [self.pdfListViewDelegate PDFListViewAnnotationMeasureInfoChange:self withAnnotation:self.clickSquareFronPolygonAnnotation];
+        }
+        self.clickSquareFronPolygonAnnotation = nil;
+        [self updateActiveAnnotations:@[]];
+    } else if (self.clickLineAnnotation && self.isClickDoubleCreatLine) {
+        self.clickLineAnnotation = nil;
+        self.isClickDoubleCreatLine = NO;
+    }
+}
+
 - (void)dragAnnotationReferenceLine:(CPDFAnnotation *)annotation {
     [self removeShapeLayer];
     
-    CAnnotationAlignState state = [self isAlignedWithOtherForms:annotation];
-    if (state != CAnnotationAlignStateNone && annotation) {
+    if ([self isAlignedWithOtherForms:annotation] && annotation) {
         CGRect bounds = annotation.bounds;
         NSRect rect = [self convertRect:bounds fromPage:self.currentPage];
-        [self drawLineOfDashByCAShapeLayer:rect withAlignState:state];
+        [self drawLineOfDashByCAShapeLayer:rect];
     }
 }
 
-- (void)drawLineOfDashByCAShapeLayer:(CGRect)frame withAlignState:(CAnnotationAlignState)state {
+- (void)drawLineOfDashByCAShapeLayer:(CGRect)frame {
     NSColor *lineColor = [CPDFListViewConfig defaultManager].dragHoverColor;
     CGFloat lineWidth = [self unitWidthOnPage:self.currentPage];
     
-    if (state == CAnnotationAlignStateTop) {
-        self.shapeLayerTopH = [CAShapeLayer layer];
-        [self.shapeLayerTopH setFrame:frame];
-        [self.shapeLayerTopH setFillColor:[NSColor clearColor].CGColor];
-        [self.shapeLayerTopH setStrokeColor:lineColor.CGColor];
-        [self.shapeLayerTopH setLineWidth:lineWidth];   // 设置虚线宽度
-        [self.shapeLayerTopH setLineJoin:kCALineJoinRound];
-    //    [self.shapeLayerTopH setLineDashPattern:[NSArray arrayWithObjects:[NSNumber numberWithInt:20], [NSNumber numberWithInt:20], nil]];  // 设置线宽,线间距
-        // 设置路径
-        CGMutablePathRef path1 = CGPathCreateMutable();
-        CGPathMoveToPoint(path1, NULL,  -CGRectGetWidth(self.frame), 0);
-        CGPathAddLineToPoint(path1, NULL, 2*CGRectGetWidth(self.frame), 0);
-        [self.shapeLayerTopH setPath:path1];
-        CGPathRelease(path1);
-        [self.layer addSublayer:self.shapeLayerTopH];
-    }
+    self.shapeLayerTopH = [CAShapeLayer layer];
+    [self.shapeLayerTopH setFrame:frame];
+    [self.shapeLayerTopH setFillColor:[NSColor clearColor].CGColor];
+    [self.shapeLayerTopH setStrokeColor:lineColor.CGColor];
+    [self.shapeLayerTopH setLineWidth:lineWidth];   // 设置虚线宽度
+    [self.shapeLayerTopH setLineJoin:kCALineJoinRound];
+//    [self.shapeLayerTopH setLineDashPattern:[NSArray arrayWithObjects:[NSNumber numberWithInt:20], [NSNumber numberWithInt:20], nil]];  // 设置线宽,线间距
+    // 设置路径
+    CGMutablePathRef path1 = CGPathCreateMutable();
+    CGPathMoveToPoint(path1, NULL,  -CGRectGetWidth(self.frame), 0);
+    CGPathAddLineToPoint(path1, NULL, 2*CGRectGetWidth(self.frame), 0);
+    [self.shapeLayerTopH setPath:path1];
+    CGPathRelease(path1);
+    [self.layer addSublayer:self.shapeLayerTopH];
     
-    if (state == CAnnotationAlignStateBottom) {
-        self.shapeLayerBottomH = [CAShapeLayer layer];
-        [self.shapeLayerBottomH setFrame:frame];
-        [self.shapeLayerBottomH setFillColor:[NSColor clearColor].CGColor];
-        [self.shapeLayerBottomH setStrokeColor:lineColor.CGColor];
-        [self.shapeLayerBottomH setLineWidth:lineWidth];
-        [self.shapeLayerBottomH setLineJoin:kCALineJoinRound];
-        CGMutablePathRef path2 = CGPathCreateMutable();
-        CGPathMoveToPoint(path2, NULL,  -CGRectGetWidth(self.frame), CGRectGetHeight(frame));
-        CGPathAddLineToPoint(path2, NULL, 2*CGRectGetWidth(self.frame), CGRectGetHeight(frame));
-        [self.shapeLayerBottomH setPath:path2];
-        CGPathRelease(path2);
-        [self.layer addSublayer:self.shapeLayerBottomH];
-    }
-
-    if (state == CAnnotationAlignStateLeft) {
-        self.shapeLayerLeftV = [CAShapeLayer layer];
-        [self.shapeLayerLeftV setFrame:frame];
-        [self.shapeLayerLeftV setFillColor:[NSColor clearColor].CGColor];
-        [self.shapeLayerLeftV setStrokeColor:lineColor.CGColor];
-        [self.shapeLayerLeftV setLineWidth:lineWidth];
-        [self.shapeLayerLeftV setLineJoin:kCALineJoinRound];
-        CGMutablePathRef path3 = CGPathCreateMutable();
-        CGPathMoveToPoint(path3, NULL, 0, -CGRectGetHeight(self.frame));
-        CGPathAddLineToPoint(path3, NULL, 0, 2*CGRectGetHeight(self.frame));
-        [self.shapeLayerLeftV setPath:path3];
-        CGPathRelease(path3);
-        [self.layer addSublayer:self.shapeLayerLeftV];
-    }
-
-    if (state == CAnnotationAlignStateRight) {
-        self.shapeLayerRightV = [CAShapeLayer layer];
-        [self.shapeLayerRightV setFrame:frame];
-        [self.shapeLayerRightV setFillColor:[NSColor clearColor].CGColor];
-        [self.shapeLayerRightV setStrokeColor:lineColor.CGColor];
-        [self.shapeLayerRightV setLineWidth:lineWidth];
-        [self.shapeLayerRightV setLineJoin:kCALineJoinRound];
-        CGMutablePathRef path4 = CGPathCreateMutable();
-        CGPathMoveToPoint(path4, NULL, CGRectGetWidth(frame), -CGRectGetHeight(self.frame));
-        CGPathAddLineToPoint(path4, NULL, CGRectGetWidth(frame), 2*CGRectGetHeight(self.frame));
-        [self.shapeLayerRightV setPath:path4];
-        CGPathRelease(path4);
-        [self.layer addSublayer:self.shapeLayerRightV];
-    }
+    self.shapeLayerBottomH = [CAShapeLayer layer];
+    [self.shapeLayerBottomH setFrame:frame];
+    [self.shapeLayerBottomH setFillColor:[NSColor clearColor].CGColor];
+    [self.shapeLayerBottomH setStrokeColor:lineColor.CGColor];
+    [self.shapeLayerBottomH setLineWidth:lineWidth];
+    [self.shapeLayerBottomH setLineJoin:kCALineJoinRound];
+    CGMutablePathRef path2 = CGPathCreateMutable();
+    CGPathMoveToPoint(path2, NULL,  -CGRectGetWidth(self.frame), CGRectGetHeight(frame));
+    CGPathAddLineToPoint(path2, NULL, 2*CGRectGetWidth(self.frame), CGRectGetHeight(frame));
+    [self.shapeLayerBottomH setPath:path2];
+    CGPathRelease(path2);
+    [self.layer addSublayer:self.shapeLayerBottomH];
+
+    self.shapeLayerLeftV = [CAShapeLayer layer];
+    [self.shapeLayerLeftV setFrame:frame];
+    [self.shapeLayerLeftV setFillColor:[NSColor clearColor].CGColor];
+    [self.shapeLayerLeftV setStrokeColor:lineColor.CGColor];
+    [self.shapeLayerLeftV setLineWidth:lineWidth];
+    [self.shapeLayerLeftV setLineJoin:kCALineJoinRound];
+    CGMutablePathRef path3 = CGPathCreateMutable();
+    CGPathMoveToPoint(path3, NULL, 0, -CGRectGetHeight(self.frame));
+    CGPathAddLineToPoint(path3, NULL, 0, 2*CGRectGetHeight(self.frame));
+    [self.shapeLayerLeftV setPath:path3];
+    CGPathRelease(path3);
+    [self.layer addSublayer:self.shapeLayerLeftV];
+
+    self.shapeLayerRightV = [CAShapeLayer layer];
+    [self.shapeLayerRightV setFrame:frame];
+    [self.shapeLayerRightV setFillColor:[NSColor clearColor].CGColor];
+    [self.shapeLayerRightV setStrokeColor:lineColor.CGColor];
+    [self.shapeLayerRightV setLineWidth:lineWidth];
+    [self.shapeLayerRightV setLineJoin:kCALineJoinRound];
+    CGMutablePathRef path4 = CGPathCreateMutable();
+    CGPathMoveToPoint(path4, NULL, CGRectGetWidth(frame), -CGRectGetHeight(self.frame));
+    CGPathAddLineToPoint(path4, NULL, CGRectGetWidth(frame), 2*CGRectGetHeight(self.frame));
+    [self.shapeLayerRightV setPath:path4];
+    CGPathRelease(path4);
+    [self.layer addSublayer:self.shapeLayerRightV];
 }
 
 - (CAnnotationAlignState)isAlignedWithOtherForms:(CPDFAnnotation *)activeAnnotation {
@@ -592,6 +623,30 @@
     [self.hoverPopOver close];
 }
 
+- (CGRect)borderRecctForSavePoints:(NSMutableArray<NSValue *> *)savePoints {
+    CGFloat minX = 0;
+    CGFloat minY = 0;
+    CGFloat maxX = 0;
+    CGFloat maxY = 0;
+    
+    for (NSValue *pointValue in savePoints) {
+        CGPoint point = [pointValue pointValue];
+        if (minX > point.x)
+            minX = point.x;
+        
+        if (maxX < point.x)
+            maxX = point.x;
+        
+        if (minY > point.y)
+            minY = point.y;
+            
+        if (maxY < point.y)
+            maxY = point.y;
+    }
+    
+    return CGRectMake(minX, minY, maxX-minX, maxY-minY);
+}
+
 - (void)magnifyWheel:(NSEvent *)theEvent {
     CGFloat dy = [theEvent deltaY];
     dy = dy > 0 ? fmin(0.2, dy) : fmax(-0.2, dy);

+ 12 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/KMAnnotationTool/KMBOTAAnnotationTool.swift

@@ -99,6 +99,18 @@ class KMBOTAAnnotationTool: NSObject {
             }
             contentString = KMBOTAAnnotationTool.fetchText(text: contentString)
         }
+        if annotation.string() != nil {
+            if annotation.isKind(of: CPDFLineAnnotation.self) {
+                if (annotation as! CPDFLineAnnotation).isMeasure {
+                    contentString = annotation.string()
+                }
+            } else if annotation.isKind(of: CPDFPolygonAnnotation.self) {
+                contentString = annotation.string()
+            } else if annotation.isKind(of: CPDFPolylineAnnotation.self) {
+                contentString = annotation.string()
+            }
+            contentString = KMBOTAAnnotationTool.fetchText(text: contentString)
+        }
         return contentString
     }
     

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/KMAnnotationViewController.swift

@@ -145,7 +145,7 @@ extension KMAnnotationViewController {
             for i in 0 ..< self.pageCount() {
                 var annotationItemArray: [KMBOTAAnnotationItem] = []
                 let page = self.pdfDocument()?.page(at: UInt(i))
-                let types = ["Highlight","Underline","Strikeout","Freehand","FreeText","Note","Square","Circle","Line","Stamp","Arrow","Image","Redact","Sign"]
+                let types = ["Highlight","Underline","Strikeout","Freehand","FreeText","Note","Square","Circle","Line","Stamp","Arrow","Image","Redact","Sign","Polyline","Polygon"]
                 var pageAnnotations: [CPDFAnnotation] = KMOCToolClass.filterAnnotation(annotations: page!.annotations,types: types) as! [CPDFAnnotation]
                 //添加签名注释
                 for annotation in page!.annotations {

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/KMScreenViewController/ScreenCollectionView/View/KMAnnotationScreenTypeViewItem.swift

@@ -79,6 +79,10 @@ extension KMAnnotationScreenTypeViewItem {
             image = NSImage(named: "KMImageNameAnnotationListRedact")!
         case "Arrow":
             image = NSImage(named: "KMImageNameMainToolShapesSelect")!
+        case "Polyline":
+            image = NSImage(named: "ImageNameToolbarPolyline")!
+        case "Polygon":
+            image = NSImage(named: "ImageNameToolbarPolygon")!
         default:
             image = NSImage()
         }

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMAnnotationTableCellView.swift

@@ -250,6 +250,10 @@ class KMAnnotationTableCellView: NSTableCellView {
             noteType = SKNRedactString
         } else if annotation.isKind(of: CPDFSignatureAnnotation.self) {
             noteType = SKNSignatureString
+        } else if annotation.isKind(of: CPDFPolygonAnnotation.self) {
+            noteType = SKMeasurePolygonString
+        } else if annotation.isKind(of: CPDFPolylineAnnotation.self) {
+            noteType = SKMeasureMultilinesString
         }
         let imageView = KMNoteTypeImageView()
         typeImageView.image = nil

+ 20 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTypeCollectionViewItem.swift

@@ -131,6 +131,18 @@ class KMNoteTypeCollectionViewItem: NSCollectionViewItem {
             } else {
                 isSelect = false
             }
+        } else if (self.typeString == "Polyline") {//
+            if (self._equalToImage(sender.image!, otherImage: NSImage(named: "ImageNameToolbarPolyline")!)) {
+                isSelect = true
+            } else {
+                isSelect = false
+            }
+        } else if (self.typeString == "Polygon") {//
+            if (self._equalToImage(sender.image!, otherImage: NSImage(named: "ImageNameToolbarPolygon")!)) {
+                isSelect = true
+            } else {
+                isSelect = false
+            }
         }
         self._selectButton(isSelect)
         
@@ -171,6 +183,10 @@ class KMNoteTypeCollectionViewItem: NSCollectionViewItem {
                 self.typeButton.image = NSImage(named: "KMImageNameSidebarAnnotationFilterSignWhite")
             } else if (self.typeString == "KMAnnotationType_StampTable") {
                 self.typeButton.image = NSImage(named: "KMImageNameSidebarAnnotationFilterTableWhite")
+            } else if (self.typeString == "Polyline") {
+                self.typeButton.image = NSImage(named: "ImageNameToolbarPolylineSel")
+            } else if (self.typeString == "Polygon") {
+                self.typeButton.image = NSImage(named: "ImageNameToolbarPolygonSel")
             }
             self.typeButton.layer?.backgroundColor = KMAppearance.KMColor_Interactive_A0().cgColor
         } else {
@@ -204,6 +220,10 @@ class KMNoteTypeCollectionViewItem: NSCollectionViewItem {
                 self.typeButton.image = NSImage(named: "KMImageNameSidebarAnnotationFilterSignNor")
             } else if (self.typeString == "KMAnnotationType_StampTable") {
                 self.typeButton.image = NSImage(named: "KMImageNameSidebarAnnotationFilterTableNor")
+            } else if (self.typeString == "Polyline") {
+                self.typeButton.image = NSImage(named: "ImageNameToolbarPolyline")
+            } else if (self.typeString == "Polygon") {
+                self.typeButton.image = NSImage(named: "ImageNameToolbarPolygon")
             }
             self.typeButton.layer?.backgroundColor = .clear
         }

+ 31 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTypeImageView.swift

@@ -42,6 +42,11 @@ let SKNSignDotString = "SKNSignDotString"
 let SKNRedactString = "SKNRedactString"
 let SKNSignatureString = "SKNSignatureString"
 
+let SKMeasureLineString = "SKMeasureLineString"
+let SKMeasureMultilinesString = "SKMeasureMultilinesString"
+let SKMeasurePolygonString = "SKMeasurePolygonString"
+let SKMeasureRectangleString = "SKMeasureRectangleString"
+
 class KMNoteTypeImageView: NSImageView {
     
     func changeImageFillColor(_ image: NSImage, withColor color: NSColor) -> NSImage {
@@ -245,8 +250,16 @@ class KMNoteTypeImageView: NSImageView {
             image = NSImage(named: "KMImageNameSidetabbarSignatureNor")?.copy() as? NSImage
         } else if type == "Ink_Table" {
             image = NSImage(named: KMImageNameUXIconSubtoolbarMytoolsTable)?.copy() as? NSImage
+        } else if type == SKMeasurePolygonString {
+            image = NSImage(named: "ImageNameToolbarPolygon")?.copy() as? NSImage
+        } else if type == SKMeasureMultilinesString {
+            image = NSImage(named: "ImageNameToolbarPolyline")?.copy() as? NSImage
+        } else if type == SKMeasureLineString {
+            image = NSImage(named: "ImageNameToolbarMeasureLine")?.copy() as? NSImage
+        } else if type == SKMeasureRectangleString {
+            image = NSImage(named: "ImageNameToolbarMeasureSquare")?.copy() as? NSImage
         }
-        
+
         return image
     }
     
@@ -322,12 +335,16 @@ func KMPDFAnnotationNoteType(_ anno: CPDFAnnotation?) -> String {
             noteType = SKNStampString
         }
     } else if let data = inAnno as? CPDFLineAnnotation {
-        if data.startLineStyle == .none && data.endLineStyle == .none {
-            noteType = SKNLine_NoneString
-        } else if data.startLineStyle == .none && data.endLineStyle == .openArrow {
-            noteType = SKNLine_OpenArrowString
+        if data.isMeasure {
+            noteType = SKMeasureLineString
         } else {
-            noteType = SKNLine_NoneString
+            if data.startLineStyle == .none && data.endLineStyle == .none {
+                noteType = SKNLine_NoneString
+            } else if data.startLineStyle == .none && data.endLineStyle == .openArrow {
+                noteType = SKNLine_OpenArrowString
+            } else {
+                noteType = SKNLine_NoneString
+            }
         }
     } else if let data = inAnno as? CPDFButtonWidgetAnnotation {
         let type = data.controlType()
@@ -386,6 +403,14 @@ func KMPDFAnnotationNoteType(_ anno: CPDFAnnotation?) -> String {
         }
     } else if inAnno is CPDFRedactAnnotation {
         noteType = SKNRedactString
+    } else if let data = inAnno as? CPDFPolygonAnnotation {
+        if data.isMeasure {
+            noteType = SKMeasurePolygonString
+        } else {
+            noteType = SKMeasureRectangleString
+        }
+    } else if inAnno is CPDFPolylineAnnotation {
+        noteType = SKMeasureMultilinesString
     }
     return noteType
 }

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Note.swift

@@ -783,7 +783,7 @@ extension KMLeftSideViewController {
                 let page = self.pdfDocument()?.page(at: UInt(i))
                 var annos: [CPDFAnnotation] = []
                 // 处理过滤
-                let types = ["Highlight","Underline","Strikeout","Freehand","FreeText","Note","Square","Circle","Line","Stamp","Arrow","Image","Redact","Sign"/*, "table"*/]
+                let types = ["Highlight","Underline","Strikeout","Freehand","FreeText","Note","Square","Circle","Line","Stamp","Arrow","Image","Redact","Sign"/*, "table"*/,"Polyline","Polygon"]
                 if typeArr.count == 0 && colorArr.count == 0 && authorArr.count == 0 {
                     annos = KMOCToolClass.filterAnnotation(annotations: page?.annotations ?? [],types: types) as? [CPDFAnnotation] ?? []
                     annotationArray += annos

+ 36 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m

@@ -255,6 +255,19 @@
         self.titleLabel.stringValue = NSLocalizedString(@"Stamp", nil);
     } else if ([annotation isKindOfClass:[KMTableAnnotation class]]) {
         self.titleLabel.stringValue = NSLocalizedString(@"Table", nil);
+    } else if ([annotation isKindOfClass:[CPDFLineAnnotation class]]) {
+        if (self.pdfView.toolMode == CMeasureToolMode ||
+            [(CPDFLineAnnotation *)annotation isMeasure]) {
+            self.titleLabel.stringValue = NSLocalizedString(@"Line", nil);
+        }
+    } else if ([annotation isKindOfClass:[CPDFPolylineAnnotation class]]) {
+        self.titleLabel.stringValue = NSLocalizedString(@"Multilines", nil);
+    } else if ([annotation isKindOfClass:[CPDFPolygonAnnotation class]]) {
+        if (self.pdfView.annotationType == CAnnotationTypeSquare) {
+            self.titleLabel.stringValue = NSLocalizedString(@"Rectangles", nil);
+        } else {
+            self.titleLabel.stringValue = NSLocalizedString(@"Polygon", nil);
+        }
     } else {
         self.titleLabel.stringValue = [annotation type].typeName;
     }
@@ -263,7 +276,7 @@
     CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc] initWithPDFAnnotations:_annotations];
     if ([annotation isKindOfClass:[CPDFTextWidgetAnnotation class]] ||
         [annotation isKindOfClass:[CPDFChoiceWidgetAnnotation class]] ||
-        [annotation isKindOfClass:[CPDFButtonWidgetAnnotation class]]){
+        [annotation isKindOfClass:[CPDFButtonWidgetAnnotation class]]) {
         self.buttonView.hidden = NO;
         if ([annotation isKindOfClass:[CPDFTextWidgetAnnotation class]]) {
             [self updateFormContentButtonUI:_formGeneralButton];
@@ -407,6 +420,28 @@
         vc.annotationModel = annotationModel;
         self.propertiesBox.contentView = vc.view;
         self.contentViewController = vc;
+    } else if (([annotation isKindOfClass:[CPDFPolylineAnnotation class]]) ||
+              ([annotation isKindOfClass:[CPDFPolygonAnnotation class]])) {
+       KMMeasureSideVC *vc = [[KMMeasureSideVC alloc] init];
+       vc.pdfView = self.pdfView;
+       vc.annotationModel = annotationModel;
+       self.propertiesBox.contentView = vc.view;
+       self.contentViewController = vc;
+   } else if ([annotation isKindOfClass:[CPDFLineAnnotation class]]) {
+        if ((self.pdfView.toolMode == CMeasureToolMode) ||
+            [(CPDFLineAnnotation *)annotation isMeasure]) {
+            KMMeasureSideVC *vc = [[KMMeasureSideVC alloc] init];
+            vc.pdfView = self.pdfView;
+            vc.annotationModel = annotationModel;
+            self.propertiesBox.contentView = vc.view;
+            self.contentViewController = vc;
+        } else {
+            KMGeneralAnnotationViewController *vc = [[KMGeneralAnnotationViewController alloc] init];
+            vc.pdfView = self.pdfView;
+            vc.annotationModel = annotationModel;
+            self.propertiesBox.contentView = vc.view;
+            self.contentViewController = vc;
+        }
     } else {
         if ([annotation isKindOfClass:[CPDFInkAnnotation class]]) {
             KMFreehandAnnotationController *vc = [[KMFreehandAnnotationController alloc] init];

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarController.swift

@@ -210,6 +210,7 @@ class KMToolbarController: NSViewController {
             } else {
                 _toolbarType = newValue
             }
+            mainViewController?.cancelMeasureType()
             mainToolBarView?.toolbar?.isHidden = false
             secondaryToolBarBox.isHidden = true
             secondaryToolBarHeight.constant = 51

+ 32 - 2
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift

@@ -93,6 +93,7 @@ import Cocoa
     case crop = 8009
     case comparison = 8010
     case aiTools = 8011
+    case measure = 8012
 }
 
 @objc protocol KMToolbarViewControllerDelegate {
@@ -425,6 +426,19 @@ class KMToolbarViewController: NSViewController, NSTextFieldDelegate {
         self._itemSetPromptFlag(itemIdentifier: KMToolbarToolSecureItemIdentifier)
     }
     
+    @objc func measureMenuAction(sender: KMToolbarClickButton) {
+        self.delegate?.toolbarViewController?(self, clickChaildToolType: .measure, toolbar: sender.clickObject as! KMToolbarItemView)
+        self._itemSetPromptFlag(item: sender.clickObject as? KMToolbarItemView)
+    }
+    @objc private func _measureAction(sender: NSMenuItem) {
+        if let data = self._currentItemView {
+            self.delegate?.toolbarViewController?(self, menuItemDidClick: data, index: sender.tag, info: nil)
+        } else {
+            self.delegate?.toolbarViewController?(self, menuItemDidClick: self.toolbarItemFindItemIdentifiers(value: KMToolbarMeasureItemIdentifier), index: sender.tag, info: nil)
+        }
+        self._itemSetPromptFlag(itemIdentifier: KMToolbarMeasureItemIdentifier)
+    }
+    
     @objc func conversionMenuItemAction(sender: KMToolbarClickButton) {
         if let item: KMToolbarItemView = sender.clickObject as? KMToolbarItemView {
             var type: KMToolbarType = .word
@@ -680,7 +694,7 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
             return [KMNewToolbarSpaceItemIdentifier,
                     KMToolbarPageEditInsetItemIdentifier, KMToolbarToolMergeItemIdentifier, KMToolbarPageEditSplitItemIdentifier,
                     KMToolbarToolCompressItemIdentifier, KMToolbarToolSecureItemIdentifier, KMToolbarToolWatermarkItemIdentifier,
-                    KMToolbarToolBackgroundItemIdentifier, KMToolbarToolHeaderFooterItemIdentifier, KMToolbarToolBatesItemIdentifier,
+                    KMToolbarToolBackgroundItemIdentifier, KMToolbarToolHeaderFooterItemIdentifier, KMToolbarToolBatesItemIdentifier,KMToolbarMeasureItemIdentifier,
                     KMToolbarAIItemIdentifier,
                     KMToolbarCropIdentifier,
                     KMToolbarConversionWordItemIdentifier, KMToolbarConversionExcelItemIdentifier, KMToolbarConversionPPTItemIdentifier,
@@ -780,7 +794,8 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
             return [KMToolbarToolCompressItemIdentifier, KMToolbarToolMergeItemIdentifier,
                     KMToolbarToolSecureItemIdentifier, KMToolbarComparisonItemIdentifier,
                     KMToolbarToolWatermarkItemIdentifier, KMToolbarToolBackgroundItemIdentifier,
-                    KMToolbarToolHeaderFooterItemIdentifier, KMToolbarToolBatesItemIdentifier]
+                    KMToolbarToolHeaderFooterItemIdentifier, KMToolbarToolBatesItemIdentifier,
+                    KMToolbarMeasureItemIdentifier]
         case .Form:
             return [KMToolbarToolTextFieldItemIdentifier,
                     KMToolbarToolCheckBoxItemIdentifier,
@@ -2338,6 +2353,21 @@ extension KMToolbarViewController {
             item?.titleName = NSLocalizedString("Merge", comment: "")
             item?.boxImagePosition = .imageLeft
             item?.btnAction = #selector(mergeMenuItemAction)
+        } else if identifier == KMToolbarMeasureItemIdentifier {
+            item?.image = NSImage(named: "KMImageNameUXIconMeasureNor")
+            item?.target = self
+            item?.titleName = NSLocalizedString("Measure", comment: "")
+            item?.boxImagePosition = .imageExpandLeft
+            item?.needExpandAction = true
+            let menuItem = NSMenuItem.init(title: NSLocalizedString("Measure", comment: ""), action: #selector(measureMenuAction), target: self)
+            let subMenu = NSMenu()
+            subMenu.addItem(title: NSLocalizedString("Line", comment: ""), action: #selector(_measureAction), target: self, tag: 1)
+            subMenu.addItem(title: NSLocalizedString("Multilines", comment: ""), action: #selector(_measureAction), target: self, tag: 2)
+            subMenu.addItem(title: NSLocalizedString("Polygon", comment: ""), action: #selector(_measureAction), target: self, tag: 3)
+            subMenu.addItem(title: NSLocalizedString("Rectangle", comment: ""), action: #selector(_measureAction), target: self, tag: 4)
+            menuItem.submenu = subMenu
+            item?.menuFormRepresentation = menuItem
+
         }
     }
     

+ 3 - 1
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/PublicKey.swift

@@ -135,12 +135,14 @@ let KMToolbarToolCompressItemIdentifier =  "KMToolbarCompressionItemIdentifier"
 let KMToolbarToolSecureItemIdentifier =  "KMToolbarSecurityItemIdentifier"
 let KMToolbarToolMergeItemIdentifier =  "KMToolbarMergeItemIdentifier"
 let KMToolbarComparisonItemIdentifier =  "KMToolbarComparisonItemIdentifier"
+let KMToolbarMeasureItemIdentifier =  "KMToolbarMeasureItemIdentifier"
 let KMToolbarAIItemIdentifier =  "KMToolbarAIItemIdentifier"
 let toolToolIdentifiers = [KMToolbarToolCropItemIdentifier, KMToolbarToolBatesItemIdentifier,
                            KMToolbarToolHeaderFooterItemIdentifier, KMToolbarToolBackgroundItemIdentifier,
                            KMToolbarToolWatermarkItemIdentifier, KMToolbarToolRedactItemIdentifier,
                            KMToolbarToolCompressItemIdentifier, KMToolbarToolSecureItemIdentifier,
-                           KMToolbarToolMergeItemIdentifier,KMToolbarComparisonItemIdentifier]
+                           KMToolbarToolMergeItemIdentifier,KMToolbarComparisonItemIdentifier,
+                           KMToolbarMeasureItemIdentifier]
 
 /// Form
 let KMToolbarToolTextFieldItemIdentifier =  "KMToolbarFormTextFieldItemIdentifier"

+ 208 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -4291,6 +4291,81 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
                     self.openRightPane()
                     return
                 }
+            } else if type == .measure {
+                
+                if !IAPProductsManager.default().isAvailableAllFunction(){
+                    KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+                    return
+                }
+                
+                if !self.documentAllowsEdit() {
+                    return
+                }
+                
+                self.listView.toolMode = .measureToolMode
+                
+                if distanceMeasureInfoWindowController?.window?.isVisible == true {
+                    distanceMeasureInfoWindowController?.hideFloatingWindow()
+                } else if perimeterMeasureInfoWindowController?.window?.isVisible == true {
+                    perimeterMeasureInfoWindowController?.hideFloatingWindow()
+                } else if areaMeasureInfoWindowController?.window?.isVisible == true {
+                    areaMeasureInfoWindowController?.hideFloatingWindow()
+                }
+
+                if distanceMeasureInfoWindowController == nil {
+                    let measureInfo = CPDFDistanceMeasureInfo()
+                    distanceMeasureInfoWindowController = CDistanceMeasureInfoWindowController()
+                    distanceMeasureInfoWindowController?.measureInfo = measureInfo
+                    distanceMeasureInfoWindowController?.delegate = self
+                }
+                if perimeterMeasureInfoWindowController == nil {
+                    let measureInfo = CPDFPerimeterMeasureInfo()
+                    perimeterMeasureInfoWindowController = CPerimeterMeasureInfoWindowController()
+                    perimeterMeasureInfoWindowController?.measureInfo = measureInfo
+                    perimeterMeasureInfoWindowController?.delegate = self
+                }
+                if areaMeasureInfoWindowController == nil {
+                    let measureInfo = CPDFAreaMeasureInfo()
+                    areaMeasureInfoWindowController = CAreaMeasureInfoWindowController()
+                    areaMeasureInfoWindowController?.measureInfo = measureInfo
+                    areaMeasureInfoWindowController?.delegate = self
+                }
+                
+                if index == 1 {
+                    self.listView.annotationType = .line
+
+                    distanceMeasureInfoWindowController?.showWindow(nil)
+                    distanceMeasureInfoWindowController?.lengthLabel.stringValue = ""
+                    distanceMeasureInfoWindowController?.angleLabel.stringValue = ""
+                    distanceMeasureInfoWindowController?.xLabel.stringValue = ""
+                    distanceMeasureInfoWindowController?.yLabel.stringValue = ""
+                } else if index == 2 {
+                    self.listView.annotationType = .polyLine
+
+                    perimeterMeasureInfoWindowController?.showWindow(nil)
+                    perimeterMeasureInfoWindowController?.lengthLabel.stringValue = ""
+                    perimeterMeasureInfoWindowController?.angleLabel.stringValue = ""
+                } else if index == 3 {
+                    self.listView.annotationType = .polyGon
+
+                    areaMeasureInfoWindowController?.showWindow(nil)
+                    areaMeasureInfoWindowController?.areaLabel.stringValue = ""
+                    areaMeasureInfoWindowController?.angleLabel.stringValue = ""
+                } else if index == 4 {
+                    self.listView.annotationType = .square
+
+                    areaMeasureInfoWindowController?.showWindow(nil)
+                    areaMeasureInfoWindowController?.areaLabel.stringValue = ""
+                    areaMeasureInfoWindowController?.angleLabel.stringValue = ""
+                } else {
+                    if let isVisible = distanceMeasureInfoWindowController!.window?.isVisible, isVisible {
+                        distanceMeasureInfoWindowController?.hideFloatingWindow()
+                    } else if let isVisible = perimeterMeasureInfoWindowController!.window?.isVisible, isVisible {
+                        perimeterMeasureInfoWindowController?.hideFloatingWindow()
+                    } else if let isVisible = areaMeasureInfoWindowController!.window?.isVisible, isVisible {
+                        areaMeasureInfoWindowController?.hideFloatingWindow()
+                    }
+                }
             }
         }
     }
@@ -4580,6 +4655,8 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
         } else if (toolbarItem.itemIdentifier == KMToolbarToolBatesItemIdentifier) {
             self.clickChildTool(type: .bates, index: index)
             FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Editor", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Editor_BatesNumber"])
+        } else if (toolbarItem.itemIdentifier == KMToolbarMeasureItemIdentifier) {
+            self.clickChildTool(type: .measure, index: index)
         } else if (toolbarItem.itemIdentifier == KMToolbarComparisonItemIdentifier) {
             self.clickChildTool(type: .comparison, index: index)
         } else if (toolbarItem.itemIdentifier == KMToolbarToolFormAlignIdentifier) {
@@ -4792,6 +4869,137 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
     }
 }
 
+// MARK: CDistanceMeasureInfoWindowControllerDelegate
+
+extension KMMainViewController : CDistanceMeasureInfoWindowControllerDelegate {
+    func distanceMeasureInfoWindowControllerSetting(_ distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController) {
+        let distanceSettingWC = CDistanceSettingWindowController(distanceMeasureInfo: self.distanceMeasureInfoWindowController!.measureInfo)
+        self.distanceMeasureInfoWindowController?.hideFloatingWindow()
+        distanceSettingWC.delegate = self
+        distanceSettingWC.startModal("")
+    }
+    
+    func cancelMeasureInfoWindowControllerSetting(_ distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController) {
+        
+    }
+}
+
+// MARK: CPerimeterMeasureInfoWindowControllerDelegate
+
+extension KMMainViewController : CPerimeterMeasureInfoWindowControllerDelegate {
+    func perimeterMeasureInfoWindowControllerSetting(_ perimeterMeasureInfoWindowController: CPerimeterMeasureInfoWindowController) {
+        let distanceSettingWC = CDistanceSettingWindowController(perimeterMeasureInfo: self.perimeterMeasureInfoWindowController!.measureInfo)
+        self.distanceMeasureInfoWindowController?.hideFloatingWindow()
+        distanceSettingWC.delegate = self
+        distanceSettingWC.startModal("")
+    }
+}
+
+// MARK: CAreaMeasureInfoWindowControllerDelegate
+
+extension KMMainViewController : CAreaMeasureInfoWindowControllerDelegate {
+    func areaMeasureInfoWindowControllerSetting(_ areaMeasureInfoWindowController: CAreaMeasureInfoWindowController) {
+        let areaSettingWC = CAreaSettingWindowController(measureInfo: self.areaMeasureInfoWindowController!.measureInfo)
+        self.areaMeasureInfoWindowController?.hideFloatingWindow()
+        areaSettingWC.delegate = self
+        areaSettingWC.startModal("")
+    }
+}
+
+// MARK: CDistanceSettingWindowControllerDelegate
+
+extension KMMainViewController : CDistanceSettingWindowControllerDelegate {
+    func distanceSettingWindowController(_ distanceSettingWindowController: CDistanceSettingWindowController, distanceMeasureInfo: CPDFDistanceMeasureInfo?) {
+        if distanceMeasureInfo != nil {
+            if self.listView.activeAnnotations.count > 0 {
+                if self.listView.activeAnnotation.isKind(of: CPDFLineAnnotation.self) {
+                    (self.listView.activeAnnotation as! CPDFLineAnnotation).measureInfo = distanceMeasureInfo
+                    self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                }
+                self.distanceMeasureInfoWindowController?.reloadData(with: (self.listView.activeAnnotation as! CPDFLineAnnotation).measureInfo!)
+            } else {
+                distanceMeasureInfo?.leadLength = 0
+                self.listView.distanceMeasureInfo = distanceMeasureInfo
+                self.distanceMeasureInfoWindowController?.reloadData(with: self.listView.distanceMeasureInfo)
+                self.distanceMeasureInfoWindowController?.lengthLabel.stringValue = ""
+                self.distanceMeasureInfoWindowController?.angleLabel.stringValue = ""
+                self.distanceMeasureInfoWindowController?.xLabel.stringValue = ""
+                self.distanceMeasureInfoWindowController?.yLabel.stringValue = ""
+            }
+        }
+        self.distanceMeasureInfoWindowController?.showWindow(self)
+    }
+    
+    func distanceSettingWindowController(_ distanceSettingWindowController: CDistanceSettingWindowController, perimeterMeasureInfo: CPDFPerimeterMeasureInfo?) {
+        if perimeterMeasureInfo != nil {
+            if self.listView.activeAnnotations.count > 0 {
+                if self.listView.activeAnnotation.isKind(of: CPDFPolylineAnnotation.self) {
+                    (self.listView.activeAnnotation as! CPDFPolylineAnnotation).measureInfo = perimeterMeasureInfo
+                    self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                }
+                self.perimeterMeasureInfoWindowController?.reloadData(with: (self.listView.activeAnnotation as! CPDFPolylineAnnotation).measureInfo!)
+            } else {
+                self.listView.perimeterMeasureInfo = perimeterMeasureInfo
+                self.perimeterMeasureInfoWindowController?.reloadData(with: self.listView.perimeterMeasureInfo)
+                self.perimeterMeasureInfoWindowController?.lengthLabel.stringValue = ""
+                self.perimeterMeasureInfoWindowController?.angleLabel.stringValue = ""
+            }
+        }
+        self.perimeterMeasureInfoWindowController?.showWindow(self)
+    }
+}
+
+// MARK: CAreaSettingWindowControllerDelegate
+
+extension KMMainViewController : CAreaSettingWindowControllerDelegate {
+    func areaSettingWindowController(_ areaSettingWindowController: CAreaSettingWindowController, measureInfo: CPDFAreaMeasureInfo?) {
+        if self.listView.annotationType == .square && self.listView.toolMode == .measureToolMode {
+            if measureInfo != nil {
+                if self.listView.activeAnnotations.count > 0 {
+                    if self.listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) {
+                        (self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo = measureInfo
+                        self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                    }
+                    self.areaMeasureInfoWindowController?.reloadData((self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo!)
+                } else {
+                    self.listView.squareAreaMeasureInfo = measureInfo
+                    self.areaMeasureInfoWindowController?.reloadData(self.listView.squareAreaMeasureInfo)
+                    self.areaMeasureInfoWindowController?.areaLabel.stringValue = ""
+                    self.areaMeasureInfoWindowController?.angleLabel.stringValue = ""
+                }
+            }
+            self.areaMeasureInfoWindowController?.showWindow(self)
+        } else if self.listView.annotationType == .polyGon && self.listView.toolMode == .measureToolMode {
+            if measureInfo != nil {
+                if self.listView.activeAnnotations.count > 0 {
+                    if self.listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) {
+                        (self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo = measureInfo
+                        self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                    }
+                    self.areaMeasureInfoWindowController?.reloadData((self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo!)
+                } else {
+                    self.listView.polygonAreaMeasureInfo = measureInfo
+                    self.areaMeasureInfoWindowController?.reloadData(self.listView.polygonAreaMeasureInfo)
+                    self.areaMeasureInfoWindowController?.areaLabel.stringValue = ""
+                    self.areaMeasureInfoWindowController?.angleLabel.stringValue = ""
+                }
+            }
+            self.areaMeasureInfoWindowController?.showWindow(self)
+        } else {
+            if measureInfo != nil {
+                if self.listView.activeAnnotations.count > 0 {
+                    if self.listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) {
+                        (self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo = measureInfo
+                        self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                    }
+                    self.areaMeasureInfoWindowController?.reloadData((self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo!)
+                }
+            }
+            self.areaMeasureInfoWindowController?.showWindow(self)
+        }
+    }
+}
+
 // MARK: -
 // MARK: - Mouse
 extension KMMainViewController {

+ 132 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -1367,6 +1367,42 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                        className != "CPDFListStampAnnotation" {
                         self.openRightPane()
                     }
+                    
+                    if let lineAnnotation = fristAnnotation as? CPDFLineAnnotation {
+                        handleLineAnnotation(lineAnnotation)
+                    } else if let polylineAnnotation = fristAnnotation as? CPDFPolylineAnnotation {
+                        handlePolylineAnnotation(polylineAnnotation)
+                    } else if let polygonAnnotation = fristAnnotation as? CPDFPolygonAnnotation {
+                        handlePolygonAnnotation(polygonAnnotation)
+                    }
+                }
+            }
+            
+            if (listView.activeAnnotation.isKind(of: CPDFLineAnnotation.self)) {
+                if (!(listView.activeAnnotation as! CPDFLineAnnotation).isMeasure) {
+                    cancelMeasureType()
+                } else {
+                    if distanceMeasureInfoWindowController == nil {
+                        let measureInfo = CPDFDistanceMeasureInfo()
+                        distanceMeasureInfoWindowController = CDistanceMeasureInfoWindowController()
+                        distanceMeasureInfoWindowController?.measureInfo = measureInfo
+                        distanceMeasureInfoWindowController?.delegate = self
+                    }
+                }
+            } else if (!listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) && !listView.activeAnnotation.isKind(of: CPDFPolylineAnnotation.self)) {
+                cancelMeasureType()
+            } else if (listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) || listView.activeAnnotation.isKind(of: CPDFPolylineAnnotation.self)) {
+                if perimeterMeasureInfoWindowController == nil {
+                    let measureInfo = CPDFPerimeterMeasureInfo()
+                    perimeterMeasureInfoWindowController = CPerimeterMeasureInfoWindowController()
+                    perimeterMeasureInfoWindowController?.measureInfo = measureInfo
+                    perimeterMeasureInfoWindowController?.delegate = self
+                }
+                if areaMeasureInfoWindowController == nil {
+                    let measureInfo = CPDFAreaMeasureInfo()
+                    areaMeasureInfoWindowController = CAreaMeasureInfoWindowController()
+                    areaMeasureInfoWindowController?.measureInfo = measureInfo
+                    areaMeasureInfoWindowController?.delegate = self
                 }
             }
         } else if (annotations.count == 0){
@@ -1828,5 +1864,101 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         self.rightSideViewController.eidtPDFTextProperty.fontColorChangeAction()
 
     }
+    
+    func pdfListViewAnnotationMeasureInfoChange(_ pdfListView: CPDFListView!, with annotation: CPDFAnnotation!) {
+        if let lineAnnotation = annotation as? CPDFLineAnnotation {
+            handleLineAnnotation(lineAnnotation)
+        } else if let polylineAnnotation = annotation as? CPDFPolylineAnnotation {
+            handlePolylineAnnotation(polylineAnnotation)
+        } else if let polygonAnnotation = annotation as? CPDFPolygonAnnotation {
+            handlePolygonAnnotation(polygonAnnotation)
+        }
+    }
+      
+      private func handleLineAnnotation(_ annotation: CPDFLineAnnotation) {
+          if perimeterMeasureInfoWindowController?.window?.isVisible == true {
+              perimeterMeasureInfoWindowController?.hideFloatingWindow()
+              distanceMeasureInfoWindowController?.showWindow(self)
+          } else if areaMeasureInfoWindowController?.window?.isVisible == true {
+              areaMeasureInfoWindowController?.hideFloatingWindow()
+              distanceMeasureInfoWindowController?.showWindow(self)
+          } else if distanceMeasureInfoWindowController?.window?.isVisible == false {
+              distanceMeasureInfoWindowController?.showWindow(self)
+          }
+          
+          let measureInfo = annotation.measureInfo
+          let startPoint = annotation.startPoint
+          let endPoint = annotation.endPoint
+          let angle = atan2(endPoint.y - startPoint.y, endPoint.x - startPoint.x) * (180.0 / .pi)
+          
+          distanceMeasureInfoWindowController?.angleLabel.stringValue = String(format: "%.2f°", abs(angle))
+          distanceMeasureInfoWindowController?.xLabel.stringValue = String(format: "%.0f", abs(endPoint.x - startPoint.x))
+          distanceMeasureInfoWindowController?.yLabel.stringValue = String(format: "%.0f", abs(endPoint.y - startPoint.y))
+          distanceMeasureInfoWindowController?.reloadData(with: measureInfo!)
+      }
+      
+      private func handlePolylineAnnotation(_ annotation: CPDFPolylineAnnotation) {
+          if distanceMeasureInfoWindowController?.window?.isVisible == true {
+              distanceMeasureInfoWindowController?.hideFloatingWindow()
+              perimeterMeasureInfoWindowController?.showWindow(self)
+          } else if areaMeasureInfoWindowController?.window?.isVisible == true {
+              areaMeasureInfoWindowController?.hideFloatingWindow()
+              perimeterMeasureInfoWindowController?.showWindow(self)
+          } else if perimeterMeasureInfoWindowController?.window?.isVisible == false {
+              perimeterMeasureInfoWindowController?.showWindow(self)
+          }
+          
+          let measureInfo = annotation.measureInfo
+          let savePoints = annotation.savePoints()
+          var angle: CGFloat = 0
+          if savePoints.count >= 3 {
+              let count = savePoints.count
+              let startPoint = savePoints[count - 3].pointValue
+              let midPoint = savePoints[count - 2].pointValue
+              let endPoint = savePoints.last!.pointValue
+              
+              angle = angleBetweenPoints(startPoint, midPoint, endPoint)
+          }
+          angle = 180 - angle
+          perimeterMeasureInfoWindowController?.angleLabel.stringValue = String(format: "%.2f°", abs(angle))
+          perimeterMeasureInfoWindowController?.reloadData(with: measureInfo!)
+      }
+      
+      private func handlePolygonAnnotation(_ annotation: CPDFPolygonAnnotation) {
+          if distanceMeasureInfoWindowController?.window?.isVisible == true {
+              distanceMeasureInfoWindowController?.hideFloatingWindow()
+              areaMeasureInfoWindowController?.showWindow(self)
+          } else if perimeterMeasureInfoWindowController?.window?.isVisible == true {
+              perimeterMeasureInfoWindowController?.hideFloatingWindow()
+              areaMeasureInfoWindowController?.showWindow(self)
+          } else if areaMeasureInfoWindowController?.window?.isVisible == false {
+              areaMeasureInfoWindowController?.showWindow(self)
+          }
+          
+          let measureInfo = annotation.measureInfo
+          let savePoints = annotation.savePoints
+          var angle: CGFloat = 0
+          if savePoints.count >= 3 {
+              let count = savePoints.count
+              let startPoint = (savePoints[count - 3] as AnyObject).pointValue
+              let midPoint = (savePoints[count - 2] as AnyObject).pointValue
+              let endPoint = (savePoints.lastObject as AnyObject).pointValue
+              
+              angle = angleBetweenPoints(startPoint!, midPoint!, endPoint!)
+          }
+          angle = 180 - angle
+          areaMeasureInfoWindowController?.angleLabel.stringValue = String(format: "%.2f°", abs(angle))
+          areaMeasureInfoWindowController?.reloadData(measureInfo!)
+      }
+      
+      private func angleBetweenPoints(_ startPoint: CGPoint, _ midPoint: CGPoint, _ endPoint: CGPoint) -> CGFloat {
+          let vector1 = CGPoint(x: midPoint.x - startPoint.x, y: midPoint.y - startPoint.y)
+          let vector2 = CGPoint(x: endPoint.x - midPoint.x, y: endPoint.y - midPoint.y)
+          let dotProduct = vector1.x * vector2.x + vector1.y * vector2.y
+          let magnitude1 = sqrt(vector1.x * vector1.x + vector1.y * vector1.y)
+          let magnitude2 = sqrt(vector2.x * vector2.x + vector2.y * vector2.y)
+          
+          return acos(dotProduct / (magnitude1 * magnitude2)) * (180.0 / .pi)
+      }
 }
 

+ 14 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -207,6 +207,10 @@ import Cocoa
     
     let editPDFHanddler = KMEditPDfHanddler()
     
+    var distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController?
+    var perimeterMeasureInfoWindowController: CPerimeterMeasureInfoWindowController?
+    var areaMeasureInfoWindowController: CAreaMeasureInfoWindowController?
+
     deinit {
         NotificationCenter.default.removeObserver(self)
         
@@ -605,6 +609,16 @@ import Cocoa
         }
     }
     
+    @objc func cancelMeasureType() {
+        if distanceMeasureInfoWindowController?.window?.isVisible == true {
+            distanceMeasureInfoWindowController?.hideFloatingWindow()
+        } else if perimeterMeasureInfoWindowController?.window?.isVisible == true {
+            perimeterMeasureInfoWindowController?.hideFloatingWindow()
+        } else if areaMeasureInfoWindowController?.window?.isVisible == true {
+            areaMeasureInfoWindowController?.hideFloatingWindow()
+        }
+    }
+    
     // MARK: Set Methods
     
     var setDocument: CPDFDocument? {

+ 53 - 0
PDF Office/PDF Master/Strings/de.lproj/Localizable.strings

@@ -2896,3 +2896,56 @@
 "Please reset the font weight via the drop-down box" = "Bitte setzen Sie die Schriftstärke über das Dropdown-Feld zurück";
 "General Properties" = "Attribute";
 "From Image"="Vom image";
+
+"Measuring tools" = "Messgeräte";
+"No related content found, please change keywords" = "Kein verwandter Inhalt gefunden, bitte Schlüsselwörter ändern";
+"Scale cannot be less than 0 or empty." = "Die Skala darf nicht kleiner als 0 oder leer sein.";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode." = "Doppelklicken Sie, um das Zeichnen abzuschließen. Drücken Sie ESC, um den kontinuierlichen Messmodus zu verlassen.";
+"ESC to exit continuous measuring mode." = "Drücken Sie ESC, um den kontinuierlichen Messmodus zu verlassen.";
+"Redact" = "Redigieren";
+"Redact Properties" = "Eigenschaften redigieren";
+"Search" = "Suchen";
+"Replace" = "Ersetzen";
+"Match Whole Word" = "Ganzes Wort abgleichen";
+"Case Sensitive" = "Groß- und Kleinschreibung beachten";
+"Previous" = "Vorherige";
+"Next" = "Nächste";
+"Replace with" = "Ersetzen mit ";
+"Replace All" = "Alles ersetzen";
+"To Json" = "An Json";
+"Json Worksheet Settings" = "Json-Arbeitsblatteinstellungen";
+"Extract text content" = "Textinhalt extrahieren";
+"Extract tables" = "Tabellen extrahieren";
+"White Out PDF" = "White-Out-PDF";
+"Measure" = "Messen";
+"Line" = "Linie";
+"Multilines" = "Mehrzeilig";
+"Polygon" = "Polygon";
+"Rectangle" = "Rechteck";
+"Distance Measurement" = "Entfernungsmessung";
+"Scale" = "Skala";
+"Length" = "Länge";
+"Area" = "Bereich";
+"Precision" = "Präzision";
+"Angle" = "Winkel";
+"X" = "X";
+"Y" = "Y";
+"Settings" = "Einstellungen";
+"Measure Settings" = "Messeinstellungen";
+"Drawing Dimensions: Actual Size" = "Zeichnungsmaße: Tatsächliche Größe";
+"Precision Setting" = "Präzisionseinstellung";
+"Show Caption" = "Untertitel anzeigen";
+"Length" = "Länge";
+"Area" = "Bereich";
+"Line" = "Linie";
+"Multilines" = "Mehrzeilig";
+"Polygon" = "Polygon";
+"Rectangle" = "Rechteck";
+"Measuring Tools" = "Messgeräte";
+"Easily Annotate Dimensional Data on PDFs" = "Einfaches Kommentieren von Dimensionsdaten in PDFs";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs." = "Mit dem Messwerkzeug können Benutzer Entfernungen, Umfang, Fläche und Winkel genau messen, was es zu einer idealen Lösung für die Bauindustrie macht, um Dimensionsdaten in PDFs zu kommentieren.";
+"Measure" = "Messen";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools." = "Mit den Messwerkzeugen können Sie Entfernung, Umfang, Fläche und Winkel genau messen.";
+"Replace Text" = "Text ersetzen";
+"Click the drop-down button to replace text." = "Klicken Sie auf die Dropdown-Schaltfläche, um Text zu ersetzen.";
+"Measuring Tools" = "Messgeräte";

+ 53 - 0
PDF Office/PDF Master/Strings/en.lproj/Localizable.strings

@@ -4074,3 +4074,56 @@
 
 "Please reset the font weight via the drop-down box" = "Please reset the font weight via the drop-down box";
 "General Properties" = "General Properties";
+
+"Measuring tools" = "Measuring tools";
+"No related content found, please change keywords" = "No related content found, please change keywords";
+"Scale cannot be less than 0 or empty." = "Scale cannot be less than 0 or empty.";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode." = "Double-click to finish drawing. Press ESC to exit continuous measuring mode.";
+"Press/Users/kdanwj/Git/Mac/PDF Office/PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings ESC to exit continuous measuring mode." = "Press ESC to exit continuous measuring mode.";
+"Redact" = "Redact";
+"Redact Properties" = "Redact Properties";
+"Search" = "Search";
+"Replace" = "Replace";
+"Match Whole Word" = "Match Whole Word";
+"Case Sensitive" = "Case Sensitive";
+"Previous" = "Previous";
+"Next" = "Next";
+"Replace with" = "Replace with";
+"Replace All" = "Replace All";
+"To Json" = "To Json";
+"Json Worksheet Settings" = "Json Worksheet Settings";
+"Extract text content" = "Extract text content";
+"Extract tables" = "Extract tables";
+"White Out PDF" = "White Out PDF";
+"Measure" = "Measure";
+"Line" = "Line";
+"Multilines" = "Multilines";
+"Polygon" = "Polygon";
+"Rectangle" = "Rectangle";
+"Distance Measurement" = "Distance Measurement";
+"Scale" = "Scale";
+"Length" = "Length";
+"Area" = "Area";
+"Precision" = "Precision";
+"Angle" = "Angle";
+"X" = "X";
+"Y" = "Y";
+"Settings" = "Settings";
+"Measure Settings" = "Measure Settings";
+"Drawing Dimensions: Actual Size" = "Drawing Dimensions: Actual Size";
+"Precision Setting" = "Precision Setting";
+"Show Caption" = "Show Caption";
+"Length" = "Length";
+"Area" = "Area";
+"Line" = "Line";
+"Multilines" = "Multilines";
+"Polygon" = "Polygon";
+"Rectangle" = "Rectangle";
+"Measuring Tools" = "Measuring Tools";
+"Easily Annotate Dimensional Data on PDFs" = "Easily Annotate Dimensional Data on PDFs";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs." = "The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs.";
+"Measure" = "Measure";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools." = "You can measure distance, perimeter, area and angle accurately with the measuring tools.";
+"Replace Text" = "Replace Text";
+"Click the drop-down button to replace text." = "Click the drop-down button to replace text.";
+"Measuring Tools" = "Measuring Tools";

+ 53 - 0
PDF Office/PDF Master/Strings/es.lproj/Localizable.strings

@@ -2988,3 +2988,56 @@
 "Please reset the font weight via the drop-down box" = "Restablezca el peso de la fuente a través del cuadro desplegable";
 "General Properties" = "Atributos";
 "From Image"="desde imagen";
+
+"Measuring tools" = "Herramientas de medición";
+"No related content found, please change keywords" = "No se encontró contenido relacionado, cambie las palabras clave";
+"Scale cannot be less than 0 or empty." = "La escala no puede ser menor que 0 ni estar vacía.";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode." = "Haga doble clic para terminar de dibujar. Presione ESC para salir del modo de medición continua.";
+"ESC to exit continuous measuring mode." = "Presione ESC para salir del modo de medición continua.";
+"Redact" = "Redactar";
+"Redact Properties" = "Redactar propiedades";
+"Search" = "Buscar";
+"Replace" = "Reemplazar";
+"Match Whole Word" = "Compare la palabra completa";
+"Case Sensitive" = "Distingue mayúsculas y minúsculas";
+"Previous" = "Anterior";
+"Next" = "Próximo";
+"Replace with" = "Reemplazar con ";
+"Replace All" = "Reemplaza todo";
+"To Json" = "A json";
+"Json Worksheet Settings" = "Configuración de la hoja de trabajo Json";
+"Extract text content" = "Extraer contenido de texto";
+"Extract tables" = "Extraer tablas";
+"White Out PDF" = "PDF en blanco";
+"Measure" = "Medida";
+"Line" = "Línea";
+"Multilines" = "Líneas múltiples";
+"Polygon" = "Polígono";
+"Rectangle" = "Rectángulo";
+"Distance Measurement" = "Medida de distancia";
+"Scale" = "Escala";
+"Length" = "Longitud";
+"Area" = "Área";
+"Precision" = "Precisión";
+"Angle" = "Ángulo";
+"X" = "X";
+"Y" = "Y";
+"Settings" = "Ajustes";
+"Measure Settings" = "Configuración de medidas";
+"Drawing Dimensions: Actual Size" = "Dimensiones del dibujo: tamaño real";
+"Precision Setting" = "Ajuste de precisión";
+"Show Caption" = "Mostrar título";
+"Length" = "Longitud";
+"Area" = "Área";
+"Line" = "Línea";
+"Multilines" = "Líneas múltiples";
+"Polygon" = "Polígono";
+"Rectangle" = "Rectángulo";
+"Measuring Tools" = "Herramientas de medición";
+"Easily Annotate Dimensional Data on PDFs" = "Anote fácilmente datos dimensionales en archivos PDF";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs." = "La herramienta de medición permite a los usuarios medir distancias, perímetros, áreas y ángulos con precisión, lo que la convierte en una solución ideal para que la industria de la construcción anote datos dimensionales en archivos PDF.";
+"Measure" = "Medida";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools." = "Puede medir distancias, perímetros, áreas y ángulos con precisión con las herramientas de medición.";
+"Replace Text" = "Reemplazar texto";
+"Click the drop-down button to replace text." = "Haga clic en el botón desplegable para reemplazar el texto.";
+"Measuring Tools" = "Herramientas de medición";

+ 53 - 0
PDF Office/PDF Master/Strings/fr.lproj/Localizable.strings

@@ -2859,3 +2859,56 @@
 "Please reset the font weight via the drop-down box" = "Veuillez réinitialiser l'épaisseur de la police via la liste déroulante";
 "General Properties" = "Les attributs";
 "From Image"="de l'image";
+
+"Measuring tools" = "Outils de mesure";
+"No related content found, please change keywords" = "Aucun contenu associé trouvé, veuillez modifier les mots-clés";
+"Scale cannot be less than 0 or empty." = "L'échelle ne peut pas être inférieure à 0 ou vide.";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode." = "Double-cliquez pour terminer le dessin. Appuyez sur ESC pour quitter le mode de mesure continue.";
+"ESC to exit continuous measuring mode." = "Appuyez sur ESC pour quitter le mode de mesure continue.";
+"Redact" = "Rédiger";
+"Redact Properties" = "Propriétés de rédaction";
+"Search" = "Recherche";
+"Replace" = "Remplacer";
+"Match Whole Word" = "Correspond à un mot entier";
+"Case Sensitive" = "Sensible aux majuscules et minuscules";
+"Previous" = "Précédent";
+"Next" = "Suivant";
+"Replace with" = "Remplacer par ";
+"Replace All" = "Remplace tout";
+"To Json" = "À Json";
+"Json Worksheet Settings" = "Paramètres de la feuille de calcul Json";
+"Extract text content" = "Extraire le contenu du texte";
+"Extract tables" = "Extraire des tableaux";
+"White Out PDF" = "PDF blanc";
+"Measure" = "Mesure";
+"Line" = "Doubler";
+"Multilines" = "Multilignes";
+"Polygon" = "Polygone";
+"Rectangle" = "Rectangle";
+"Distance Measurement" = "Mesure de distance";
+"Scale" = "Échelle";
+"Length" = "Longueur";
+"Area" = "Zone";
+"Precision" = "Précision";
+"Angle" = "Angle";
+"X" = "X";
+"Y" = "Oui";
+"Settings" = "Paramètres";
+"Measure Settings" = "Paramètres de mesure";
+"Drawing Dimensions: Actual Size" = "Dimensions du dessin : taille réelle";
+"Precision Setting" = "Réglage de précision";
+"Show Caption" = "Afficher la légende";
+"Length" = "Longueur";
+"Area" = "Zone";
+"Line" = "Doubler";
+"Multilines" = "Multilignes";
+"Polygon" = "Polygone";
+"Rectangle" = "Rectangle";
+"Measuring Tools" = "Outils de mesure";
+"Easily Annotate Dimensional Data on PDFs" = "Annotez facilement les données dimensionnelles sur les PDF";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs." = "L'outil de mesure permet aux utilisateurs de mesurer avec précision la distance, le périmètre, la surface et l'angle, ce qui en fait une solution idéale pour le secteur de la construction pour annoter les données dimensionnelles sur des PDF.";
+"Measure" = "Mesure";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools." = "Vous pouvez mesurer avec précision la distance, le périmètre, la surface et l'angle avec les outils de mesure.";
+"Replace Text" = "Remplacer le texte";
+"Click the drop-down button to replace text." = "Cliquez sur le bouton déroulant pour remplacer le texte.";
+"Measuring Tools" = "Outils de mesure";

+ 54 - 0
PDF Office/PDF Master/Strings/it.lproj/Localizable.strings

@@ -2784,3 +2784,57 @@
 "Please reset the font weight via the drop-down box" = "Reimpostare lo spessore del carattere tramite la casella a discesa";
 "General Properties" = "Attributi";
 "From Image"="dall'immagine";
+
+"Measuring tools"="Strumenti di misurazione";
+"No related content found, please change keywords"="Nessun contenuto correlato trovato, modifica le parole chiave";
+"Scale cannot be less than 0 or empty."="La scala non può essere inferiore a 0 o vuota.";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode."="Fare doppio clic per terminare il disegno. Premere ESC per uscire dalla modalità di misurazione continua.";
+"Press ESC to exit continuous measuring mode."="Premere ESC per uscire dalla modalità di misurazione continua.";
+"Redact"="Redigere";
+"Redact Properties"="Proprietà oscuramento";
+""="";
+"Search"="Ricerca";
+"Replace"="Sostituire";
+"Match Whole Word"="Corrisponde all'intera parola";
+"Case Sensitive"="Maiuscole e minuscole";
+"Previous"="Precedente";
+"Next"="Prossimo";
+"Replace with "="Sostituirlo con ";
+"Replace All"="Sostituisci tutto";
+"To Json"="A Json";
+"Json Worksheet Settings"="Impostazioni del foglio di lavoro Json";
+"Extract text content"="Estrai contenuto testuale";
+"Extract tables"="Estrai tabelle";
+"White Out PDF"="PDF bianco";
+"Measure"="Misurare";
+"Line"="Linea";
+"Multilines"="Multilinee";
+"Polygon"="Poligono";
+"Rectangle"="Rettangolo";
+"Distance Measurement"="Misurazione della distanza";
+"Scale"="Scala";
+"Length"="Lunghezza";
+"Area"="La zona";
+"Precision"="Precisione";
+"Angle"="Angolo";
+"X"="X";
+"Y"="Y";
+"Settings"="Impostazioni";
+"Measure Settings"="Impostazioni di misura";
+"Drawing Dimensions: Actual Size"="Dimensioni del disegno: dimensioni reali";
+"Precision Setting"="Impostazione di precisione";
+"Show Caption"="Mostra didascalia";
+"Length"="Lunghezza";
+"Area"="La zona";
+"Line"="Linea";
+"Multilines"="Multilinee";
+"Polygon"="Poligono";
+"Rectangle"="Rettangolo";
+"Measuring Tools"="Strumenti di misurazione";
+"Easily Annotate Dimensional Data on PDFs"="Annota facilmente i dati dimensionali sui PDF";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs."="Lo strumento di misurazione consente agli utenti di misurare con precisione distanza, perimetro, area e angolo, rendendolo una soluzione ideale per il settore edile per annotare dati dimensionali sui PDF.";
+"Measure"="Misurare";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools."="Puoi misurare con precisione distanza, perimetro, area e angolo con gli strumenti di misurazione.";
+"Replace Text"="Sostituisci testo";
+"Click the drop-down button to replace text."="Fare clic sul pulsante a discesa per sostituire il testo.";
+"Measuring Tools"="Strumenti di misurazione";

+ 54 - 0
PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings

@@ -3051,3 +3051,57 @@
 "Please reset the font weight via the drop-down box" = "ドロップダウンボックスからフォントの太さをリセットしてください";
 "General Properties" = "属性";
 "From Image"="イメージから";
+
+"Measuring tools"="測定ツール";
+"No related content found, please change keywords"="関連するコンテンツが見つかりませんでした。キーワードを変更してください";
+"Scale cannot be less than 0 or empty."="スケールを 0 未満にしたり、空にしたりすることはできません。";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode."="ダブルクリックして描画を終了します。 ESC を押して連続測定モードを終了します。";
+"Press ESC to exit continuous measuring mode."="ESC を押して連続測定モードを終了します。";
+"Redact"="編集";
+"Redact Properties"="編集プロパティ";
+""="";
+"Search"="検索";
+"Replace"="交換する";
+"Match Whole Word"="単語全体に一致";
+"Case Sensitive"="大文字と小文字を区別";
+"Previous"="前の";
+"Next"="次";
+"Replace with "="と置換する ";
+"Replace All"="すべて置換";
+"To Json"="ジェイソンへ";
+"Json Worksheet Settings"="Json ワークシートの設定";
+"Extract text content"="テキストコンテンツを抽出する";
+"Extract tables"="テーブルの抽出";
+"White Out PDF"="ホワイトアウトPDF";
+"Measure"="測定";
+"Line"="ライン";
+"Multilines"="複数行";
+"Polygon"="ポリゴン";
+"Rectangle"="矩形";
+"Distance Measurement"="距離測定";
+"Scale"="規模";
+"Length"="長さ";
+"Area"="エリア";
+"Precision"="精度";
+"Angle"="角度";
+"X"="バツ";
+"Y"="Y";
+"Settings"="設定";
+"Measure Settings"="測定設定";
+"Drawing Dimensions: Actual Size"="図面寸法: 実寸";
+"Precision Setting"="精密設定";
+"Show Caption"="キャプションを表示";
+"Length"="長さ";
+"Area"="エリア";
+"Line"="ライン";
+"Multilines"="複数行";
+"Polygon"="ポリゴン";
+"Rectangle"="矩形";
+"Measuring Tools"="測定ツール";
+"Easily Annotate Dimensional Data on PDFs"="PDF 上の寸法データに簡単に注釈を付ける";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs."="この測定ツールを使用すると、ユーザーは距離、周長、面積、角度を正確に測定できるため、建設業界が PDF に寸法データに注釈を付けるための理想的なソリューションとなります。";
+"Measure"="測定";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools."="測定ツールを使用すると、距離、周長、面積、角度を正確に測定できます。";
+"Replace Text"="テキストを置換する";
+"Click the drop-down button to replace text."="テキストを置換するには、ドロップダウン ボタンをクリックします。";
+"Measuring Tools"="測定ツール";

+ 54 - 0
PDF Office/PDF Master/Strings/pl.lproj/Localizable.strings

@@ -3000,3 +3000,57 @@
 "Please reset the font weight via the drop-down box" = "Zresetuj grubość czcionki za pomocą rozwijanego pola";
 "General Properties" = "Atrybuty";
 "From Image"="z obrazu";
+
+"Measuring tools"="Narzędzia pomiarowe";
+"No related content found, please change keywords"="Nie znaleziono powiązanej treści. Zmień słowa kluczowe";
+"Scale cannot be less than 0 or empty."="Skala nie może być mniejsza niż 0 ani pusta.";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode."="Kliknij dwukrotnie, aby zakończyć rysowanie. Naciśnij ESC, aby wyjść z trybu pomiaru ciągłego.";
+"Press ESC to exit continuous measuring mode."="Naciśnij ESC, aby wyjść z trybu pomiaru ciągłego.";
+"Redact"="Redagować";
+"Redact Properties"="Redaguj właściwości";
+""="";
+"Search"="Szukaj";
+"Replace"="Zastępować";
+"Match Whole Word"="Dopasować całe słowo";
+"Case Sensitive"="Wielkość liter uwzględniana";
+"Previous"="Poprzedni";
+"Next"="Następny";
+"Replace with "="Zamienić ";
+"Replace All"="Zamień wszystko";
+"To Json"="Do Jsona";
+"Json Worksheet Settings"="Ustawienia arkusza Json";
+"Extract text content"="Wyodrębnij treść tekstową";
+"Extract tables"="Wyodrębnij tabele";
+"White Out PDF"="Wybielanie PDF";
+"Measure"="Mierzyć";
+"Line"="Linia";
+"Multilines"="Multilinie";
+"Polygon"="Wielokąt";
+"Rectangle"="Prostokąt";
+"Distance Measurement"="Pomiar odległości";
+"Scale"="Skala";
+"Length"="Długość";
+"Area"="Obszar";
+"Precision"="Precyzja";
+"Angle"="Kąt";
+"X"="X";
+"Y"="Y";
+"Settings"="Ustawienia";
+"Measure Settings"="Ustawienia pomiaru";
+"Drawing Dimensions: Actual Size"="Wymiary rysunku: Rzeczywisty rozmiar";
+"Precision Setting"="Ustawienie precyzji";
+"Show Caption"="Pokaż podpis";
+"Length"="Długość";
+"Area"="Obszar";
+"Line"="Linia";
+"Multilines"="Multilinie";
+"Polygon"="Wielokąt";
+"Rectangle"="Prostokąt";
+"Measuring Tools"="Narzędzia pomiarowe";
+"Easily Annotate Dimensional Data on PDFs"="Z łatwością dodawaj adnotacje do danych wymiarowych w plikach PDF";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs."="Narzędzie pomiarowe umożliwia użytkownikom dokładny pomiar odległości, obwodu, powierzchni i kąta, co czyni go idealnym rozwiązaniem dla branży budowlanej do opisywania danych wymiarowych w plikach PDF.";
+"Measure"="Mierzyć";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools."="Za pomocą narzędzi pomiarowych możesz dokładnie zmierzyć odległość, obwód, powierzchnię i kąt.";
+"Replace Text"="Zastąp tekst";
+"Click the drop-down button to replace text."="Kliknij przycisk rozwijany, aby zastąpić tekst.";
+"Measuring Tools"="Narzędzia pomiarowe";

Dosya farkı çok büyük olduğundan ihmal edildi
+ 54 - 0
PDF Office/PDF Master/Strings/ru.lproj/Localizable.strings


+ 53 - 0
PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings

@@ -3961,3 +3961,56 @@
 "Please reset the font weight via the drop-down box" = "请通过下拉框重设字重";
 "General Properties" = "属性";
 "From Image"="从图像";
+
+"Measuring tools" = "测量工具";
+"No related content found, please change keywords" = "未找到您所查找的内容,请更换关键词";
+"Scale cannot be less than 0 or empty." = "比例不能小于0或为空。";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode." = "双击完成绘制。按Esc退出连续测量模式。";
+"ESC to exit continuous measuring mode." = "按Esc完成绘制并退出连续测量模式。";
+"Redact" = "标记密文";
+"Redact Properties" = "密文属性";
+"Search" = "搜索";
+"Replace" = "替换";
+"Match Whole Word" = "仅完整单词";
+"Case Sensitive" = "区分大小写";
+"Previous" = "上一个";
+"Next" = "下一个";
+"Replace with" = "替换为";
+"Replace All" = "全部替换";
+"To Json" = "PDF转Json";
+"Json Worksheet Settings" = "Json工作表设置";
+"Extract text content" = "提取文本内容";
+"Extract tables" = "提取表格";
+"White Out PDF" = "涂白";
+"Measure" = "测量";
+"Line" = "线段";
+"Multilines" = "多线段";
+"Polygon" = "多边形";
+"Rectangle" = "矩形";
+"Distance Measurement" = "距离测量";
+"Scale" = "比例";
+"Length" = "长度";
+"Area" = "面积";
+"Precision" = "精度";
+"Angle" = "角度";
+"X" = "X";
+"Y" = "Y";
+"Settings" = "设置";
+"Measure Settings" = "测量设置";
+"Drawing Dimensions: Actual Size" = "绘图尺寸: 实际尺寸";
+"Precision Setting" = "精度设置";
+"Show Caption" = "显示说明";
+"Length" = "长度";
+"Area" = "面积";
+"Line" = "线段";
+"Multilines" = "多线段";
+"Polygon" = "多边形";
+"Rectangle" = "矩形";
+"Measuring Tools" = "测量工具";
+"Easily Annotate Dimensional Data on PDFs" = "轻松在PDF文件上标注尺寸";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs." = "利用测量工具,您可以精确测量PDF中图形的距离,周长、面积和角度,为工程师在PDF文件上标注尺寸数据提供理想解决方案。";
+"Measure" = "测量";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools." = "您可以使用测量工具精确测量图形距离、周长、面积和角度。";
+"Replace Text" = "文本替换";
+"Click the drop-down button to replace text." = "点击下拉按钮,轻松替换文本。";
+"Measuring Tools" = "测量工具";

+ 53 - 0
PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings

@@ -4091,3 +4091,56 @@
 "Please reset the font weight via the drop-down box" = "請透過下拉框重設字重";
 "General Properties" = "屬性";
 "From Image"="來自影像";
+
+"Measuring tools" = "測量工具";
+"No related content found, please change keywords" = "找不到您要找的內容,請更換關鍵字";
+"Scale cannot be less than 0 or empty." = "比例不能小於0或為空。";
+"Double-click to finish drawing. Press ESC to exit continuous measuring mode." = "雙擊完成繪製。按Esc退出連續測量模式。";
+"ESC to exit continuous measuring mode." = "按Esc完成繪製並退出連續測量模式。";
+"Redact" = "標記密文";
+"Redact Properties" = "密文屬性";
+"Search" = "搜尋";
+"Replace" = "替換";
+"Match Whole Word" = "僅完整單字";
+"Case Sensitive" = "區分大小寫";
+"Previous" = "上一個";
+"Next" = "下一個";
+"Replace with" = "替換為";
+"Replace All" = "全部替換";
+"To Json" = "PDF轉Json";
+"Json Worksheet Settings" = "Json工作表設定";
+"Extract text content" = "提取文字內容";
+"Extract tables" = "提取表格";
+"White Out PDF" = "塗白";
+"Measure" = "測量";
+"Line" = "線段";
+"Multilines" = "多線段";
+"Polygon" = "多邊形";
+"Rectangle" = "長方形";
+"Distance Measurement" = "距離測量";
+"Scale" = "比例";
+"Length" = "長度";
+"Area" = "面積";
+"Precision" = "精確度";
+"Angle" = "角度";
+"X" = "X";
+"Y" = "Y";
+"Settings" = "設定";
+"Measure Settings" = "測量設定";
+"Drawing Dimensions: Actual Size" = "繪圖尺寸: 實際尺寸";
+"Precision Setting" = "精度設定";
+"Show Caption" = "顯示說明";
+"Length" = "長度";
+"Area" = "面積";
+"Line" = "線段";
+"Multilines" = "多線段";
+"Polygon" = "多邊形";
+"Rectangle" = "長方形";
+"Measuring Tools" = "測量工具";
+"Easily Annotate Dimensional Data on PDFs" = "輕鬆在PDF文件上標註尺寸";
+"The measuring tool allows users to measure distance, perimeter, area and angle accurately, making it an ideal solution for the construction industry to annotate dimensional data on PDFs." = "利用測量工具,您可以精確測量PDF中圖形的距離、周長、面積和角度,為工程師在PDF文件上標註尺寸資料提供理想解決方案。";
+"Measure" = "測量";
+"You can measure distance, perimeter, area and angle accurately with the measuring tools." = "您可以使用測量工具精確測量圖形的距離、周長、面積和角度。";
+"Replace Text" = "替換文字";
+"Click the drop-down button to replace text." = "点击下拉按鈕,輕鬆替換文字。";
+"Measuring Tools" = "測量工具";

+ 71 - 7
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -1189,6 +1189,36 @@
 		9FF371C32C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B72C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.swift */; };
 		9FF371C42C69A6BB005F9CC5 /* CAreaSettingWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B82C69A6BB005F9CC5 /* CAreaSettingWindowController.xib */; };
 		9FF371C52C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B92C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.xib */; };
+		9FF371C82C69A9E2005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371C62C69A9E1005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift */; };
+		9FF371C92C69A9E2005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371C72C69A9E1005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift */; };
+		9FF371CA2C69B857005F9CC5 /* CDistanceMeasureInfoWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B22C69A6BB005F9CC5 /* CDistanceMeasureInfoWindowController.swift */; };
+		9FF371CB2C69B857005F9CC5 /* CDistanceMeasureInfoWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B22C69A6BB005F9CC5 /* CDistanceMeasureInfoWindowController.swift */; };
+		9FF371CC2C69B8AE005F9CC5 /* KMMeasureSideVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371AE2C69A6BA005F9CC5 /* KMMeasureSideVC.swift */; };
+		9FF371CD2C69B8AF005F9CC5 /* KMMeasureSideVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371AE2C69A6BA005F9CC5 /* KMMeasureSideVC.swift */; };
+		9FF371CE2C69B8B3005F9CC5 /* CPerimeterMeasureInfoWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B72C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.swift */; };
+		9FF371CF2C69B8B3005F9CC5 /* CPerimeterMeasureInfoWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B72C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.swift */; };
+		9FF371D02C69B8B6005F9CC5 /* KMMeasureSideVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371AD2C69A6BA005F9CC5 /* KMMeasureSideVC.xib */; };
+		9FF371D12C69B8B7005F9CC5 /* KMMeasureSideVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371AD2C69A6BA005F9CC5 /* KMMeasureSideVC.xib */; };
+		9FF371D22C69B8BC005F9CC5 /* CDistanceMeasureInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B42C69A6BB005F9CC5 /* CDistanceMeasureInfoWindowController.xib */; };
+		9FF371D32C69B8BC005F9CC5 /* CDistanceMeasureInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B42C69A6BB005F9CC5 /* CDistanceMeasureInfoWindowController.xib */; };
+		9FF371D42C69B8C6005F9CC5 /* CPerimeterMeasureInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B62C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.xib */; };
+		9FF371D52C69B8C6005F9CC5 /* CPerimeterMeasureInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B62C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.xib */; };
+		9FF371D62C69B8C9005F9CC5 /* CAreaMeasureInfoWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B32C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.swift */; };
+		9FF371D72C69B8CA005F9CC5 /* CAreaMeasureInfoWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B32C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.swift */; };
+		9FF371D82C69B92F005F9CC5 /* CAreaMeasureInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B92C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.xib */; };
+		9FF371D92C69B930005F9CC5 /* CAreaMeasureInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B92C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.xib */; };
+		9FF371DA2C69B933005F9CC5 /* CDistanceSettingWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B12C69A6BB005F9CC5 /* CDistanceSettingWindowController.swift */; };
+		9FF371DB2C69B934005F9CC5 /* CDistanceSettingWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B12C69A6BB005F9CC5 /* CDistanceSettingWindowController.swift */; };
+		9FF371DC2C69B937005F9CC5 /* CDistanceSettingWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B02C69A6BB005F9CC5 /* CDistanceSettingWindowController.xib */; };
+		9FF371DD2C69B938005F9CC5 /* CDistanceSettingWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B02C69A6BB005F9CC5 /* CDistanceSettingWindowController.xib */; };
+		9FF371DE2C69B93A005F9CC5 /* CAreaSettingWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B52C69A6BB005F9CC5 /* CAreaSettingWindowController.swift */; };
+		9FF371DF2C69B93B005F9CC5 /* CAreaSettingWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371B52C69A6BB005F9CC5 /* CAreaSettingWindowController.swift */; };
+		9FF371E02C69B93E005F9CC5 /* CAreaSettingWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B82C69A6BB005F9CC5 /* CAreaSettingWindowController.xib */; };
+		9FF371E12C69B93E005F9CC5 /* CAreaSettingWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B82C69A6BB005F9CC5 /* CAreaSettingWindowController.xib */; };
+		9FF371E22C69D2F4005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371C72C69A9E1005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift */; };
+		9FF371E32C69D2F4005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371C72C69A9E1005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift */; };
+		9FF371E42C69D2F7005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371C62C69A9E1005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift */; };
+		9FF371E52C69D2F8005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371C62C69A9E1005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift */; };
 		9FF816DD2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816DC2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift */; };
 		9FF816DE2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816DC2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift */; };
 		9FF816DF2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF816DC2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift */; };
@@ -5931,6 +5961,8 @@
 		9FF371B72C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CPerimeterMeasureInfoWindowController.swift; sourceTree = "<group>"; };
 		9FF371B82C69A6BB005F9CC5 /* CAreaSettingWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CAreaSettingWindowController.xib; sourceTree = "<group>"; };
 		9FF371B92C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CAreaMeasureInfoWindowController.xib; sourceTree = "<group>"; };
+		9FF371C62C69A9E1005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CPDFPolygonAnnotation+PDFListView.swift"; sourceTree = "<group>"; };
+		9FF371C72C69A9E1005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CPDFPolylineAnnotation+PDFListView.swift"; sourceTree = "<group>"; };
 		9FF816DC2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAnnotationTableViewController.swift; sourceTree = "<group>"; };
 		9FF816E02AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMAnnotationTableViewController.xib; sourceTree = "<group>"; };
 		9FF816F22AFB18290087EFC5 /* NSGeometry_KMExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSGeometry_KMExtensions.swift; sourceTree = "<group>"; };
@@ -8877,8 +8909,8 @@
 		9FF371AC2C69A6BA005F9CC5 /* Side */ = {
 			isa = PBXGroup;
 			children = (
-				9FF371AD2C69A6BA005F9CC5 /* KMMeasureSideVC.xib */,
 				9FF371AE2C69A6BA005F9CC5 /* KMMeasureSideVC.swift */,
+				9FF371AD2C69A6BA005F9CC5 /* KMMeasureSideVC.xib */,
 			);
 			path = Side;
 			sourceTree = "<group>";
@@ -8886,16 +8918,16 @@
 		9FF371AF2C69A6BB005F9CC5 /* Window */ = {
 			isa = PBXGroup;
 			children = (
-				9FF371B02C69A6BB005F9CC5 /* CDistanceSettingWindowController.xib */,
-				9FF371B12C69A6BB005F9CC5 /* CDistanceSettingWindowController.swift */,
 				9FF371B22C69A6BB005F9CC5 /* CDistanceMeasureInfoWindowController.swift */,
-				9FF371B32C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.swift */,
 				9FF371B42C69A6BB005F9CC5 /* CDistanceMeasureInfoWindowController.xib */,
-				9FF371B52C69A6BB005F9CC5 /* CAreaSettingWindowController.swift */,
-				9FF371B62C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.xib */,
 				9FF371B72C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.swift */,
-				9FF371B82C69A6BB005F9CC5 /* CAreaSettingWindowController.xib */,
+				9FF371B62C69A6BB005F9CC5 /* CPerimeterMeasureInfoWindowController.xib */,
+				9FF371B32C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.swift */,
 				9FF371B92C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.xib */,
+				9FF371B12C69A6BB005F9CC5 /* CDistanceSettingWindowController.swift */,
+				9FF371B02C69A6BB005F9CC5 /* CDistanceSettingWindowController.xib */,
+				9FF371B52C69A6BB005F9CC5 /* CAreaSettingWindowController.swift */,
+				9FF371B82C69A6BB005F9CC5 /* CAreaSettingWindowController.xib */,
 			);
 			path = Window;
 			sourceTree = "<group>";
@@ -14185,6 +14217,8 @@
 				BB6013832AD3A0DE00A76FB2 /* CPDFTextWidgetAnnotation+PDFListView.swift */,
 				BB6013872AD3A3CB00A76FB2 /* CPDFWidgetAnnotation+PDFListView.swift */,
 				BB60138B2AD3A94200A76FB2 /* CPDFSignatureAnnotation+PDFListView.swift */,
+				9FF371C62C69A9E1005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift */,
+				9FF371C72C69A9E1005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift */,
 				9FF816E42AFA5D400087EFC5 /* Table */,
 				F37322C6292DF9410013862C /* SelfSign */,
 			);
@@ -15081,12 +15115,14 @@
 				AD8810AD29A8463600178CA1 /* KMAccountInfoWindowController.xib in Resources */,
 				BBB29BCF2AEA190E005F1B6B /* KMToolbarCustomViewController.xib in Resources */,
 				BBAFDA7E2B4CDE1D00278BC3 /* KMPDFCropWindowController.xib in Resources */,
+				9FF371D82C69B92F005F9CC5 /* CAreaMeasureInfoWindowController.xib in Resources */,
 				ADE86A972B0226BB00414DFA /* KMRemovePasswordView.xib in Resources */,
 				BBEFD0212AF9E5BC003FABD8 /* KMBatchOperateAddHeaderFooterViewController.xib in Resources */,
 				9F03900A2B426F3300302D1D /* KMPageDisplayPropertiesViewController.xib in Resources */,
 				ADF1569829A62D31001D1018 /* KMLoginLeftImageView.xib in Resources */,
 				89316856296E45CA0073EA59 /* KMImageAccessoryController.xib in Resources */,
 				9F02018A2A1DA28B00C9B673 /* KMAILanguagePopVC.xib in Resources */,
+				9FF371D42C69B8C6005F9CC5 /* CPerimeterMeasureInfoWindowController.xib in Resources */,
 				9FA693AC2987C0590055488A /* KMStepperView.xib in Resources */,
 				BB1B0AFF2B4FC6E900889528 /* KMOpenFileFunctionView.xib in Resources */,
 				AD58F4132B1DAAB200299EE0 /* KMPrintDefaultView.xib in Resources */,
@@ -15173,6 +15209,7 @@
 				F3B7DF9E2948565000333201 /* CPDFListHoverAnnotationViewController.xib in Resources */,
 				BBADCF592AF3C7B3004ECE0C /* KMBatchOperateAddWatermarkViewController.xib in Resources */,
 				BB1B0AF02B4FC6E900889528 /* KMFunctionGuideNameItemView.xib in Resources */,
+				9FF371D22C69B8BC005F9CC5 /* CDistanceMeasureInfoWindowController.xib in Resources */,
 				BBD8EE9A2B8EC86A00EB05FE /* AutoSaveFileItem.xib in Resources */,
 				BB10FAEA2AFE03CD00F18D65 /* KMPDFEditPageRangeWindowController.xib in Resources */,
 				BB948D022BFF63C9000FBA01 /* KMToolbarConfigViewController.xib in Resources */,
@@ -15402,6 +15439,7 @@
 				ADFA8F162B60E02B002595A4 /* KMSecureAlertView.xib in Resources */,
 				BB1EC8022967B26700EC0BC3 /* KMPDFEditViewController.xib in Resources */,
 				ADAFDA5F2AEB455500F084BC /* KMHomeContentView.xib in Resources */,
+				9FF371E02C69B93E005F9CC5 /* CAreaSettingWindowController.xib in Resources */,
 				AD1D48532AFB8510007AC1F0 /* KMMergeTableViewCell.xib in Resources */,
 				ADBC2CFF299CA6C7006280C8 /* KMPrintDuplexPrintingSetView.xib in Resources */,
 				89E4E7392964148E002DBA6F /* KMAnnotationPropertiesViewController.xib in Resources */,
@@ -15465,8 +15503,10 @@
 				AD7D5CC72B9566E9006562CD /* KMBookmarkOutlineView.xib in Resources */,
 				9F0CB46B2967E5CB00007028 /* KMPropertiesPanelSubViewController.xib in Resources */,
 				ADAFDA522AEB43BF00F084BC /* KMAdvertisement.xcassets in Resources */,
+				9FF371DC2C69B937005F9CC5 /* CDistanceSettingWindowController.xib in Resources */,
 				AD68783929A60FC0005B5210 /* KMLoginView.xib in Resources */,
 				AD85D1882AEF46DF000F4D28 /* KMHomeNOFileView.xib in Resources */,
+				9FF371D02C69B8B6005F9CC5 /* KMMeasureSideVC.xib in Resources */,
 				BBB789972BE8BF2400F7E09C /* AIInfoInputView.xib in Resources */,
 				AD3AAD602B0DA3D400DE5FE7 /* KMCompareTextViewItem.xib in Resources */,
 				ADD1B6F52946C07800C3FFF7 /* KMPrintChoosePageSizePosterView.xib in Resources */,
@@ -15616,6 +15656,7 @@
 				BB49ED03293F459500C82CA2 /* KMConvertPPTsWindowController.xib in Resources */,
 				BB2F9AA82AFC8D5A00F9DD93 /* KMProfileInfoWindowController.xib in Resources */,
 				BB89723F294B3C840045787C /* KMWatermarkPropertyController.xib in Resources */,
+				9FF371D32C69B8BC005F9CC5 /* CDistanceMeasureInfoWindowController.xib in Resources */,
 				BB49ECFB293F44DC00C82CA2 /* KMConvertExcelWindowController.xib in Resources */,
 				AD2D74B229F0CEB300EDC5E4 /* KMCancellationWindowController.xib in Resources */,
 				9F853A042947137500DF644E /* default-icon.pdf in Resources */,
@@ -15682,6 +15723,7 @@
 				AD1CA4162A061CCD0070541F /* KMAnnotationScreenColorViewItem.xib in Resources */,
 				ADE787B02AA5AA50002EC85A /* KMAccountExceptionView.xib in Resources */,
 				AD1CA3FC2A05FCB60070541F /* KMAnnotationScreenViewController.xib in Resources */,
+				9FF371D52C69B8C6005F9CC5 /* CPerimeterMeasureInfoWindowController.xib in Resources */,
 				ADD1B6F62946C07800C3FFF7 /* KMPrintChoosePageSizePosterView.xib in Resources */,
 				9FB2210C2B19BD8B00A5B208 /* KMGeneralAnnotationViewController.xib in Resources */,
 				89E4E6F12963D1B7002DBA6F /* KMColorPickerViewController.xib in Resources */,
@@ -15766,6 +15808,7 @@
 				BB4F7E7F2B0C45DE0077EC8C /* KMNoteOutlineFilterViewController.xib in Resources */,
 				AD7D5CDD2B957687006562CD /* KMBookmarkOutlinePageCellView.xib in Resources */,
 				BB8810752B4F785200AFA63E /* KMUnlockAlertViewController.xib in Resources */,
+				9FF371D92C69B930005F9CC5 /* CAreaMeasureInfoWindowController.xib in Resources */,
 				AD0FA50829A8E61B00EDEB50 /* KMLightMemberAlertView.xib in Resources */,
 				9F8810A22B5762BD00F69815 /* KMAnnotationButtonOptionsViewController.xib in Resources */,
 				BB03D6922B01C7AB008C9976 /* KMPDFEditInsertBlankPageWindow.xib in Resources */,
@@ -15806,6 +15849,7 @@
 				BB1B0AF12B4FC6E900889528 /* KMFunctionGuideNameItemView.xib in Resources */,
 				AD055E322B70B3D50035F824 /* KMBookmarkSheetController.xib in Resources */,
 				9F853A012947137500DF644E /* throbber.png in Resources */,
+				9FF371E12C69B93E005F9CC5 /* CAreaSettingWindowController.xib in Resources */,
 				AD7D5CF22B96B9E1006562CD /* KMBookmarkOutlineRowView.xib in Resources */,
 				AD1FE8492BD7C98300AA4A9B /* KMPDFPosterPrintWindowController.xib in Resources */,
 				AD1CA41E2A061CE10070541F /* KMAnnotationScreenTypeViewItem.xib in Resources */,
@@ -15943,6 +15987,7 @@
 				8942F7F52926087200389627 /* KMSearchViewController.xib in Resources */,
 				BBFE6E7A2930E53000142C01 /* KMMergePopoverViewController.xib in Resources */,
 				89D9897128FD50EF003A3E87 /* KMAnnotationCollectionViewItem.xib in Resources */,
+				9FF371DD2C69B938005F9CC5 /* CDistanceSettingWindowController.xib in Resources */,
 				9F1FE4E929406E4700E952CA /* COPYING in Resources */,
 				BBFE14D42BFD7FC300176992 /* KMCouponDueWindowController.xib in Resources */,
 				BB5F8A1B29BB15AD00365ADB /* pic_mail.pdf in Resources */,
@@ -16042,6 +16087,7 @@
 				BBB789B62BE8BF2400F7E09C /* AIChatStringUploadItem.xib in Resources */,
 				BBFBE74B28DD7DDE008B2335 /* Main.storyboard in Resources */,
 				9FDD0FA42952FF4D000C4DAD /* $themes.json in Resources */,
+				9FF371D12C69B8B7005F9CC5 /* KMMeasureSideVC.xib in Resources */,
 				BBD922422B50D6D600DB9585 /* rate_pic_free.pdf in Resources */,
 				AD1D48542AFB8510007AC1F0 /* KMMergeTableViewCell.xib in Resources */,
 				BB4F7E932B0C80000077EC8C /* KMNoteColorCollectionViewItem.xib in Resources */,
@@ -16670,6 +16716,7 @@
 				AD0E8AB42A31B78900DBFD3C /* KMDMGPurchaseManager.swift in Sources */,
 				9FDD0FB229534FEA000C4DAD /* KMGlobal.swift in Sources */,
 				9F1FE49329406E4700E952CA /* common.m in Sources */,
+				9FF371C92C69A9E2005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift in Sources */,
 				AD055E712B8732E00035F824 /* SKDictionaryFormatter.m in Sources */,
 				ADE86A9D2B031FDB00414DFA /* KMCompareWindowController.swift in Sources */,
 				BB14700E299DC0D100784A6A /* OIDScopes.m in Sources */,
@@ -17230,6 +17277,7 @@
 				BB5EC3622C2BDC9D0090EF27 /* KMTextAlignmentController.swift in Sources */,
 				BB147047299DC0D200784A6A /* OIDServiceConfiguration.m in Sources */,
 				BB89726D294DB67D0045787C /* KMWatermarkAdjectiveBaseView.swift in Sources */,
+				9FF371C82C69A9E2005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift in Sources */,
 				9F1FE4FF29406E4700E952CA /* CTTabStripModel.m in Sources */,
 				BBEC00CC295C31F900A26C98 /* KMBatesModel.swift in Sources */,
 				AD0E8AB92A31BDDD00DBFD3C /* KMProduct.swift in Sources */,
@@ -17607,6 +17655,7 @@
 				9FAAA333290BD0A20046FFCE /* KMHistoryFileCollectionViewItem.swift in Sources */,
 				BB7648ED29ECEEF400931039 /* KMAppearance.swift in Sources */,
 				8997010728F4082C009AF911 /* KMFromViewController.swift in Sources */,
+				9FF371DE2C69B93A005F9CC5 /* CAreaSettingWindowController.swift in Sources */,
 				BB4F7E8A2B0C55E70077EC8C /* KMFilterAuthorLabel.swift in Sources */,
 				AD5999372AD7D9C200412F8B /* KMPropertiesViewPopController.swift in Sources */,
 				AD3AAD392B0B7B1900DE5FE7 /* KMCompareToolbar.swift in Sources */,
@@ -17665,6 +17714,7 @@
 				BBFDFA9F2AF3814000E08AA2 /* KMTextHintWindowController.swift in Sources */,
 				BB5DA54B2BCFF4B300849E86 /* KMPageEditPopViewController.m in Sources */,
 				BBEC00D2295C33D600A26C98 /* KMCreateBatesController.swift in Sources */,
+				9FF371D62C69B8C9005F9CC5 /* CAreaMeasureInfoWindowController.swift in Sources */,
 				ADDF83362B391A5C00A81A4E /* CPDFListViewConfig.m in Sources */,
 				AD867FB429DFBB2700F00440 /* KMAnnotationOutlineSectionView.swift in Sources */,
 				BBEC00A9295BDECF00A26C98 /* KMHeaderFooterContentInfoView.swift in Sources */,
@@ -18163,6 +18213,7 @@
 				BBB14A60297929BD00936EDB /* KMRedactPageRangeWindowController.swift in Sources */,
 				ADA08A8B29F21A53009B2A7B /* KMPDFViewAnnotationOnceModeStore.swift in Sources */,
 				9FF0D05D2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift in Sources */,
+				9FF371E22C69D2F4005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift in Sources */,
 				BBBBB49A2B6F714000C7205E /* NSObject+OCExtensions.m in Sources */,
 				BB853C872AF8BC12009C20C1 /* KMAddPasswordOperationQueue.swift in Sources */,
 				89E4E7832967BF5A002DBA6F /* KMCustomizeStampViewController.m in Sources */,
@@ -18231,6 +18282,7 @@
 				BB853C6C2AF8782A009C20C1 /* KMRemoveWatermarkOperationQueue.swift in Sources */,
 				BBBC087F2B2A93DB009B237F /* KMToolbarMainItemView.swift in Sources */,
 				ADDF833C2B391A5C00A81A4E /* CPDFSignatureWidgetAnnotation+PDFListView.m in Sources */,
+				9FF371CC2C69B8AE005F9CC5 /* KMMeasureSideVC.swift in Sources */,
 				BB10FAEF2AFE233C00F18D65 /* KMLineInspector.swift in Sources */,
 				9FAAA32B290BD01D0046FFCE /* KMHomeHistoryFileViewController.swift in Sources */,
 				BB2C84802BAE732700AF6142 /* KMBotaLeftView.swift in Sources */,
@@ -18271,6 +18323,7 @@
 				BBF38A5B294F2B760086D025 /* KMWatermarkPositionView.swift in Sources */,
 				BBFBE74628DD7DB7008B2335 /* AppDelegate.swift in Sources */,
 				BBC4F9EB2AEB58290098A1A8 /* KMAlertWindowController.swift in Sources */,
+				9FF371E42C69D2F7005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift in Sources */,
 				BB6719EA2AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift in Sources */,
 				BB67EE2A2B54FFEF00573BF0 /* ASIDownloadCache.m in Sources */,
 				ADD1B6B829420B2300C3FFF7 /* KMPrintChooseView.swift in Sources */,
@@ -18353,6 +18406,7 @@
 				BB897225294B07960045787C /* KMWatermarkAdjectiveTopBarItemView.swift in Sources */,
 				BB031B702C47BB080099F7AD /* KMUserFbTypeItemView.swift in Sources */,
 				ADDEEA6F2AD3E16100EF675D /* KMSigntureViewItem.swift in Sources */,
+				9FF371DA2C69B933005F9CC5 /* CDistanceSettingWindowController.swift in Sources */,
 				BB14703F299DC0D200784A6A /* OIDEndSessionResponse.m in Sources */,
 				BB2F9AB42AFCC2F800F9DD93 /* KMProfileInfoWindowController.swift in Sources */,
 				BBFE6E802930EBD400142C01 /* KMCompressWindowController.swift in Sources */,
@@ -18524,6 +18578,7 @@
 				BB493F962B3E9805003E6175 /* KMBatchQuickActionManager.swift in Sources */,
 				ADAFD9EF2AE616B100F084BC /* FocusAwareSecureTextField.swift in Sources */,
 				BBB612AE2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift in Sources */,
+				9FF371CE2C69B8B3005F9CC5 /* CPerimeterMeasureInfoWindowController.swift in Sources */,
 				BBFE6E6E2930D9C600142C01 /* KMMergeSettingWindowController.swift in Sources */,
 				BB49ECE6293EF54800C82CA2 /* KMCustomPDFView.swift in Sources */,
 				BB6B43672A04919200E02B54 /* KMBaseViewController.swift in Sources */,
@@ -18577,6 +18632,7 @@
 				9F0CB49829683E1000007028 /* KMPropertiesPanelTextSubVC.swift in Sources */,
 				9F1FE4AC29406E4700E952CA /* CTBrowserWindow.m in Sources */,
 				9FF816DE2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift in Sources */,
+				9FF371CB2C69B857005F9CC5 /* CDistanceMeasureInfoWindowController.swift in Sources */,
 				BBFE14D02BFD7FC300176992 /* KMCouponDueWindowController.swift in Sources */,
 				AD0FA50329A8E36200EDEB50 /* KMLightMemberAlertView.swift in Sources */,
 				9F0CB53E2986571A00007028 /* KMDesignToken+Typography.swift in Sources */,
@@ -18632,6 +18688,7 @@
 				9F0CB48929683DC400007028 /* KMPropertiesPanelPresetColorSubVC.swift in Sources */,
 				BB99ACC4292DE22E0048AFD9 /* KMMergeViewController.swift in Sources */,
 				9F78EFC828F7E965001E66F4 /* KMHomeViewController+UI.swift in Sources */,
+				9FF371DF2C69B93B005F9CC5 /* CAreaSettingWindowController.swift in Sources */,
 				AD3AAD432B0B7B6C00DE5FE7 /* KMCompareManager.swift in Sources */,
 				9FBA0EFB2900188F001117AF /* KMFastToolCollectionView.swift in Sources */,
 				ADFA8F062B5666B6002595A4 /* KMAotuFlowExtension.swift in Sources */,
@@ -18694,6 +18751,7 @@
 				BB83639C2C199C20002CE43A /* KMBotaModel.swift in Sources */,
 				BBB612B32AF4C388000F3724 /* KMBatchOperateAddWatermarkViewController.swift in Sources */,
 				BB5726F22B20707D0089D283 /* CPDFMarkupAnnotation+PDFListView.swift in Sources */,
+				9FF371E52C69D2F8005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift in Sources */,
 				9F0CB49929683E1000007028 /* KMPropertiesPanelTextSubVC.swift in Sources */,
 				BB4BD9CE2909026500A66A65 /* KMRightSideViewController.swift in Sources */,
 				BBF7299D2B1961E800576AC5 /* KMAddWatermarkOprationQueue.swift in Sources */,
@@ -18997,6 +19055,7 @@
 				9F0CB537298656F900007028 /* KMDesignToken+BorderWidthLeft.swift in Sources */,
 				BB1BFF732AEA0AFE003EB179 /* KMBatchOperateLeftViewController.swift in Sources */,
 				ADDF83582B391A5C00A81A4E /* DSignatureCreateViewController.swift in Sources */,
+				9FF371DB2C69B934005F9CC5 /* CDistanceSettingWindowController.swift in Sources */,
 				9F1FE4E629406E4700E952CA /* GTMNSColor+Luminance.m in Sources */,
 				9F0CB523298656AA00007028 /* KMDesignToken+BorderRadiusBottomLeft.swift in Sources */,
 				BBB612AF2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift in Sources */,
@@ -19048,6 +19107,7 @@
 				9F1FE4BF29406E4700E952CA /* URLDropTarget.m in Sources */,
 				9FF816DF2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift in Sources */,
 				9F0CB52F298656D900007028 /* KMDesignToken+BorderWidthRight.swift in Sources */,
+				9FF371D72C69B8CA005F9CC5 /* CAreaMeasureInfoWindowController.swift in Sources */,
 				ADDEEA602AD39DC500EF675D /* KMSignatureManager.swift in Sources */,
 				BBBE208D2B21649100509C4E /* KMPDFEditWindowController.swift in Sources */,
 				BBA8B7B1293600D70097D183 /* KMPasswordInputWindow.swift in Sources */,
@@ -19099,6 +19159,7 @@
 				9F1FE4FE29406E4700E952CA /* CTTabStripController.m in Sources */,
 				BBA762D429D2D98D00844513 /* KMCommonDefine.swift in Sources */,
 				BB9599CD2B3184230062D346 /* KMRedactSelectPagesWindowController.swift in Sources */,
+				9FF371E32C69D2F4005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift in Sources */,
 				BB135C2C29B6CD9A00FD5965 /* KMTools.swift in Sources */,
 				AD53AF912BF1BC9200DCFFFC /* KMLoadingView.swift in Sources */,
 				BBEC00B9295C2C1600A26C98 /* KMBatesPropertyHomeController.swift in Sources */,
@@ -19106,6 +19167,7 @@
 				AD867FA829DFB77500F00440 /* KMAnnotationOutlineView.swift in Sources */,
 				9F705F8B291E576D005199AD /* KMTableView.swift in Sources */,
 				BB31DA642AFA3088006D63CB /* KMPreferenceController.swift in Sources */,
+				9FF371CF2C69B8B3005F9CC5 /* CPerimeterMeasureInfoWindowController.swift in Sources */,
 				BB6EA2992B70AF48000D4490 /* KMConvertCompareViewController.m in Sources */,
 				BB146FE6299DC0D100784A6A /* GTLRURITemplate.m in Sources */,
 				89E4E7842967BF5A002DBA6F /* KMCustomizeStampViewController.m in Sources */,
@@ -19197,6 +19259,7 @@
 				BBF62C6A2B033B34007B7E86 /* KMPDFEditExtractWindow.swift in Sources */,
 				9F1FE49529406E4700E952CA /* common.m in Sources */,
 				BB90E4F82AF3B71800B04B9F /* KMPDFWatermarkData.swift in Sources */,
+				9FF371CA2C69B857005F9CC5 /* CDistanceMeasureInfoWindowController.swift in Sources */,
 				ADC31FA82A0E0C1A00ED44A2 /* KMEditPropertyAlignmentView.swift in Sources */,
 				8997010028F40710009AF911 /* KMBookMarkViewController.swift in Sources */,
 				9F53D5512AD677A000CCF9D8 /* CPDFListViewConfig.swift in Sources */,
@@ -19651,6 +19714,7 @@
 				BB14702B299DC0D100784A6A /* OIDAuthorizationService.m in Sources */,
 				AD9527D52952D51A0039D2BC /* KMPrintPresenter.swift in Sources */,
 				ADD1B6D92946BDFD00C3FFF7 /* KMPrintChoosePageSizeView.swift in Sources */,
+				9FF371CD2C69B8AF005F9CC5 /* KMMeasureSideVC.swift in Sources */,
 				9FB220D92B0F4ED400A5B208 /* KMAnnotationSelectLinkViewController.swift in Sources */,
 				BBFA1CDC2B60DBF90053AD4A /* KMScreenShotMaskViewController.swift in Sources */,
 				BBFDFAA02AF3814000E08AA2 /* KMTextHintWindowController.swift in Sources */,

+ 15 - 48
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanwj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -273,6 +273,21 @@
                   endingLineNumber = "192"
                   offsetFromSymbolStart = "1032">
                </Location>
+               <Location
+                  uuid = "CEB455B3-A5F1-499D-BEE1-D537E31DCDE5 - 933de561e66dc2b2"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.CStampSignatureObject.init(signatureText: Swift.String, attributed: Swift.Dictionary&lt;__C.NSAttributedStringKey, Any&gt;) -&gt; PDF_Reader_Pro.CStampSignatureObject"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanwj/Git/Mac/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CStampSignatureObject.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "192"
+                  endingLineNumber = "192"
+                  offsetFromSymbolStart = "1256">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -356,54 +371,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "11E0ACA8-701F-42B9-954C-50AC702FB2D7"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/Common/Tools/KMTools.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "334"
-            endingLineNumber = "334"
-            landmarkName = "feekback()"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "11E0ACA8-701F-42B9-954C-50AC702FB2D7 - 41f3e2fd374839bd"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "static PDF_Master.KMTools.feekback() -&gt; ()"
-                  moduleName = "PDF Master"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanwj/Git/Mac/PDF%20Office/PDF%20Office/PDF%20Master/Class/Common/Tools/KMTools.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "334"
-                  endingLineNumber = "334"
-                  offsetFromSymbolStart = "1488">
-               </Location>
-               <Location
-                  uuid = "11E0ACA8-701F-42B9-954C-50AC702FB2D7 - 41f3e2fd374839bd"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "static PDF_Master.KMTools.feekback() -&gt; ()"
-                  moduleName = "PDF Master"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanwj/Git/Mac/PDF%20Office/PDF%20Office/PDF%20Master/Class/Common/Tools/KMTools.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "334"
-                  endingLineNumber = "334"
-                  offsetFromSymbolStart = "1492">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent