StampParam.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using ComPDFKit.Import;
  2. using ComPDFKit.PDFAnnotation;
  3. using System.IO;
  4. namespace ComPDFKit.Tool
  5. {
  6. public class StampParam:AnnotParam
  7. {
  8. public StampParam ()
  9. {
  10. CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_STAMP;
  11. }
  12. public string StampText { get; set; } = string.Empty;
  13. public string DateText { get; set; }= string.Empty;
  14. public C_STAMP_TYPE StampType { get; set; }
  15. public C_TEXTSTAMP_SHAPE TextStampShape { get; set; }
  16. public C_TEXTSTAMP_COLOR TextStampColor { get; set; }
  17. public MemoryStream ImageStream { get; set; }
  18. public int PageRotation { get; set; }
  19. public int Rotation { get; set; }
  20. public CRect SourceRect { get; set; }
  21. public override bool CopyTo(AnnotParam transfer)
  22. {
  23. StampParam stampTransfer = transfer as StampParam;
  24. if (stampTransfer == null)
  25. {
  26. return false;
  27. }
  28. if (!base.CopyTo(stampTransfer))
  29. {
  30. return false;
  31. }
  32. stampTransfer.StampText = StampText;
  33. stampTransfer.DateText = DateText;
  34. stampTransfer.StampType = StampType;
  35. stampTransfer.TextStampColor = TextStampColor;
  36. stampTransfer.TextStampShape = TextStampShape;
  37. stampTransfer.ImageStream = ImageStream;
  38. stampTransfer.PageRotation = PageRotation;
  39. stampTransfer.Rotation = Rotation;
  40. stampTransfer.SourceRect = SourceRect;
  41. return true;
  42. }
  43. }
  44. }