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 RulerDrawingResultcomputeRuler(DrawingTools drawingTools, RulerModel model, Transformation canvasProjection)Compute different parameters on a rulervoiddisposeResources()Dispose all used resources.voiddraw(DrawingTools drawingTools)Draw the rulerRulerDrawingResultdraw(DrawingTools drawingTools, RulerModel model)Ruler drawing method.RulerModelgetModel()Get the modeljava.util.List<java.lang.Double>getSubTicksValue()Get the subticks valuesjava.util.List<java.lang.Double>getTicksValue()Get the ticks valuesvoidsetSpriteFactory(RulerSpriteFactory spriteFactory)Set the currentRulerSpriteFactory.
-
-
-
Constructor Detail
-
RulerDrawer
public RulerDrawer(TextureManager textureManager)
Ruler drawer constructor.- Parameters:
textureManager- theTextureManagerof the canvas where the ruler will be drawn.
-
-
Method Detail
-
draw
public RulerDrawingResult draw(DrawingTools drawingTools, RulerModel model)
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
public void draw(DrawingTools drawingTools)
Draw the ruler- Parameters:
drawingTools- theDrawingToolsof 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- theDrawingToolsof the canvas where the ruler will be drawn.rulerModel- theRulerModelof 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.
-
-