featureSet
TypeScriptget featureSet(): FeatureSetSwift declarationvar featureSet: FeatureSet { get }The set of features used by this data model.
struct · iOS 26.0+ · SDK 27.1
struct PaperMarkupThe data model object for storing markup data created from a `PaperViewController`.
get featureSet(): FeatureSetSwift declarationvar featureSet: FeatureSet { get }The set of features used by this data model.
get subelements(): MarkupOrderedSetSwift declarationvar subelements: MarkupOrderedSet { get set }The subelements of the paper markup. Includes shapes, images, strokes, etc.
set subelements(value: MarkupOrderedSet)Swift declarationvar subelements: MarkupOrderedSet { get set }The subelements of the paper markup. Includes shapes, images, strokes, etc.
insertNewLine(configuration: ShapeConfiguration, start: { x: number; y: number }, end: { x: number; y: number }, lineStartMarker?: boolean, lineEndMarker?: boolean): voidSwift declarationmutating func insertNewLine(configuration: ShapeConfiguration, from start: CGPoint, to end: CGPoint, startMarker lineStartMarker: Bool = false, endMarker lineEndMarker: Bool = false)Add a line element on top of the paper. - Parameters: - configuration: The configuration of the line to insert. - start: The start position of the line. - end: The end position of the line. - lineStartMarker: True if the start of the line has a marker / arrow. - lineEndMarker: True if the end of the line has a marker / arrow.
insertNewImage(image: _CoreGraphics_CGImage, frame: { x: number; y: number; width: number; height: number }, rotation?: number): voidSwift declarationmutating func insertNewImage(_ image: CGImage, frame: CGRect, rotation: CGFloat = 0)Add a new image on top of the paper. - Parameters: - image: The image to add. - frame: The frame to add the image at. - rotation: The rotation in radians to add the element with.
insertNewShape(configuration: ShapeConfiguration, frame: { x: number; y: number; width: number; height: number }, rotation?: number): voidSwift declarationmutating func insertNewShape(configuration: ShapeConfiguration, frame: CGRect, rotation: CGFloat = 0)Add a new element on top of the paper. - Parameters: - configuration: The configuration of the shape to insert. - frame: The frame to add the element at. - rotation: The rotation in radians to add the element with.
get backgroundColor(): (_CoreGraphics_CGColor) | nullSwift declarationvar backgroundColor: CGColor? { get set }The background color of the paper. Default is `nil`, which uses a default color based on the current user interface style.
set backgroundColor(value: (_CoreGraphics_CGColor) | null)Swift declarationvar backgroundColor: CGColor? { get set }The background color of the paper. Default is `nil`, which uses a default color based on the current user interface style.
get indexableContent(): Promise<(string) | null>Swift declarationvar indexableContent: String? { get async }insertNewTextboxAttributedTextFrameRotation(attributedText: _Foundation_AttributedString, frame: { x: number; y: number; width: number; height: number }, rotation?: number): voidSwift declarationmutating func insertNewTextbox(attributedText: AttributedString, frame: CGRect, rotation: CGFloat = 0)Add a new text box on top of the paper. - Parameters: - attributedText: The text inside the element. - frame: The frame to add the element at. - rotation: The rotation in radians to add the element with.
insertNewTextboxAttributedTextFrameRotation68161(attributedText: _Foundation_NSAttributedString, frame: { x: number; y: number; width: number; height: number }, rotation?: number): voidSwift declarationmutating func insertNewTextbox(attributedText: NSAttributedString, frame: CGRect, rotation: CGFloat = 0)Add a new text box on top of the paper. - Parameters: - attributedText: The text inside the element. - frame: The frame to add the element at. - rotation: The rotation in radians to add the element with.
transformContent(transform: _CoreFoundation_CGAffineTransform): voidSwift declarationmutating func transformContent(_ transform: CGAffineTransform)Transforms the contents of this paper with the specified transform. - Parameters: - transform: The transform applied to the contents of this paper. Skew is ignored.
dataRepresentation(): Promise<ArrayBuffer>Swift declarationfunc dataRepresentation() async throws -> DataGenerate a serialized data representation of the data model. - Returns: A new serialized data containing a representation of the paper.
static initDataRepresentation(dataRepresentation: ArrayBuffer): PaperMarkupSwift declarationinit(dataRepresentation: Data) throwsInitializes and returns a new paper model from the specified data. - Parameter dataRepresentation: The data containing the serialized paper model.
get contentsRenderFrame(): { x: number; y: number; width: number; height: number }Swift declarationvar contentsRenderFrame: CGRect { get }The frame that tightly fits the rendered contents on the paper. This frame includes padding around `contentsFrame` to ensure it includes all the rendered aspects of the content. For example, this frame will include the strokes, and shadows of any contents.
removeContentUnsupported(featureSet: FeatureSet): voidSwift declarationmutating func removeContentUnsupported(by featureSet: FeatureSet)Remove all contents that is not supported by the provided feature set. - Parameter featureSet: The feature set to limit this data model to. After calling this method `featureSet.isSubset(of: features)` will be `true`.
get id(): MarkupID<PaperMarkup>Swift declarationvar id: MarkupID<PaperMarkup> { get set }The unique identifier of the markup.
set id(value: MarkupID<PaperMarkup>)Swift declarationvar id: MarkupID<PaperMarkup> { get set }The unique identifier of the markup.
draw(context: _CoreGraphics_CGContext, frame: { x: number; y: number; width: number; height: number }, options?: RenderingOptions): Promise<void>Swift declarationnonisolated(nonsending) func draw(in context: CGContext, frame: CGRect, options: RenderingOptions = RenderingOptions()) asyncDraws the entire paper contents in the specified rectangle. - Parameters: - context: The graphics context to render into. - frame: The rectangle (in the coordinate system of the graphics context) in which to draw the paper. - options: The rendering options. To draw a cropped portion of a paper data model, modify the `bounds` of the paper being drawn.
appendContentsOf(drawing: _PencilKit_PKDrawing): voidSwift declarationmutating func append(contentsOf drawing: PKDrawing)Adds the contents of a PencilKit drawing on top of this paper. - Parameters: - drawing: The drawing whose contents is added on top of this paper.
appendContentsOf77581(other: PaperMarkup): voidSwift declarationmutating func append(contentsOf other: PaperMarkup)Adds the contents of a data model on top of this paper. - Parameters: - other: The data model whose contents is added on top of this paper.
static initBounds(bounds: { x: number; y: number; width: number; height: number }): PaperMarkupSwift declarationinit(bounds: CGRect)Initializes and returns a new paper model with the specified bounds. - Parameters: - bounds: The bounds of the markup container.
get bounds(): { x: number; y: number; width: number; height: number }Swift declarationvar bounds: CGRect { get set }The bounds of the paper. The contents of the paper are positioned relative to its bounds.
set bounds(value: { x: number; y: number; width: number; height: number })Swift declarationvar bounds: CGRect { get set }The bounds of the paper. The contents of the paper are positioned relative to its bounds.
No declarations were skipped in this snapshot.