CPDFPage+Protected.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // CPDFPage+Protected.h
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2023 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/CPDFPage.h>
  13. @interface CPDFPage (Protected)
  14. extern NSNotificationName const CPDFPageEditingDidChangedNotification;
  15. #pragma mark - Rendering
  16. - (void)transformContext:(CGContextRef)context forBox:(CPDFDisplayBox)box;
  17. - (void)drawWithBox:(CPDFDisplayBox)box toContext:(CGContextRef)context;
  18. - (void)drawEditWithBox:(CPDFDisplayBox)box toContext:(CGContextRef)context;
  19. #pragma mark - Selections
  20. // Given a rect in page-space, returns a selection representing enclosed text on page.
  21. - (CPDFSelection *)selectionForRect:(CGRect)rect;
  22. // Given a point in page-space, returns a selection representing a whole word at that point. May return NULL if no
  23. // character (and by extension no word) under point. If data dectors are enabled (-[PDFView enableDataDetectors]),
  24. // this return the smart-selection for the content at the given point.
  25. - (CPDFSelection *)selectionForWordAtPoint:(CGPoint)point;
  26. // Given a point in page-space, returns a selection representing a whole line at that point. May return NULL if no
  27. // character (and by extension no line) under point.
  28. - (CPDFSelection *)selectionForLineAtPoint:(CGPoint)point;
  29. // Returns a selection representing text between startPt and endPt. Points are sorted first top to bottom, left to right.
  30. - (CPDFSelection *)selectionFromPoint:(CGPoint)startPoint toPoint:(CGPoint)endPoint;
  31. @end