CPDFLineAnnotation.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // CPDFLineAnnotation.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. /**
  14. * The following constants specify the available line ending styles.
  15. */
  16. typedef NS_ENUM(NSInteger, CPDFLineStyle) {
  17. /** No line ending. */
  18. CPDFLineStyleNone = 0,
  19. /** An open arrowhead line ending, composed from two short lines meeting in an acute angle at the line end. */
  20. CPDFLineStyleOpenArrow = 1,
  21. /** A closed arrowhead line ending, consisting of a triangle with the acute vertex at the line end and filled with the annotation’s interior color, if any. */
  22. CPDFLineStyleClosedArrow = 2,
  23. /** A square line ending filled with the annotation’s interior color, if any. */
  24. CPDFLineStyleSquare = 3,
  25. /** A circular line ending filled with the annotation’s interior color, if any. */
  26. CPDFLineStyleCircle = 4,
  27. /** A diamond-shaped line ending filled with the annotation’s interior color, if any. */
  28. CPDFLineStyleDiamond = 5
  29. };
  30. /**
  31. * A PDFAnnotationLine object displays a single line on a page.
  32. *
  33. * @discussion The setBorderWidth: method of the CPDFAnnotation class determines the stroke thickness.
  34. * The setColor: method of the CPDFAnnotation class determines the stroke color.
  35. */
  36. @interface CPDFLineAnnotation : CPDFAnnotation
  37. /**
  38. * Method to get / set the starting point for the line, in page space.
  39. *
  40. * @discussion Page space is a coordinate system with the origin at the lower-left corner of the current page.
  41. */
  42. @property (nonatomic,assign) CGPoint startPoint;
  43. /**
  44. * Method to get / set the ending point for the line in page space.
  45. *
  46. * @discussion Page space is a coordinate system with the origin at the lower-left corner of the current page.
  47. */
  48. @property (nonatomic,assign) CGPoint endPoint;
  49. /**
  50. * Method to get / set the line ending style for the starting point of the line.
  51. *
  52. * @see CPDFLineStyle
  53. */
  54. @property (nonatomic,assign) CPDFLineStyle startLineStyle;
  55. /**
  56. * Method to get / set the line ending style for the ending point of the line.
  57. *
  58. * @see CPDFLineStyle
  59. */
  60. @property (nonatomic,assign) CPDFLineStyle endLineStyle;
  61. /**
  62. * Method to get / set the opacity used to fill the ornament at the ends of the line.
  63. *
  64. * @discussion The ornament at the end of a line is optional (for more information, see the Adobe PDF Specification 1.4).
  65. */
  66. @property (nonatomic,assign) CGFloat interiorOpacity;
  67. /**
  68. * Method to get / set the color used to fill the ornament at the ends of the line.
  69. *
  70. * @discussion The ornament at the end of a line is optional (for more information, see the Adobe PDF Specification 1.4).
  71. */
  72. @property (nonatomic,retain) CPDFKitPlatformColor *interiorColor;
  73. @end