CircleParam.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using ComPDFKit.PDFAnnotation;
  2. using System.Windows.Media;
  3. namespace ComPDFKit.Tool
  4. {
  5. public class CircleParam : AnnotParam
  6. {
  7. public CircleParam()
  8. {
  9. CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_CIRCLE;
  10. }
  11. public byte[] LineColor { get; set; }
  12. public byte[] BgColor { get; set; }
  13. public bool HasBgColor { get; set; }
  14. public double LineWidth { get; set; }
  15. public float[] LineDash { get; set; }
  16. public C_BORDER_STYLE BorderStyle { get; set; }
  17. public override bool CopyTo(AnnotParam transfer)
  18. {
  19. CircleParam circleTransfer = transfer as CircleParam;
  20. if (circleTransfer == null)
  21. {
  22. return false;
  23. }
  24. if (!base.CopyTo(circleTransfer))
  25. {
  26. return false;
  27. }
  28. if (LineColor != null)
  29. {
  30. circleTransfer.LineColor = (byte[])LineColor.Clone();
  31. }
  32. if (BgColor != null)
  33. {
  34. circleTransfer.BgColor = (byte[])BgColor.Clone();
  35. }
  36. if (LineDash != null)
  37. {
  38. circleTransfer.LineDash = (float[])LineDash.Clone();
  39. }
  40. circleTransfer.LineWidth = LineWidth;
  41. circleTransfer.HasBgColor = HasBgColor;
  42. circleTransfer.BorderStyle = BorderStyle;
  43. return true;
  44. }
  45. }
  46. }