I

IVisualCreator

Factory interface which is used by implementations that know how to create Visuals for rendering into a given IRenderContext.
Inheritance Hierarchy

Remarks

The methods createVisual and updateVisual manage the actual visual representation, the Visual. The createVisual method is called when the object's visualization should become visible for the first time. In the subsequent redrawing process, the updateVisual method is called with the Visual instance of the previous rendering step. In this method, the given Visual instance's values (e.g. the position) can be updated instead of creating a new Visual instance.

Keep in mind:

See Also

Developer's Guide

API

CanvasComponent, IObjectRenderer, IRenderTreeElement

Members

No filters for this type

Methods

This method is called by the framework to create a Visual that will be included in the IRenderContext.
CanvasComponent uses this interface through the IObjectRenderer<Object> to populate the render tree.
abstract

Parameters

context: IRenderContext
The context that describes where the visual will be used.

Return Value

Visual
The visual to include in the render tree. This may be null.

See Also

Developer's Guide
API
updateVisual
This method updates or replaces a previously created Visual for inclusion in the IRenderContext.

The CanvasComponent uses this method to give implementations a chance to update an existing Visual that has previously been created by the same instance during a call to createVisual. Implementation may update the oldVisual and return that same reference, or create a new visual and return the new instance or null.

In most cases oldVisual is a visual instance that has been returned by the createVisual method of this instance. This is, however, not guaranteed. Implementations have to be aware of this.

abstract

Parameters

context: IRenderContext
The context that describes where the visual will be used in.
oldVisual: Visual
The visual instance to be updated.

Return Value

Visual
oldVisual, if this instance modified the visual, or a new visual that should replace the existing one in the render tree.

See Also

Developer's Guide
API
createVisual, IObjectRenderer, CanvasComponent

Constants

An immutable and shareable instance of the IVisualCreator class that renders nothing.

Static Methods

static

Parameters

Return Value

IVisualCreator