public interface ICanvasContext extends ILookup
CanvasControl
.
This interface extends the ILookup
interface to provide
dynamic lookup capability
.
Modifier and Type | Field and Description |
---|---|
static ICanvasContext |
DEFAULT
Provides a default immutable context with a hit radius of 3 and a zoom level of 1.
|
Modifier and Type | Method and Description |
---|---|
static ICanvasContext |
create(CanvasControl canvas)
Provides a default immutable
ICanvasContext with the given values. |
static ICanvasContext |
create(CanvasControl canvas,
double zoom)
Provides a default immutable
ICanvasContext with the given values. |
static ICanvasContext |
create(CanvasControl canvas,
double zoom,
double hitTestRadius)
Provides a default immutable
ICanvasContext with the given values. |
CanvasControl |
getCanvasControl()
Yields the Canvas that is associated with this context.
|
double |
getHitTestRadius()
The radius for hit tests and marquee selection tests in world coordinates.
|
double |
getZoom()
Returns the current zoom level that is the ratio of world coordinates to screen pixels.
|
createDictionaryLookup, createDynamic, createSingle, createSingle, createWrapped, lookup, lookup, lookup, safeLookup
static final ICanvasContext DEFAULT
static ICanvasContext create(CanvasControl canvas)
ICanvasContext
with the given values.
If the values for zoom or hitTestRadius are not specified, the values will be obtained from the given canvas.
canvas
- the canvasstatic ICanvasContext create(CanvasControl canvas, double zoom)
ICanvasContext
with the given values.
If the values for zoom or hitTestRadius are not specified, the values will be obtained from the given canvas.
canvas
- the canvaszoom
- the zoom levelstatic ICanvasContext create(CanvasControl canvas, double zoom, double hitTestRadius)
ICanvasContext
with the given values.
If the values for zoom or hitTestRadius are not specified, the values will be obtained from the given canvas.
canvas
- the canvaszoom
- the zoom levelhitTestRadius
- the hit test radiusCanvasControl getCanvasControl()
This value may be null in those cases where no control can be associated with the current context.
double getHitTestRadius()
This value already takes the zoom level into account.
double getZoom()