One Logo Pool Ball
PaperKit · IOS API REFERENCE

LoupeMarkup

struct · iOS 27.0+ · SDK 27.1

struct LoupeMarkup

A loupe magnifier that magnifies the content below the loupe. The loupe magnifies the content beneath its frame within the parent markup. The loupe centers the magnified region on the center of its frame.

Members (19)

get · iOS 27.0+

featureSet

TypeScript
get featureSet(): FeatureSet
Swift declaration
var featureSet: FeatureSet { get }

The set of features used by this markup.

get · iOS 27.0+

renderFrame

TypeScript
get renderFrame(): { x: number; y: number; width: number; height: number }
Swift declaration
var renderFrame: CGRect { get }

The unrotated frame that tightly fits the rendered contents of the element. This frame includes padding around `frame` to ensure it includes all the rendered aspects of the content. For example, this frame will include the strokes, and shadows of any contents.

get · iOS 27.0+

strokeColor

TypeScript
get strokeColor(): (_CoreGraphics_CGColor) | null
Swift declaration
var strokeColor: CGColor? { get set }

The color of the loupe's border. Set this to `nil` for no border.

set · iOS 27.0+

strokeColor

TypeScript
set strokeColor(value: (_CoreGraphics_CGColor) | null)
Swift declaration
var strokeColor: CGColor? { get set }

The color of the loupe's border. Set this to `nil` for no border.

get · iOS 27.0+

magnification

TypeScript
get magnification(): number
Swift declaration
var magnification: CGFloat { get set }

The magnification level applied to the content displayed within the loupe.

set · iOS 27.0+

magnification

TypeScript
set magnification(value: number)
Swift declaration
var magnification: CGFloat { get set }

The magnification level applied to the content displayed within the loupe.

get · iOS 27.0+

allowedInteractions

TypeScript
get allowedInteractions(): MarkupInteractions
Swift declaration
var allowedInteractions: MarkupInteractions { get set }

Interactions that people can perform on this markup. Use this to configure how people can interact with the markup, such as preventing resizing, rotation, or deletion. The default is `.all`, which allows all interactions. Set to `.readOnly` to prevent all modifications.

set · iOS 27.0+

allowedInteractions

TypeScript
set allowedInteractions(value: MarkupInteractions)
Swift declaration
var allowedInteractions: MarkupInteractions { get set }

Interactions that people can perform on this markup. Use this to configure how people can interact with the markup, such as preventing resizing, rotation, or deletion. The default is `.all`, which allows all interactions. Set to `.readOnly` to prevent all modifications.

method · iOS 27.0+

removeContentUnsupported

TypeScript
removeContentUnsupported(featureSet: FeatureSet): boolean
Swift declaration
mutating func removeContentUnsupported(by featureSet: FeatureSet) -> Bool

Removes all content not supported by the provided feature set. - Parameter featureSet: The feature set to limit this markup to. - Returns: True if this was successful and the feature set is now supported. If the returned value is `true` then `self.featureSet.isSubset(of: featureSet)` will be `true`.

get · iOS 27.0+

id

TypeScript
get id(): MarkupID<LoupeMarkup>
Swift declaration
var id: MarkupID<LoupeMarkup>

Stable unique identity of the markup.

set · iOS 27.0+

id

TypeScript
set id(value: MarkupID<LoupeMarkup>)
Swift declaration
var id: MarkupID<LoupeMarkup>

Stable unique identity of the markup.

init · iOS 27.0+

init

TypeScript
static init(frame: { x: number; y: number; width: number; height: number }, magnification?: number, strokeColor?: (_CoreGraphics_CGColor) | null, lineWidth?: number, allowedInteractions?: MarkupInteractions, id?: MarkupID<LoupeMarkup>): LoupeMarkup
Swift declaration
init(frame: CGRect, magnification: CGFloat = 1.5, strokeColor: CGColor? = nil, lineWidth: CGFloat = 2.0, allowedInteractions: MarkupInteractions = .all, id: MarkupID<LoupeMarkup> = MarkupID())

Initializes and returns a new loupe markup from the specified parameters. - Parameters: - frame: The frame of the shape. - magnification: The magnification level used to zoom the content below the loupe. Defaults to `1.5`. - strokeColor: The color of the loupe's border. Defaults to `nil` for no border. - lineWidth: The width of the loupe's border in points. Defaults to `2.0`. - allowedInteractions: The flags controlling the interactions people can perform. Defaults to `.all`. - id: The identity of the loupe. Defaults to a unique id.

get · iOS 27.0+

frame

TypeScript
get frame(): { x: number; y: number; width: number; height: number }
Swift declaration
var frame: CGRect { get set }

The element's unrotated frame. Together with `rotation` this defines the element's position in its parent. This won't necessarily contain all the contents of an element, rotation and styling may cause the element to extend beyond this frame. Use `renderFrame` for an unrotated frame that contains the entire element.

set · iOS 27.0+

frame

TypeScript
set frame(value: { x: number; y: number; width: number; height: number })
Swift declaration
var frame: CGRect { get set }

The element's unrotated frame. Together with `rotation` this defines the element's position in its parent. This won't necessarily contain all the contents of an element, rotation and styling may cause the element to extend beyond this frame. Use `renderFrame` for an unrotated frame that contains the entire element.

get · iOS 27.0+

rotation

TypeScript
get rotation(): number
Swift declaration
var rotation: CGFloat { get set }

The element's rotation around the center of its frame. Together with `frame` this defines the element's position in its parent.

set · iOS 27.0+

rotation

TypeScript
set rotation(value: number)
Swift declaration
var rotation: CGFloat { get set }

The element's rotation around the center of its frame. Together with `frame` this defines the element's position in its parent.

get · iOS 27.0+

elementID

TypeScript
get elementID(): MarkupOrderedSet_ElementID
Swift declaration
var elementID: MarkupOrderedSet.ElementID { get }

The element identifier for use in a markup ordered set.

get · iOS 27.0+

lineWidth

TypeScript
get lineWidth(): number
Swift declaration
var lineWidth: CGFloat { get set }

The width of the loupe's border in points.

set · iOS 27.0+

lineWidth

TypeScript
set lineWidth(value: number)
Swift declaration
var lineWidth: CGFloat { get set }

The width of the loupe's border in points.

Skipped declarations

No declarations were skipped in this snapshot.

All PaperKit types →