Bläddra i källkod

签名-调整文字签名显示位置

ZhouJieSheng 1 år sedan
förälder
incheckning
d7e0eacc32
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      PDF Office/ViewModels/Dialog/SignatureCreateDialogViewModel.cs

+ 3 - 3
PDF Office/ViewModels/Dialog/SignatureCreateDialogViewModel.cs

@@ -454,14 +454,14 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
 
             DrawingVisual drawingVisual = new DrawingVisual();
             DrawingContext dc = drawingVisual.RenderOpen();
-            dc.DrawText(formatText,new System.Windows.Point(0,0));
+            dc.DrawText(formatText,new System.Windows.Point(2,10));
             dc.Close();
 
 
             Rect x = drawingVisual.ContentBounds;
-            Rect DrawRect = new Rect(0, 0, x.Width + 2, x.Height + 10);
+            Rect DrawRect = new Rect(0, 0, x.Width + 2, x.Height +10);
 
-            RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap((int)DrawRect.Width+2, (int)DrawRect.Height+2, 96F, 96F, PixelFormats.Pbgra32);
+            RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap((int)DrawRect.Width+2, (int)DrawRect.Height+10, 96F, 96F, PixelFormats.Pbgra32);
             renderTargetBitmap.Render(drawingVisual);
 
             MemoryStream stream = new MemoryStream();