I

IBoundsProvider

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

See Also

Developer's Guide

API

IVisualCreator, CanvasComponent, IObjectRenderer, IRenderTreeElement

Demos

Adjust the node boundaries to parts of the node visualization that lie outside of the node bounds

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

Creates an implementation of the interface IBoundsProvider by using the given function as implementation for its getBounds method.
static

Parameters

getBounds: function(ICanvasContext): Rect
A function for IBoundsProvider's single abstract method getBounds.

Return Value

IBoundsProvider
An instance of the IBoundsProvider interface based on the given function.
Creates an instance that returns the given rectangle as the bounds.
static

Parameters

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

Return Value

IBoundsProvider
An IBoundsProvider that returns the given bounds.