Quellcode durchsuchen

ComPDFKit.Tool(pdftech) - 修改页面裁剪后双击弹出编辑框异常问题

liyuxuan vor 8 Monaten
Ursprung
Commit
3124842222
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      Demo/Examples/ComPDFKit.Tool/CPDFViewerTool.Annot.cs

+ 2 - 2
Demo/Examples/ComPDFKit.Tool/CPDFViewerTool.Annot.cs

@@ -673,8 +673,8 @@ namespace ComPDFKit.Tool
                     double PDFWidth = PDFViewer.GetCurrentRenderPageForIndex(annotData.PageIndex).PaintRect.Width;
                     double PDFHeight = PDFViewer.GetCurrentRenderPageForIndex(annotData.PageIndex).PaintRect.Height;
 
-                    textBorder.MaxWidth = (PDFWidth - annotData.VisualRect.Left - annotData.CropLeft);
-                    textBorder.MaxHeight = (PDFHeight - annotData.VisualRect.Top - annotData.CropTop);
+                    textBorder.MaxWidth = Math.Max(Width,(PDFWidth - annotData.VisualRect.Left - annotData.CropLeft));
+                    textBorder.MaxHeight =Math.Max(Height,(PDFHeight - annotData.VisualRect.Top - annotData.CropTop));
                     CTextAttribute textAttribute = textWidget.FreeTextDa;
                     byte transparency = textWidget.GetTransparency();
                     textui.FontSize = DpiHelper.PDFNumToStandardNum(textAttribute.FontSize * annotData.CurrentZoom);