Class G2DDrawingTools
- java.lang.Object
-
- org.scilab.forge.scirenderer.implementation.g2d.G2DDrawingTools
-
- All Implemented Interfaces:
DrawingTools
public class G2DDrawingTools extends java.lang.Object implements DrawingTools
JoGl implementation of the DrawingTools.- Author:
- Calixte DENIZET
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear(java.awt.Color color)
Clear the canvas with the given color.void
clear(Color color)
Clear the canvas with the given color.void
clearDepthBuffer()
Clear the depth buffer.void
draw(Renderer renderer)
Ask the given renderer to perform a draw.void
draw(Geometry geometry)
Draw the given geometry with default appearance.void
draw(Geometry geometry, Appearance appearance)
Draw the given geometry.void
draw(Texture texture)
Draw the texture on XY plane in current coordinate.void
draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions)
Draw the given texture at all given position.void
draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions, double rotationAngle)
Draw the given texture at all given position with the given rotation angle.void
draw(Texture texture, AnchorPosition anchor, Vector3d position)
Draw the given texture at given position.void
draw(Texture texture, AnchorPosition anchor, Vector3d position, double rotationAngle)
Draw the given texture at given position with the given rotation angle.G2DCanvas
getCanvas()
Return the canvas where draw is done.G2DClippingManager
getClippingManager()
Return the clipping manager.LightManager
getLightManager()
Return the light manager.Motor3D
getMotor3D()
TransformationManager
getTransformationManager()
Return the transformation manager.
-
-
-
Method Detail
-
getMotor3D
public Motor3D getMotor3D()
-
getCanvas
public G2DCanvas getCanvas()
Description copied from interface:DrawingTools
Return the canvas where draw is done.- Specified by:
getCanvas
in interfaceDrawingTools
- Returns:
- the canvas where draw is done.
-
getTransformationManager
public TransformationManager getTransformationManager()
Description copied from interface:DrawingTools
Return the transformation manager.- Specified by:
getTransformationManager
in interfaceDrawingTools
- Returns:
- the transformation manager.
-
getLightManager
public LightManager getLightManager()
Description copied from interface:DrawingTools
Return the light manager.- Specified by:
getLightManager
in interfaceDrawingTools
- Returns:
- the light manager.
-
getClippingManager
public G2DClippingManager getClippingManager()
Description copied from interface:DrawingTools
Return the clipping manager.- Specified by:
getClippingManager
in interfaceDrawingTools
- Returns:
- the clipping manager.
-
clear
public void clear(Color color)
Description copied from interface:DrawingTools
Clear the canvas with the given color.- Specified by:
clear
in interfaceDrawingTools
- Parameters:
color
- the color used to clear the canvas.
-
clear
public void clear(java.awt.Color color)
Description copied from interface:DrawingTools
Clear the canvas with the given color.- Specified by:
clear
in interfaceDrawingTools
- Parameters:
color
- the color used to clear the canvas.
-
clearDepthBuffer
public void clearDepthBuffer()
Description copied from interface:DrawingTools
Clear the depth buffer.- Specified by:
clearDepthBuffer
in interfaceDrawingTools
-
draw
public void draw(Renderer renderer)
Description copied from interface:DrawingTools
Ask the given renderer to perform a draw.- Specified by:
draw
in interfaceDrawingTools
- Parameters:
renderer
- the given renderer.
-
draw
public void draw(Geometry geometry) throws SciRendererException
Description copied from interface:DrawingTools
Draw the given geometry with default appearance.- Specified by:
draw
in interfaceDrawingTools
- Parameters:
geometry
- the geometry to draw.- Throws:
SciRendererException
- if the draw is not possible.
-
draw
public void draw(Geometry geometry, Appearance appearance) throws SciRendererException
Description copied from interface:DrawingTools
Draw the given geometry.- Specified by:
draw
in interfaceDrawingTools
- Parameters:
geometry
- the geometry to draw.appearance
- the appearance to use.- Throws:
SciRendererException
- if the draw is not possible.
-
draw
public void draw(Texture texture) throws SciRendererException
Description copied from interface:DrawingTools
Draw the texture on XY plane in current coordinate. The texture is drawn on the rectangle [(0,0)-(texture width,texture height)].- Specified by:
draw
in interfaceDrawingTools
- Parameters:
texture
- the texture to drawn.- Throws:
SciRendererException
- if the texture is not drawable.
-
draw
public void draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions)
Description copied from interface:DrawingTools
Draw the given texture at all given position.- Specified by:
draw
in interfaceDrawingTools
- Parameters:
texture
- the texture to draw.anchor
- the texture anchor position.positions
- the positions where the texture will be drawn.
-
draw
public void draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions, double rotationAngle)
Description copied from interface:DrawingTools
Draw the given texture at all given position with the given rotation angle.- Specified by:
draw
in interfaceDrawingTools
- Parameters:
texture
- the texture to draw.anchor
- the texture anchor position.positions
- the positions where the texture will be drawn.rotationAngle
- the rotation angle.
-
draw
public void draw(Texture texture, AnchorPosition anchor, Vector3d position)
Description copied from interface:DrawingTools
Draw the given texture at given position.- Specified by:
draw
in interfaceDrawingTools
- Parameters:
texture
- the texture to draw.anchor
- the texture anchor position.position
- the position where the texture will be drawn.
-
draw
public void draw(Texture texture, AnchorPosition anchor, Vector3d position, double rotationAngle)
Description copied from interface:DrawingTools
Draw the given texture at given position with the given rotation angle.- Specified by:
draw
in interfaceDrawingTools
- Parameters:
texture
- the texture to draw.anchor
- the texture anchor position.position
- the position where the texture will be drawn.rotationAngle
- the rotation angle.
-
-