| Package | com.yworks.canvas.drawing |
| Interface | public interface IVisualStyle extends ICloneable |
| Implementors | AbstractStyle, AbstractVoidStyle |
Visual styles are responsible for rendering IModelItem instances
in a CanvasComponent.
It is up to the implementation to interpret the visual appearance of an item.
This interface extends the ICloneable interface. This allows clients
to obtain a persistent copy of the current state of this style.
Immutable style implementations may return themselves.
| Property | Defined By | ||
|---|---|---|---|
| styleRenderer : IStyleRenderer [read-only]
Gets the renderer implementation that has been supplied to
this instance upon creation. | IVisualStyle | ||
| Method | Defined By | ||
|---|---|---|---|
![]() | clone():Object
Creates a clone of this instance. | ICloneable | |
Prepares the rendering of an IModelItem in a CanvasComponent by
adding ICanvasObject's to the provided canvas. | IVisualStyle | ||
| styleRenderer | property |
styleRenderer:IStyleRenderer [read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
public function get styleRenderer():IStyleRenderer| install | () | method |
public function install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array
Prepares the rendering of an IModelItem in a CanvasComponent by
adding ICanvasObject's to the provided canvas.
Implementations may add zero or more ICanvasObject instances to
the given CanvasComponent. The group parameter
can be used as a hint for implementations. They can add their newly created
canvas objects to the given group. However they are not obliged to do that.
Parameters
canvas:CanvasComponent — The canvas to install the canvas objects in.
| |
group:ICanvasObjectGroup — A hint that tells the implementation where to add the canvas objects.
| |
modelItem:IModelItem — The item to install a visual representation for.
|
Array — An array of zero or more canvas objects that have been installed
in the canvas by this method or null if nothing was installed.
|