Package | com.yworks.canvas |
Interface | public interface ICanvasContext extends ILookup |
CanvasComponent
.
Property | Defined By | ||
---|---|---|---|
hitTestRadius : Number [read-only]
The radius for hit tests and marquee selection tests in world coordinates. | ICanvasContext | ||
zoom : Number [read-only]
Returns the current zoom level, i.e. | ICanvasContext |
Method | Defined By | ||
---|---|---|---|
getCanvasObjects(forItem:IModelItem):Array
Returns the ICanvasObjects that represent the given item in the CanvasComponent or null. | ICanvasContext | ||
Returns the main ICanvasObject that represents the given item in the CanvasComponent or null. | ICanvasContext | ||
lookup(type:Class):Object
Returns an instance that implements the given type or null. | ILookup | ||
Creates a point that corresponds to the given point in stage coordinates. | ICanvasContext |
hitTestRadius | property |
hitTestRadius:Number
[read-only] The radius for hit tests and marquee selection tests in world coordinates. This value already takes the zoom level into account.
public function get hitTestRadius():Number
zoom | property |
zoom:Number
[read-only] Returns the current zoom level, i.e. the ratio of world coordinates to screen pixels.
public function get zoom():Number
getCanvasObjects | () | method |
public function getCanvasObjects(forItem:IModelItem):Array
Returns the ICanvasObject
s that represent the given item in the CanvasComponent
or null.
Parameters
forItem:IModelItem — The item to get the canvas objects for.
|
Array — The canvas objects that represent the given item.
|
getMainCanvasObject | () | method |
public function getMainCanvasObject(forItem:IModelItem):ICanvasObject
Returns the main ICanvasObject
that represents the given item in the CanvasComponent
or null.
Parameters
forItem:IModelItem — The item to get the canvas object for.
|
ICanvasObject — The main canvas object that represent the given item.
|
worldToStage | () | method |
public function worldToStage(pView:IPoint):IPoint
Creates a point that corresponds to the given point in stage coordinates.
Parameters
pView:IPoint — A point in world coordinates
|
IPoint — The newly created point.
|