User interface for the drawing area and related controls.
DrawForm | User interface for the drawing area and related controls. |
Functions and Properties | |
InitializeComponent | Initializes the user interface components on the form. |
resize | Handles a resize event by repositioning the UI widgets and recreating the drawing area at the same display list position. |
updateStatusText | Updates the status text fields with information about mouse position and dragging action. |
updateBackgroundColor | Change the drawing area background color. |
updateControlView | Update the two eye icons showing the control view state of control points and indicator to reflect the selected stroke’s state. |
updateFromStroke | Updates the UI widgets, shown stroke and coordinate system view from the properties in the Stroke and index. |
updateStrokeName | Refresh the shown stroke asset name. |
updateFromModelSize | Update the maximum value that the selectLayerField spin button will increment to. |
applyMask | Apply a mask matching the drawing area size to a Stroke. |
active | Sets the state of the DrawForm to active or inactive. |
activate | Activates the DrawForm, adds its event listeners |
disactivate | Disactivates the DrawForm, removes its event listeners |
public function updateFromStroke( newStroke: Stroke, selectedLayerIndex: int ):void
Updates the UI widgets, shown stroke and coordinate system view from the properties in the Stroke and index.
newStroke | an updated stroke |
selectedLayerIndex | index of stroke in the scene graph |
public function applyMask( aStroke: Stroke ):void
Apply a mask matching the drawing area size to a Stroke. This is to ensure that parts of a stroke is not shown outside the drawing area even when resizing or in trace view.
aStroke | the stroke to mask |
public function set active( state: Boolean ):void
Sets the state of the DrawForm to active or inactive. Modelled after WidgetInterface.
state | True to activate, false otherwise. |
Initializes the user interface components on the form.
public function InitializeComponent( app: Sprite, page: Sprite, tooltips: Tooltips, defaultColor: uint, tabColor: uint ):void
Handles a resize event by repositioning the UI widgets and recreating the drawing area at the same display list position.
public function resize():void
Updates the status text fields with information about mouse position and dragging action.
public function updateStatusText( frameNumber: uint = ):void
Change the drawing area background color.
public function updateBackgroundColor( color: uint ):void
Update the two eye icons showing the control view state of control points and indicator to reflect the selected stroke’s state.
public function updateControlView():void
Updates the UI widgets, shown stroke and coordinate system view from the properties in the Stroke and index.
public function updateFromStroke( newStroke: Stroke, selectedLayerIndex: int ):void
Refresh the shown stroke asset name.
public function updateStrokeName():void
Update the maximum value that the selectLayerField spin button will increment to.
public function updateFromModelSize( size: uint ):void
Apply a mask matching the drawing area size to a Stroke.
public function applyMask( aStroke: Stroke ):void
Sets the state of the DrawForm to active or inactive.
public function set active( state: Boolean ):void
Activates the DrawForm, adds its event listeners
private function activate():void
Disactivates the DrawForm, removes its event listeners
private function disactivate():void