Class BufferedImageTextureDrawingTools
java.lang.Object
org.scilab.forge.scirenderer.texture.BufferedImageTextureDrawingTools
- All Implemented Interfaces:
TextureDrawingTools
Implementation of
TextureDrawingTools
.
This implementation create a TextureBufferedImage
an fill it with texture drawing.- Author:
- Pierre Lando
-
Constructor Summary
ConstructorsConstructorDescriptionBufferedImageTextureDrawingTools
(Dimension textureSize) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(TextureDrawer textureDrawer) Ask this image to accept a texture drawer.void
Clear the sprite with the given color.void
Draw the givenIcon
at the given position.void
draw
(TextEntity textEntity, int x, int y) Draw the given text at the given position with the given appearance.void
drawCircle
(int x, int y, int diameter, Appearance appearance) Draw a circle.void
drawPlus
(int size, Appearance appearance) Draw a plus.void
drawPolyline
(int[] coordinates, Appearance appearance) Draw a polyline.void
Fill a disc of given diameter, centered at (x, y) with the given appearance.void
fillPolygon
(int[] coordinates, Appearance appearance) Fill a polygon.getImage()
Return the image.
-
Constructor Details
-
BufferedImageTextureDrawingTools
Default constructor.- Parameters:
textureSize
- the texture size.
-
-
Method Details
-
accept
Ask this image to accept a texture drawer. This image will contain the drawing of the given drawer.- Parameters:
textureDrawer
- the given texture drawer.
-
drawPlus
Description copied from interface:TextureDrawingTools
Draw a plus.- Specified by:
drawPlus
in interfaceTextureDrawingTools
- Parameters:
size
- the plus size.appearance
- the used appearance.
-
drawPolyline
Description copied from interface:TextureDrawingTools
Draw a polyline.- Specified by:
drawPolyline
in interfaceTextureDrawingTools
- Parameters:
coordinates
- polyline's point coordinates.appearance
- the used appearance.
-
fillPolygon
Description copied from interface:TextureDrawingTools
Fill a polygon.- Specified by:
fillPolygon
in interfaceTextureDrawingTools
- Parameters:
coordinates
- polygon's point coordinates.appearance
- the used appearance.
-
drawCircle
Description copied from interface:TextureDrawingTools
Draw a circle.- Specified by:
drawCircle
in interfaceTextureDrawingTools
- Parameters:
x
- the x coordinate of the circle center.y
- the y coordinate of the circle center.diameter
- the circle diameter.appearance
- the circle appearance.
-
fillDisc
Description copied from interface:TextureDrawingTools
Fill a disc of given diameter, centered at (x, y) with the given appearance.- Specified by:
fillDisc
in interfaceTextureDrawingTools
- Parameters:
x
- the x coordinate of the disc center.y
- the y coordinate of the disc center.diameter
- the disc diameter.color
- the disc color.
-
draw
Description copied from interface:TextureDrawingTools
Draw the given text at the given position with the given appearance.- Specified by:
draw
in interfaceTextureDrawingTools
- Parameters:
textEntity
- the text entity to draw.x
- the x text position.y
- the y text position.
-
draw
Description copied from interface:TextureDrawingTools
Draw the givenIcon
at the given position.- Specified by:
draw
in interfaceTextureDrawingTools
- Parameters:
icon
- the given icon to paint.x
- the x text position.y
- the y text position.
-
clear
Description copied from interface:TextureDrawingTools
Clear the sprite with the given color.- Specified by:
clear
in interfaceTextureDrawingTools
- Parameters:
color
- the new background color.
-
getImage
Return the image.- Returns:
- the image.
-