Interface IResizeOperation
One resize gesture in progress. It remembers the element's state when the gesture started, so every update is computed from that state and rounding never accumulates.
public interface IResizeOperation
- Extension Methods
Properties
Indicator
Gets the area the element will occupy in its container after the last Update(Vector2), in the container's local space, for the editor to outline; or null when the strategy has nothing beyond the element's own bounds to show.
RectangleF? Indicator { get; }
Property Value
Remarks
The default implementation returns null.
Methods
Update(Vector2)
Computes the attributes for the handle dragged by delta since the gesture started.
IReadOnlyList<AttributeEdit> Update(Vector2 delta)
Parameters
deltaVector2The pointer's offset from where the gesture started, in the container's local units.
Returns
- IReadOnlyList<AttributeEdit>
The attribute values the element should have now.
Update(Vector2, bool)
Computes the attributes for the handle dragged by delta since the gesture started, with
snapping turned on or off.
IReadOnlyList<AttributeEdit> Update(Vector2 delta, bool snap)
Parameters
deltaVector2The pointer's offset from where the gesture started, in the container's local units.
snapbooltrue to let the strategy snap the dragged edge to its guides (such as grid lines); false to follow the pointer exactly. The editor clears it while
Altis held.
Returns
- IReadOnlyList<AttributeEdit>
The attribute values the element should have now.
Remarks
The default implementation ignores snap and calls Update(Vector2).