Package com.luciad.view.lightspeed
Class TLspContext
java.lang.Object
com.luciad.view.lightspeed.TLspContext
Provides context information to be used when painting or editing an object
in an
ILspView
. A TLspContext
provides information such
as:
- the
ILspView
where the drawing or editing occurs, - the
ILspLayer
and therefore theILcdModel
theObject
belongs to, - the
ILcdGLDrawable
in which to perform the drawing, - the
ILcdModelXYZWorldTransformation
to transform model coordinates into world coordinates and vice versa, - the
ALspViewXYZWorldTransformation
to transform world coordinates into view coordinates and vice versa,
- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionConstructs a new uninitialized context.TLspContext
(ILspLayer aLayer, ILspView aView) Constructs a new context for the given view and layer. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the DPI scaling factor for the view that is being rendered.getLayer()
Returns the layer that is being rendered.Returns the map scale that should be used to determine the visibility and style of objects.getModel()
Returns the model contained in this context's layer.Returns the reference of the model contained in this context's layer.Returns the transformation that should be used to transform model points and bounds to world points and bounds or vice versa.getView()
Returns the view that is being rendered.Returns the transformation that should be used to transform world points to view points or vice versa.Returns the world reference used by the associated view.void
Initializes this context for the given view and layer.
-
Constructor Details
-
TLspContext
public TLspContext()Constructs a new uninitialized context. The view and layer are initiallynull
; call theresetFor(com.luciad.view.lightspeed.layer.ILspLayer, ILspView)
method before attempting to use this context. -
TLspContext
Constructs a new context for the given view and layer.- Parameters:
aLayer
- the layer for which to create a contextaView
- the view in which the layer is being painted
-
-
Method Details
-
resetFor
Initializes this context for the given view and layer.- Parameters:
aLayer
- the layer for which to create a contextaView
- the view in which the layer is being painted
-
getDPIScale
public double getDPIScale()Returns the DPI scaling factor for the view that is being rendered. The return value is typically greater than or equal to 1.0, with 1.0 indicating that no scaling is performed. Please refer toALspViewXYZWorldTransformation
for additional information about high DPI rendering support in Lightspeed views.- Returns:
- the DPI scaling factor for the view that is being rendered
- Since:
- 2019.0
-
getLayer
Returns the layer that is being rendered.- Returns:
- the layer that is being rendered
-
getView
Returns the view that is being rendered.- Returns:
- the view that is being rendered
-
getXYZWorldReference
Returns the world reference used by the associated view.- Returns:
- the world reference
-
getModelXYZWorldTransformation
Returns the transformation that should be used to transform model points and bounds to world points and bounds or vice versa.- Returns:
- the model to world transformation
-
getViewXYZWorldTransformation
Returns the transformation that should be used to transform world points to view points or vice versa.- Returns:
- the view to world transformation
-
getMapScale
Returns the map scale that should be used to determine the visibility and style of objects. This is usually the scale of the view, but might be different if a custom map scale provider is set on the layer.- Returns:
- the map scale
- Since:
- 2022.0
-
getModelReference
Returns the reference of the model contained in this context's layer.- Returns:
- the reference of the model contained in this context's layer
-
getModel
Returns the model contained in this context's layer.- Returns:
- the model contained in this context's layer
-