ShapeWidget
Introduction
vtkShapeWidget is the base factory of the widgets that place a two-point shape, such as vtkEllipseWidget and vtkRectangleWidget. It holds the modifier-key behavior table that decides how the two points are interpreted.
Methods
getActiveBehaviorFromCategory
The flag of category that the pressed modifier keys, or the default behavior, currently select.
getManipulator
The manipulator the move handles are driven by.
getResetAfterPointPlacement
When true, placing the second point resets the widget instead of making it lose the focus.
isBehaviorActive
True when a currently pressed modifier key selects flag for category.
isOppositeBehaviorActive
True when a currently pressed modifier key selects, for category, any flag other than flag.
makeSquareFromPoints
The point that makes the shape a square, given the two opposite corners.
placePoint1
Place the first point. Can be called right after grabFocus() to place the first point without waiting for an interaction.
placePoint2
Place the second point.
reset
If the widget has the focus, reset it to its state just after it grabbed the focus. Otherwise reset it to its state before it grabbed the focus.
setCorners
Position the shape from two opposite corners. Reimplemented by each concrete shape widget.
setManipulator
Set the manipulator on the widget and on every state labelled moveHandle.
setPoints
Place both points at once and update the shape.
setText
Set the text displayed by the SVG layer.
updateShapeBounds
Recompute the shape from the currently placed points, honoring the active points and ratio behaviors.
updateTextPosition
Move the text handle to the position textPosition describes for the bounding box of the two given points.