|
@@ -152,6 +152,12 @@ namespace ComPDFKit.Controls.PDFControl
|
|
|
SharpPath.StrokeThickness = freehandData.Thickness;
|
|
|
}
|
|
|
|
|
|
+ public void DrawCloudPreview()
|
|
|
+ {
|
|
|
+ CollapsedAll();
|
|
|
+ gdPolygon.Visibility = Visibility.Visible;
|
|
|
+ }
|
|
|
+
|
|
|
public void DrawNotePreview(CPDFAnnotationData annotationData)
|
|
|
{
|
|
|
CollapsedAll();
|
|
@@ -182,26 +188,6 @@ namespace ComPDFKit.Controls.PDFControl
|
|
|
FreeText.Opacity = freeTextData.Opacity;
|
|
|
}
|
|
|
|
|
|
- public void DrawPolygonPreview(CPDFAnnotationData polygonData)
|
|
|
- {
|
|
|
- CollapsedAll();
|
|
|
- GdPolygon.Visibility = Visibility.Visible;
|
|
|
- Point startPoint = new Point(20, 70);
|
|
|
- Point endPoint = new Point(200, 70);
|
|
|
-
|
|
|
- Path cloudPath = DrawCloudLine(
|
|
|
- startPoint, // 起始点
|
|
|
- endPoint, // 终点
|
|
|
- 5, // 半径
|
|
|
- 120, // 角度
|
|
|
- Brushes.Blue, // 颜色
|
|
|
- 2.0, // 线宽
|
|
|
- false
|
|
|
- );
|
|
|
-
|
|
|
- GdPolygon.Children.Add(cloudPath);
|
|
|
- }
|
|
|
-
|
|
|
private Path DrawCloudLine(Point startPoint, Point endPoint, double radius, double angle, Brush strokeColor, double strokeThickness, bool isUpward)
|
|
|
{
|
|
|
double lineLength = Math.Sqrt(Math.Pow(endPoint.X - startPoint.X, 2) + Math.Pow(endPoint.Y - startPoint.Y, 2));
|