public class TLspContext extends Object
ILspView
. A TLspContext
provides information such
as:
ILspView
where the drawing or editing occurs,
ILspLayer
and therefore the ILcdModel
the Object
belongs to,
ILcdGLDrawable
in which to perform the drawing,
ILcdModelXYZWorldTransformation
to transform model coordinates into world
coordinates and vice versa,
ALspViewXYZWorldTransformation
to transform world coordinates into view
coordinates and vice versa,
Constructor and Description |
---|
TLspContext()
Constructs a new uninitialized context.
|
TLspContext(ILspLayer aLayer,
ILspView aView)
Constructs a new context for the given view and layer.
|
Modifier and Type | Method and Description |
---|---|
double |
getDPIScale()
Returns the DPI scaling factor for the view that is being rendered.
|
ILspLayer |
getLayer()
Returns the layer that is being rendered.
|
TLcdMapScale |
getMapScale()
Returns the map scale that should be used to determine the visibility and style of objects.
|
ILcdModel |
getModel()
Returns the model contained in this context's layer.
|
ILcdModelReference |
getModelReference()
Returns the reference of the model contained in this context's layer.
|
ILcdModelXYZWorldTransformation |
getModelXYZWorldTransformation()
Returns the transformation that should be used to transform model
points and bounds to world points and bounds or vice versa.
|
ILspView |
getView()
Returns the view that is being rendered.
|
ALspViewXYZWorldTransformation |
getViewXYZWorldTransformation()
Returns the transformation that should be used to transform world
points to view points or vice versa.
|
ILcdXYZWorldReference |
getXYZWorldReference()
Returns the world reference used by the associated view.
|
void |
resetFor(ILspLayer aLayer,
ILspView aView)
Initializes this context for the given view and layer.
|
public TLspContext()
null
; call the resetFor(com.luciad.view.lightspeed.layer.ILspLayer, ILspView)
method before attempting to use this context.public void resetFor(ILspLayer aLayer, ILspView aView)
aLayer
- the layer for which to create a contextaView
- the view in which the layer is being paintedpublic double getDPIScale()
ALspViewXYZWorldTransformation
for additional information about high DPI
rendering support in Lightspeed views.public ILspLayer getLayer()
public ILspView getView()
public ILcdXYZWorldReference getXYZWorldReference()
public ILcdModelXYZWorldTransformation getModelXYZWorldTransformation()
public ALspViewXYZWorldTransformation getViewXYZWorldTransformation()
public TLcdMapScale getMapScale()
public ILcdModelReference getModelReference()
public ILcdModel getModel()