dwv.tool. Livewire

new Livewire(app)

Livewire painting tool.

Parameters:
NameTypeDescription
appdwv.App

The associated application.

Members

started :boolean

Interaction start flag.

Type:
  • boolean

style :dwv.gui.Style

Drawing style.

Methods

activate(bool)

Activate the tool.

Parameters:
NameTypeDescription
boolboolean

The flag to activate or not.

addEventListener(type, callback)

Add an event listener to this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackobject

The method associated with the provided event type, will be called with the fired event.

dblclick(_event)

Handle double click event.

Parameters:
NameTypeDescription
_eventobject

The double click event.

getEventNames() → {Array}

Get the list of event names that this tool can fire.

Returns:

The list of event names.

Type: 
Array

init()

Initialise the tool.

keydown(event)

Handle key down event.

Parameters:
NameTypeDescription
eventobject

The key down event.

mousedown(event)

Handle mouse down event.

Parameters:
NameTypeDescription
eventobject

The mouse down event.

mousemove(event)

Handle mouse move event.

Parameters:
NameTypeDescription
eventobject

The mouse move event.

mouseout(event)

Handle mouse out event.

Parameters:
NameTypeDescription
eventobject

The mouse out event.

mouseup(_event)

Handle mouse up event.

Parameters:
NameTypeDescription
_eventobject

The mouse up event.

removeEventListener(type, callback)

Remove an event listener from this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackobject

The method associated with the provided event type.

setFeatures(features)

Set the tool live features: shape colour.

Parameters:
NameTypeDescription
featuresobject

The list of features.

touchend(event)

Handle touch end event.

Parameters:
NameTypeDescription
eventobject

The touch end event.

touchmove(event)

Handle touch move event.

Parameters:
NameTypeDescription
eventobject

The touch move event.

touchstart(event)

Handle touch start event.

Parameters:
NameTypeDescription
eventobject

The touch start event.

(inner) finishShape()

Finish a livewire (roi) shape.