Package | com.yworks.canvas.drawing |
Class | public class EqualSizePaintable |
Inheritance | EqualSizePaintable Object |
Implements | IDisplayObjectCreator |
Subclasses | EqualHeightPaintable, EqualWidthPaintable |
Property | Defined By | ||
---|---|---|---|
rectangles : Iterable
An Iterable of IRectangles containing the bounds of the resized objects
as well as the bounds of the (non-resizing) rectangular objects the snapped size was based upon. | EqualSizePaintable | ||
size : Number
The size the resized object snapped to. | EqualSizePaintable | ||
stroke : IStroke
The stroke used in the paint method. | EqualSizePaintable |
Method | Defined By | ||
---|---|---|---|
createDisplayObject(context:IDisplayObjectContext):DisplayObject
Creates a new DisplayObject from scratch. | EqualSizePaintable | ||
This implementation does nothing and has to be overridden by its subclasses. | EqualSizePaintable | ||
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject or creates a new one. | EqualSizePaintable |
rectangles | property |
rectangles:Iterable
An Iterable
of IRectangle
s containing the bounds of the resized objects
as well as the bounds of the (non-resizing) rectangular objects the snapped size was based upon.
public function get rectangles():Iterable
public function set rectangles(value:Iterable):void
size | property |
size:Number
The size the resized object snapped to.
public function get size():Number
public function set size(value:Number):void
stroke | property |
stroke:IStroke
The stroke used in the paint
method.
public function get stroke():IStroke
public function set stroke(value:IStroke):void
See also
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 .
|
paint | () | method |
public function paint(g:YGraphics, ctx:IPaintContext):void
This implementation does nothing and has to be overridden by its subclasses.
Parameters
g:YGraphics | |
ctx:IPaintContext |
updateDisplayObject | () | method |
public function updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject
or creates a new one.
Implementors can decide whether they update the given display object or create a new one. Updating can mean re-rendering or updating size and/or coordinates.
Parameters
oldDisplayObject:DisplayObject — The display object to update.
| |
context:IDisplayObjectContext — The context for which the display object should be updated.
|
DisplayObject — The updated display object or a completely new display object.
|