Class RulerDrawer
java.lang.Object
org.scilab.forge.scirenderer.ruler.RulerDrawer
- Author:
- Pierre Lando
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeRuler(DrawingTools drawingTools, RulerModel model, Transformation canvasProjection) Compute different parameters on a rulervoidDispose all used resources.voiddraw(DrawingTools drawingTools) Draw the rulerdraw(DrawingTools drawingTools, RulerModel model) Ruler drawing method.getModel()Get the modelGet the subticks valuesGet the ticks valuesvoidsetSpriteFactory(RulerSpriteFactory spriteFactory) Set the currentRulerSpriteFactory.
-
Constructor Details
-
RulerDrawer
Ruler drawer constructor.- Parameters:
textureManager- theTextureManagerof the canvas where the ruler will be drawn.
-
-
Method Details
-
draw
Ruler drawing method.- Parameters:
drawingTools- theDrawingToolsof the canvas where the ruler will be drawn.model- theRulerModelof the drawn ruler.- Returns:
- the
RulerDrawingResultgive information about how the ruler have been drawn.
-
draw
Draw the ruler- Parameters:
drawingTools- theDrawingToolsof the canvas where the ruler will be drawn.
-
getModel
Get the model- Returns:
- the ruler model.
-
getSubTicksValue
Get the subticks values- Returns:
- the values.
-
getTicksValue
Get the ticks values- Returns:
- the values.
-
computeRuler
public RulerDrawingResult computeRuler(DrawingTools drawingTools, RulerModel model, Transformation canvasProjection) Compute different parameters on a ruler- Parameters:
drawingTools- theDrawingToolsof the canvas where the ruler will be drawn.canvasProjection- the canvas projection.rulerModel- theRulerModelof the drawn ruler.
-
setSpriteFactory
Set the currentRulerSpriteFactory. All existing sprite will be cleared. This ruler drawer will use the newRulerSpriteFactory.- Parameters:
spriteFactory- the newRulerSpriteFactory.
-
disposeResources
public void disposeResources()Dispose all used resources.
-