CPDFMarkupAnnotation.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // CPDFAnnotationMarkup.h
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. #import <ComPDFKit/CPDFAnnotation.h>
  13. typedef NS_ENUM(NSInteger, CPDFMarkupType) {
  14. CPDFMarkupTypeHighlight = 0,
  15. CPDFMarkupTypeStrikeOut = 1,
  16. CPDFMarkupTypeUnderline = 2,
  17. CPDFMarkupTypeSquiggly = 3
  18. };
  19. /**
  20. * A CPDFMarkupAnnotation object appears as highlighting, underlining, strikethrough, or a squiggly style applied to the text of a document.
  21. */
  22. @interface CPDFMarkupAnnotation : CPDFAnnotation
  23. /**
  24. * Initializes CPDFMarkupAnnotation object.
  25. *
  26. * @see CPDFMarkupType
  27. */
  28. - (instancetype)initWithDocument:(CPDFDocument *)document markupType:(CPDFMarkupType)markupType;
  29. /**
  30. * Method to get / set the array of quadrilateral points defining the bounds of the markup.
  31. *
  32. * @discussion Array of (n * 4) NSPoints defining n quadrilaterals in page space where n is the number of quad points.
  33. * The points for each quad are ordered in a 'Z' pattern. That is, the first point should represent the upper left point representing the start of the marked-up text,
  34. * the next point will be the upper right, the third point will represent the lower left of the text and the last point the lower right.
  35. * Page space is a coordinate system with the origin at the lower-left corner of the current page.
  36. */
  37. @property (nonatomic,retain) NSArray *quadrilateralPoints;
  38. /**
  39. * Gets the markup style.
  40. *
  41. * @see CPDFMarkupType
  42. */
  43. - (CPDFMarkupType)markupType;
  44. - (NSString *)markupText;
  45. - (void)setMarkupText:(NSString *)text;
  46. - (BOOL)popup;
  47. - (void)createPopup;
  48. - (void)removePopup;
  49. @end