public interface IBoundsProvider
This information can be used by the rendering engine to increase rendering performance significantly.
IVisualCreator
,
CanvasControl
,
ICanvasObjectDescriptor
,
ICanvasObject
,
BoundsProviders
Modifier and Type | Field and Description |
---|---|
static IBoundsProvider |
EMPTY
An implementation that returns an
IBoundsProvider that yields an "Empty" bounds. |
static IBoundsProvider |
UNBOUNDED
An implementation that returns an
IBoundsProvider that yields "infinite" bounds. |
Modifier and Type | Method and Description |
---|---|
static IBoundsProvider |
fromRectangle(IRectangle bounds)
Creates an instance that returns the given model as the bounds.
|
RectD |
getBounds(ICanvasContext context)
Returns a tight rectangular area where the whole rendering would fit into.
|
static final IBoundsProvider EMPTY
IBoundsProvider
that yields an "Empty" bounds.static final IBoundsProvider UNBOUNDED
IBoundsProvider
that yields "infinite"
bounds.static IBoundsProvider fromRectangle(IRectangle bounds)
bounds
- the rectangleRectD getBounds(ICanvasContext context)
If calculating the bounds is too expensive or the rendering is not bound to a certain area, this method may return
RectD.INFINITE
. If nothing is rendered, this method should return an empty rectangle, where either or both
the width and height is non-positive or RectD.EMPTY
.
context
- the context to calculate the bounds forRectD.EMPTY
to indicate an unbound area