Class RulerDrawer

java.lang.Object
org.scilab.forge.scirenderer.ruler.RulerDrawer

public class RulerDrawer extends Object
Author:
Pierre Lando
  • Constructor Details

    • RulerDrawer

      public RulerDrawer(TextureManager textureManager)
      Ruler drawer constructor.
      Parameters:
      textureManager - the TextureManager of the canvas where the ruler will be drawn.
  • Method Details

    • draw

      public RulerDrawingResult draw(DrawingTools drawingTools, RulerModel model)
      Ruler drawing method.
      Parameters:
      drawingTools - the DrawingTools of the canvas where the ruler will be drawn.
      model - the RulerModel 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 - the DrawingTools of the canvas where the ruler will be drawn.
    • getModel

      public RulerModel getModel()
      Get the model
      Returns:
      the ruler model.
    • getSubTicksValue

      public List<Double> getSubTicksValue()
      Get the subticks values
      Returns:
      the values.
    • getTicksValue

      public List<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 - the DrawingTools of the canvas where the ruler will be drawn.
      canvasProjection - the canvas projection.
      rulerModel - the RulerModel of the drawn ruler.
    • setSpriteFactory

      public void setSpriteFactory(RulerSpriteFactory spriteFactory)
      Set the current RulerSpriteFactory. All existing sprite will be cleared. This ruler drawer will use the new RulerSpriteFactory.
      Parameters:
      spriteFactory - the new RulerSpriteFactory.
    • disposeResources

      public void disposeResources()
      Dispose all used resources.