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 rulervoid
Dispose all used resources.void
draw
(DrawingTools drawingTools) Draw the rulerdraw
(DrawingTools drawingTools, RulerModel model) Ruler drawing method.getModel()
Get the modelGet the subticks valuesGet the ticks valuesvoid
setSpriteFactory
(RulerSpriteFactory spriteFactory) Set the currentRulerSpriteFactory
.
-
Constructor Details
-
RulerDrawer
Ruler drawer constructor.- Parameters:
textureManager
- theTextureManager
of the canvas where the ruler will be drawn.
-
-
Method Details
-
draw
Ruler drawing method.- Parameters:
drawingTools
- theDrawingTools
of the canvas where the ruler will be drawn.model
- theRulerModel
of the drawn ruler.- Returns:
- the
RulerDrawingResult
give information about how the ruler have been drawn.
-
draw
Draw the ruler- Parameters:
drawingTools
- theDrawingTools
of 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
- theDrawingTools
of the canvas where the ruler will be drawn.canvasProjection
- the canvas projection.rulerModel
- theRulerModel
of 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.
-