|
@@ -115,7 +115,7 @@ namespace ComPDFKit.Tool
|
|
|
/// <summary>
|
|
|
/// Save Current Crop Box
|
|
|
/// </summary>
|
|
|
- private Rect ClipRect = new Rect();
|
|
|
+ private Thickness ClipThickness = new Thickness(0,0,0,0);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Input variable string
|
|
@@ -191,9 +191,18 @@ namespace ComPDFKit.Tool
|
|
|
/// Restore Crop Box
|
|
|
/// </summary>
|
|
|
/// <param name="rect"></param>
|
|
|
- public void SetClipRect(Rect rect = new Rect())
|
|
|
+ public void SetClipThickness(Thickness rect = new Thickness())
|
|
|
{
|
|
|
- this.ClipRect = rect;
|
|
|
+ this.ClipThickness = rect;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// Restore Crop Box
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="rect"></param>
|
|
|
+ public Thickness GetClipThickness()
|
|
|
+ {
|
|
|
+ return this.ClipThickness ;
|
|
|
}
|
|
|
|
|
|
private void InsertTextEditView()
|
|
@@ -282,10 +291,10 @@ namespace ComPDFKit.Tool
|
|
|
if (selectedEditAreaIndex == cropIndex)
|
|
|
{
|
|
|
item.Key.SetCurrentDrawPointType(DrawPointType.Crop);
|
|
|
- if (ClipRect.Width != 0)
|
|
|
+ if (!ClipThickness.Equals(new Thickness(0, 0, 0, 0)))
|
|
|
{
|
|
|
//Restore Crop Box
|
|
|
- item.Key.SetClipRect(ClipRect);
|
|
|
+ item.Key.SetClipThickness(ClipThickness);
|
|
|
}
|
|
|
ignorePoints.Add(PointControlType.Body);
|
|
|
}
|
|
@@ -515,12 +524,12 @@ namespace ComPDFKit.Tool
|
|
|
if (selectedEditAreaIndex == cropIndex)
|
|
|
{
|
|
|
//Refresh ClipRect
|
|
|
- ClipRect = selectedRect.GetClipRect();
|
|
|
+ ClipThickness = selectedRect.GetClipThickness();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//reduction
|
|
|
- ClipRect = new Rect();
|
|
|
+ ClipThickness = new Thickness(0,0,0,0);
|
|
|
}
|
|
|
|
|
|
selectedRect.Draw();
|