| Package | com.yworks.canvas |
| Class | public class CanvasObjectDescriptor |
| Implements | ICanvasObjectDescriptor |
ICanvasObjectDescriptor interface.
| Method | Defined by | ||
|---|---|---|---|
|
[static]
The singleton instance that describes completely dynamic canvas objects
that will always be repainted.
| CanvasObjectDescriptor | ||
|
getBoundsProvider(forUserObject:Object):IBoundsProvider
Returns an implementation of
IBoundsProvider that can
determine the visible bounds of the rendering of the user object. | CanvasObjectDescriptor | ||
|
getHitTestable(forUserObject:Object):IHitTestable
Returns an implementation of
IHitTestable that can determine whether
the rendering of the user object has been hit at a given coordinate. | CanvasObjectDescriptor | ||
|
[static]
The singleton instance.
| CanvasObjectDescriptor | ||
|
getPaintable(forUserObject:Object):IPaintable
Returns an implementation of
IPaintable that will render the user
object. | CanvasObjectDescriptor | ||
|
isDirty(obj:ICanvasObject):Boolean
Returns
true if the canvas object needs to be repainted. | CanvasObjectDescriptor | ||
| getAlwaysDirtyInstance | () | method |
public static function getAlwaysDirtyInstance():ICanvasObjectDescriptorThe singleton instance that describes completely dynamic canvas objects that will always be repainted.
ReturnsICanvasObjectDescriptor —
The CanvasObjectDescriptor which describes objects that will always be repainted.
|
| getBoundsProvider | () | method |
public function getBoundsProvider(forUserObject:Object):IBoundsProvider
Returns an implementation of IBoundsProvider that can
determine the visible bounds of the rendering of the user object.
This method may always return the same instance. By contract, clients will not cache instances returned, but will always call this method before the methods on the instance will be called. This contract enables the use of the fly-weight design pattern. Implementations of this class can always return the same instance and reconfigure this instance upon each call to this method.
ParametersforUserObject:Object — The user object to query the bounds for
|
IBoundsProvider —
An implementation or null if the bounds are not known, in which
case the bounds are treated as infinite
|
| getHitTestable | () | method |
public function getHitTestable(forUserObject:Object):IHitTestable
Returns an implementation of IHitTestable that can determine whether
the rendering of the user object has been hit at a given coordinate.
This method may always return the same instance. By contract, clients will
not cache instances returned, but will always call this method
before the methods on the instance will be called.
This contract enables the use of the fly-weight design pattern.
Implementations of this class can always return the same instance and
reconfigure this instance upon each call to this method.
forUserObject:Object — The user object to do the hit testing for
|
IHitTestable —
An implementation or null if the rendering cannot be hit tested
|
| getInstance | () | method |
public static function getInstance():ICanvasObjectDescriptorThe singleton instance.
ReturnsICanvasObjectDescriptor —
The singleton instance of this descriptor.
|
| getPaintable | () | method |
public function getPaintable(forUserObject:Object):IPaintable
Returns an implementation of IPaintable that will render the user
object. This method will always return the same instance.
By contract, clients will not cache instances returned, but will always call this method
before the methods of the instance will be called.
This contract enables the use of the fly-weight design pattern. Implementations of this class can always return the same instance and reconfigure this instance upon each call to this method.
ParametersforUserObject:Object — The userObject to paint
|
IPaintable —
An Implementation or null if nothing shall be painted.
|
| isDirty | () | method |
public function isDirty(obj:ICanvasObject):Boolean
Returns true if the canvas object needs to be repainted.
obj:ICanvasObject — The canvas object.
|
Boolean — true if the canvas object needs to be repainted.
|