StampParam.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. public override bool CopyTo(AnnotParam transfer)
  19. {
  20. StampParam stampTransfer = transfer as StampParam;
  21. if (stampTransfer == null)
  22. {
  23. return false;
  24. }
  25. if (!base.CopyTo(stampTransfer))
  26. {
  27. return false;
  28. }
  29. stampTransfer.StampText = StampText;
  30. stampTransfer.DateText = DateText;
  31. stampTransfer.StampType = StampType;
  32. stampTransfer.TextStampColor = TextStampColor;
  33. stampTransfer.TextStampShape = TextStampShape;
  34. stampTransfer.ImageStream = ImageStream;
  35. stampTransfer.Rotation = Rotation;
  36. return true;
  37. }
  38. }
  39. }