I

IBoundsProvider

Interface that is implemented for elements that can provide rendering bounds in the world coordinate system.
Inheritance Hierarchy

Members

No filters for this type

Methods

Returns a tight rectangular area where the whole rendering would fit into.
If calculating the bounds is too expensive or the rendering is not bound to a certain area, this method may return INFINITE. If nothing is rendered, this method should return an empty rectangle, where either or both the width and height is non-positive or EMPTY.
abstract

Parameters

context: ICanvasContext
the context to calculate the bounds for

Return Value

Rect
the bounds or EMPTY to indicate an unbound area

Constants

An implementation that returns an IBoundsProvider that yields EMPTY bounds.
An implementation that returns an IBoundsProvider that yields INFINITE bounds.

Static Methods

static

Parameters

getBounds: function(ICanvasContext): Rect

Return Value

IBoundsProvider
Creates an instance that returns the given rectangle as the bounds.
static

Parameters

bounds: IRectangle
The rectangle to be used as the bounds.

Return Value

IBoundsProvider
An IBoundsProvider that returns the given bounds.