1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // CPDFPage+Protected.h
- // ComPDFKit
- //
- // Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
- //
- // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
- // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
- // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
- // This notice may not be removed from this file.
- //
- #import <ComPDFKit/CPDFPage.h>
- @interface CPDFPage (Protected)
- extern NSNotificationName const CPDFPageEditingDidChangedNotification;
- #pragma mark - Rendering
- - (void)transformContext:(CGContextRef)context forBox:(CPDFDisplayBox)box;
- - (void)drawWithBox:(CPDFDisplayBox)box toContext:(CGContextRef)context;
- - (void)drawEditWithBox:(CPDFDisplayBox)box toContext:(CGContextRef)context;
- #pragma mark - Selections
- // Given a rect in page-space, returns a selection representing enclosed text on page.
- - (CPDFSelection *)selectionForRect:(CGRect)rect;
- // Given a point in page-space, returns a selection representing a whole word at that point. May return NULL if no
- // character (and by extension no word) under point. If data dectors are enabled (-[PDFView enableDataDetectors]),
- // this return the smart-selection for the content at the given point.
- - (CPDFSelection *)selectionForWordAtPoint:(CGPoint)point;
- // Given a point in page-space, returns a selection representing a whole line at that point. May return NULL if no
- // character (and by extension no line) under point.
- - (CPDFSelection *)selectionForLineAtPoint:(CGPoint)point;
- // Returns a selection representing text between startPt and endPt. Points are sorted first top to bottom, left to right.
- - (CPDFSelection *)selectionFromPoint:(CGPoint)startPoint toPoint:(CGPoint)endPoint;
- @end
|