reference
labkit.app.interaction.rectangle
Declare an editable rectangular plot region.
Syntax
spec = labkit.app.interaction.rectangle(id,onChanged,Name=Value)Description
Creates the semantic declaration for a persistent editable rectangle, including an optional background-point callback on the same axis.
Inputs
id- Unique MATLAB identifier.
onChanged- Callback state = callback(state,position,context).
Options
Axis- Axis ID. Default: "main".
Style- Scalar visual-option struct. Default: struct().
Instruction- Scalar guidance text. Default: "".
ViewportPolicy- "preserve" or "fit". Default: "preserve".
OnBackgroundPressed- Optional callback state = callback(state,point,context). Default: [].
Outputs
spec- Immutable interaction declaration.
Errors
Throws labkit:app:contract:* for invalid values.
Typical Call
spec = labkit.app.interaction.rectangle("crop",@moveCrop);Related APIs
labkit.app.layout.plotArea— Add one or more axes rendered by an App-owned renderer.labkit.app.interaction.anchorPath— Declare an editable open or closed path on one plot axis.labkit.app.interaction.interpolateAnchorPath— Build a visible path through image anchor points.labkit.app.interaction.interval— Declare an editable one-dimensional plot interval.labkit.app.interaction.pairedAnchors— Declare matching editable points across plot axes.labkit.app.interaction.pointSlots— Declare a fixed set of editable labeled point positions.labkit.app.interaction.regionSelection— Declare a transient click-or-drag region gesture.labkit.app.interaction.scaleBarGeometry— Compute serializable image scale-bar overlay geometry.
Source
This page is generated from the MATLAB help text in +labkit/+app/+interaction/rectangle.m.