StampParam.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 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.PageRotation = PageRotation;
  40. stampTransfer.Rotation = Rotation;
  41. stampTransfer.SourceRect = SourceRect;
  42. stampTransfer.Clockwise = Clockwise;
  43. return true;
  44. }
  45. }
  46. }