PTCreateToolBase
@interface PTCreateToolBase : PTTool {
int _pageNumber;
double _thickness;
}
An abstract class that many of the annotation-creating tools derive from.
-
Undocumented
Declaration
Objective-C
int _pageNumber -
Undocumented
Declaration
Objective-C
double _thickness -
The thickness of the annotation’s stroke.
Declaration
Objective-C
@property (nonatomic, readonly) double thickness;Swift
var thickness: Double { get } -
The line ending style of the annotation’s start point.
Declaration
Objective-C
@property (nonatomic, readonly) PTEndingStyle startStyle;Swift
var startStyle: PTEndingStyle { get } -
The line ending style of the annotation’s end point.
Declaration
Objective-C
@property (nonatomic, readonly) PTEndingStyle endStyle;Swift
var endStyle: PTEndingStyle { get } -
The pageNumber that this annotation will be created on.
Declaration
Objective-C
@property (nonatomic, readonly) int pageNumber;Swift
var pageNumber: Int32 { get } -
The rectangle defined by the points when the user first touched and his/her finger has moved to.
Declaration
Objective-C
@property (nonatomic, readonly) CGRect drawArea;Swift
var drawArea: CGRect { get } -
The point where the user’s finger first made contact with the
PTPDFViewCtrl.Declaration
Objective-C
@property (nonatomic) CGPoint startPoint;Swift
var startPoint: CGPoint { get set } -
The point where the user’s finger first made contact with the
PTPDFViewCtrl.Declaration
Objective-C
@property (nonatomic) CGPoint endPoint;Swift
var endPoint: CGPoint { get set } -
Whether this tool requires an editing interface (toolbar) to operate.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL requiresEditSupport;Swift
var requiresEditSupport: Bool { get } -
Sets up the drawing context with correct properties such as stroke and fill thickness and color, etc.
Declaration
Objective-C
- (double)setupContext:(nonnull CGContextRef)currentContext;Swift
func setupContext(_ currentContext: CGContext) -> DoubleParameters
currentContextThe current context, typically that returned by
UIGraphicsGetCurrentContext(). -
Saves new annotation default properties via
ColorDefaults.Declaration
Objective-C
- (void)setPropertiesFromAnnotation:(nonnull PTAnnot *)annotation;Swift
func setPropertiesFromAnnotation(_ annotation: PTAnnot)Parameters
annotationThe annotation with properties that will be used when the next annotation of this type is created.
-
Restricts the input point to the PDFPage
pageNumber.Declaration
Objective-C
- (CGPoint)boundToPageScreenPoint:(CGPoint)touchPoint withThicknessCorrection:(CGFloat)thickness;Swift
func bound(toPageScreenPoint touchPoint: CGPoint, withThicknessCorrection thickness: CGFloat) -> CGPointParameters
touchPointAn input point, in screen (PTPDFViewCtrl) coordinates.
thicknessA thickness value that imposes a margin around the edge of the page.
-
Restricts the input point to the PDFPage
pageNumber.Declaration
Objective-C
- (CGPoint)boundToPageScreenPoint:(CGPoint)touchPoint withPaddingLeft:(CGFloat)left right:(CGFloat)right bottom:(CGFloat)bottom top:(CGFloat)top;Swift
func bound(toPageScreenPoint touchPoint: CGPoint, withPaddingLeft left: CGFloat, right: CGFloat, bottom: CGFloat, top: CGFloat) -> CGPointParameters
touchPointAn input point, in screen (PTPDFViewCtrl) coordinates.
leftA thickness value that imposes a margin at the left edge of the page.
rightA thickness value that imposes a margin at the right edge of the page.
bottomA thickness value that imposes a margin at the bottom edge of the page.
topA thickness value that imposes a margin at the left top of the page.
PTCreateToolBase Class Reference