StampParam.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using ComPDFKit.PDFAnnotation;
  2. using System.IO;
  3. namespace ComPDFKit.Tool
  4. {
  5. public class StampParam:AnnotParam
  6. {
  7. public StampParam ()
  8. {
  9. CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_STAMP;
  10. }
  11. public string StampText { get; set; } = string.Empty;
  12. public string DateText { get; set; }= string.Empty;
  13. public C_STAMP_TYPE StampType { get; set; }
  14. public C_TEXTSTAMP_SHAPE TextStampShape { get; set; }
  15. public C_TEXTSTAMP_COLOR TextStampColor { get; set; }
  16. public MemoryStream ImageStream { get; set; }
  17. public int Rotation { get; set; }
  18. //暂时做旋转用
  19. //后续底层更新旋转角度支持后废除
  20. //-1 逆时针 0 未动 1顺时针
  21. public int Clockwise { get; set; }
  22. public override bool CopyTo(AnnotParam transfer)
  23. {
  24. StampParam stampTransfer = transfer as StampParam;
  25. if (stampTransfer == null)
  26. {
  27. return false;
  28. }
  29. if (!base.CopyTo(stampTransfer))
  30. {
  31. return false;
  32. }
  33. stampTransfer.StampText = StampText;
  34. stampTransfer.DateText = DateText;
  35. stampTransfer.StampType = StampType;
  36. stampTransfer.TextStampColor = TextStampColor;
  37. stampTransfer.TextStampShape = TextStampShape;
  38. stampTransfer.ImageStream = ImageStream;
  39. stampTransfer.Rotation = Rotation;
  40. stampTransfer.Clockwise = Clockwise;
  41. return true;
  42. }
  43. }
  44. }