Class RulerDrawer
- java.lang.Object
-
- org.scilab.forge.scirenderer.ruler.RulerDrawer
-
public class RulerDrawer extends java.lang.Object
- Author:
- Pierre Lando
-
-
Constructor Summary
Constructors Constructor Description RulerDrawer(TextureManager textureManager)
Ruler drawer constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RulerDrawingResult
computeRuler(DrawingTools drawingTools, RulerModel model, Transformation canvasProjection)
Compute different parameters on a rulervoid
disposeResources()
Dispose all used resources.void
draw(DrawingTools drawingTools)
Draw the rulerRulerDrawingResult
draw(DrawingTools drawingTools, RulerModel model)
Ruler drawing method.RulerModel
getModel()
Get the modeljava.util.List<java.lang.Double>
getSubTicksValue()
Get the subticks valuesjava.util.List<java.lang.Double>
getTicksValue()
Get the ticks valuesvoid
setSpriteFactory(RulerSpriteFactory spriteFactory)
Set the currentRulerSpriteFactory
.
-
-
-
Constructor Detail
-
RulerDrawer
public RulerDrawer(TextureManager textureManager)
Ruler drawer constructor.- Parameters:
textureManager
- theTextureManager
of the canvas where the ruler will be drawn.
-
-
Method Detail
-
draw
public RulerDrawingResult draw(DrawingTools drawingTools, RulerModel model)
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
public void draw(DrawingTools drawingTools)
Draw the ruler- Parameters:
drawingTools
- theDrawingTools
of the canvas where the ruler will be drawn.
-
getModel
public RulerModel getModel()
Get the model- Returns:
- the ruler model.
-
getSubTicksValue
public java.util.List<java.lang.Double> getSubTicksValue()
Get the subticks values- Returns:
- the values.
-
getTicksValue
public java.util.List<java.lang.Double> 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.rulerModel
- theRulerModel
of the drawn ruler.canvasProjection
- the canvas projection.
-
setSpriteFactory
public void setSpriteFactory(RulerSpriteFactory spriteFactory)
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.
-
-