public class RulerDrawer
extends java.lang.Object
| Constructor | Description |
|---|---|
RulerDrawer(TextureManager textureManager) |
Ruler drawer constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
RulerDrawingResult |
computeRuler(DrawingTools drawingTools,
RulerModel model,
Transformation canvasProjection) |
Compute different parameters on a ruler
|
void |
disposeResources() |
Dispose all used resources.
|
void |
draw(DrawingTools drawingTools) |
Draw the ruler
|
RulerDrawingResult |
draw(DrawingTools drawingTools,
RulerModel model) |
Ruler drawing method.
|
RulerModel |
getModel() |
Get the model
|
java.util.List<java.lang.Double> |
getSubTicksValue() |
Get the subticks values
|
java.util.List<java.lang.Double> |
getTicksValue() |
Get the ticks values
|
void |
setSpriteFactory(RulerSpriteFactory spriteFactory) |
Set the current
RulerSpriteFactory. |
public RulerDrawer(TextureManager textureManager)
textureManager - the TextureManager of the canvas where the ruler will be drawn.public RulerDrawingResult draw(DrawingTools drawingTools, RulerModel model)
drawingTools - the DrawingTools of the canvas where the ruler will be drawn.model - the RulerModel of the drawn ruler.RulerDrawingResult give information about how the ruler have been drawn.public void draw(DrawingTools drawingTools)
drawingTools - the DrawingTools of the canvas where the ruler will be drawn.public RulerModel getModel()
public java.util.List<java.lang.Double> getSubTicksValue()
public java.util.List<java.lang.Double> getTicksValue()
public RulerDrawingResult computeRuler(DrawingTools drawingTools, RulerModel model, Transformation canvasProjection)
drawingTools - the DrawingTools of the canvas where the ruler will be drawn.rulerModel - the RulerModel of the drawn ruler.canvasProjection - the canvas projection.public void setSpriteFactory(RulerSpriteFactory spriteFactory)
RulerSpriteFactory.
All existing sprite will be cleared.
This ruler drawer will use the new RulerSpriteFactory.spriteFactory - the new RulerSpriteFactory.public void disposeResources()