PTFreeHandCreate


@interface PTFreeHandCreate : PTCreateToolBase

Creates FreeHand (Ink) annotations.

  • Removes the most recently added stroke.

    Declaration

    Objective-C

    - (void)undoStroke;

    Swift

    func undoStroke()
  • Restores a stroke removed with undoStroke.

    Declaration

    Objective-C

    - (void)redoStroke;

    Swift

    func redoStroke()
  • Declaration

    Objective-C

    - (BOOL)canUndoStroke;

    Swift

    func canUndoStroke() -> Bool

    Return Value

    Returns YES if there are strikes than can be removed via undoStroke.

  • Declaration

    Objective-C

    - (BOOL)canRedoStroke;

    Swift

    func canRedoStroke() -> Bool

    Return Value

    Returns YES if there are strikes than can be restoried via redoStroke.

  • Creates a freehand (ink) annotation from the tools current strokes.

    Declaration

    Objective-C

    - (nonnull PTInk *)createAnnotation;

    Swift

    func createAnnotation() -> PTInk
  • Adds the freehand annotation to the document. Used when multistrokeMode is set to YES.

    Declaration

    Objective-C

    - (void)commitAnnotation;

    Swift

    func commitAnnotation()
  • Used to determine if there is a point at the specified location before the annotation has been added to the PDF

    Declaration

    Objective-C

    - (BOOL)inkPointPresentAtScreenPoint:(CGPoint)screenPoint
                                  within:(CGFloat)threshold;

    Swift

    func inkPointPresent(atScreenPoint screenPoint: CGPoint, within threshold: CGFloat) -> Bool

    Parameters

    screenPoint

    The point which is to be tested for, in screen coordinates.

    threshold

    The tolerance of the test

    Return Value

    true if there is a point within the specified threshold; false otherwise.

  • Set to YES if the annotation should include multiple strokes. Call commitAnnotation push the annotation back into the PDF.

    Declaration

    Objective-C

    @property (nonatomic) BOOL multistrokeMode;

    Swift

    var multistrokeMode: Bool { get set }
  • Set to YES if the annotation was started by drawing with a stylus.

    Declaration

    Objective-C

    @property (nonatomic) BOOL pencilMode;

    Swift

    var pencilMode: Bool { get set }
  • Whether this tool requires an editing interface (toolbar) to operate.

    The default value of this property is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL requiresEditSupport;

    Swift

    var requiresEditSupport: Bool { get set }
  • An object that conforms to the PTFreeHandCreateDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTFreeHandCreateDelegate> delegate;

    Swift

    weak var delegate: (any PTFreeHandCreateDelegate)? { get set }