Interface that is implemented for elements that can provide rendering bounds in the world coordinate system.
Inheritance Hierarchy
IBoundsProvider
Related Programming Samples
- 10 Render Boundaries
- Adjust the node boundaries to parts of the node visualization that lie outside of the node bounds
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.IBoundsProvider
See Also
IVisualCreator,
CanvasComponent,
ICanvasObjectDescriptor,
ICanvasObject,
Complex Custom Indicator Installer,
IBoundsProvider,
Separating Style and Renderer,
Customizing Predefined Styles,
Creating a custom Arrow
Methods
Returns a tight rectangular area where the whole rendering would fit into.
Remarks
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.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - ICanvasContext
- the context to calculate the bounds for
Returns
Constants
An implementation that returns an IBoundsProvider that yields an "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.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- getBounds - function(ICanvasContext):Rect
- A function for IBoundsProvider's single abstract method getBounds.
Returns
- ↪IBoundsProvider
- An instance of the IBoundsProvider interface based on the given function.
Creates an instance that returns the given rectangle as the bounds.