| Package | com.yworks.canvas.drawing |
| Class | public class PaintableDisplayObjectCreator |
| Inheritance | PaintableDisplayObjectCreator Object |
| Implements | IDisplayObjectCreator |
IDisplayObjectCreator implementation which uses an
IPaintable to render the generated DisplayObject.
Can be used to use an IPaintable as IDisplayObjectCreator.
See also
| Method | Defined By | ||
|---|---|---|---|
PaintableDisplayObjectCreator(paintable:IPaintable)
Creates a new instance which uses the given paintable to render the
DisplayObject
| PaintableDisplayObjectCreator | ||
createDisplayObject(context:IDisplayObjectContext):DisplayObject
Creates a new DisplayObject from scratch. | PaintableDisplayObjectCreator | ||
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject or returns a new one. | PaintableDisplayObjectCreator | ||
| PaintableDisplayObjectCreator | () | Constructor |
public function PaintableDisplayObjectCreator(paintable:IPaintable)
Creates a new instance which uses the given paintable to render the
DisplayObject
paintable:IPaintable — The paintable to be used as renderer.
|
| createDisplayObject | () | method |
public function createDisplayObject(context:IDisplayObjectContext):DisplayObject
Creates a new DisplayObject from scratch.
Parameters
context:IDisplayObjectContext — The context for which the display object is created.
|
DisplayObject — A DisplayObject.
|
| updateDisplayObject | () | method |
public function updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject or returns a new one.
If the old display object was created by this implementation, its graphics will be cleared and the paintable will be used to re-paint on the same display object.
Parameters
oldDisplayObject:DisplayObject — The display object to update.
| |
context:IDisplayObjectContext — The rendering context.
|
DisplayObject — The updated DisplayObject. May be a different instance.
|