Pārlūkot izejas kodu

【文字注释】- 示例图片

liujiajie 6 mēneši atpakaļ
vecāks
revīzija
81d72cfd6e

+ 3 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFFreeTextAnnotation+PDFListView.swift

@@ -135,6 +135,9 @@ import Foundation
         
         let size = string.size(withAttributes: attributes)
         self.img = nil
+        if string.length < 1 || size.width < 0.01{
+            return nil
+        }
         self.img = NSImage(size: size)
         self.img?.lockFocus()
         NSGraphicsContext.current?.imageInterpolation = .high