Class G2DTextureDrawingTools
java.lang.Object
org.scilab.forge.scirenderer.implementation.g2d.texture.G2DTextureDrawingTools
- All Implemented Interfaces:
TextureDrawingTools
Implementation of
an fill it with sprite drawing.
TextureDrawingTools.
This implementation create a
invalid reference
TextureBufferedImage
- Author:
- Pierre Lando
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaccept(TextureDrawer textureDrawer, int width, int height) Ask this image to accept a sprite drawer.voidClear the sprite with the given color.voidDraw the givenIconat the given position.voiddraw(TextEntity textEntity, int x, int y) Draw the given text at the given position with the given appearance.voiddrawCircle(int x, int y, int diameter, Appearance appearance) Draw a circle.voiddrawPlus(int size, Appearance appearance) Draw a plus.voiddrawPolyline(int[] coordinates, Appearance appearance) Draw a polyline.voidFill a disc of given diameter, centered at (x, y) with the given appearance.voidfillPolygon(int[] coordinates, Appearance appearance) Fill a polygon.voidsetGraphics(Graphics2D g2d)
-
Constructor Details
-
G2DTextureDrawingTools
Default constructor.- Parameters:
width- the image width.height- the image height.useSquareTexture- true if square texture is needed.
-
-
Method Details
-
setGraphics
-
accept
-
accept
Ask this image to accept a sprite drawer. This image will contain the drawing of the given drawer.- Parameters:
spriteDrawer- the given sprite drawer.
-
drawPlus
Description copied from interface:TextureDrawingToolsDraw a plus.- Specified by:
drawPlusin interfaceTextureDrawingTools- Parameters:
size- the plus size.appearance- the used appearance.
-
drawPolyline
Description copied from interface:TextureDrawingToolsDraw a polyline.- Specified by:
drawPolylinein interfaceTextureDrawingTools- Parameters:
coordinates- polyline's point coordinates.appearance- the used appearance.
-
fillPolygon
Description copied from interface:TextureDrawingToolsFill a polygon.- Specified by:
fillPolygonin interfaceTextureDrawingTools- Parameters:
coordinates- polygon's point coordinates.appearance- the used appearance.
-
drawCircle
Description copied from interface:TextureDrawingToolsDraw a circle.- Specified by:
drawCirclein 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:TextureDrawingToolsFill a disc of given diameter, centered at (x, y) with the given appearance.- Specified by:
fillDiscin 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:TextureDrawingToolsDraw the given text at the given position with the given appearance.- Specified by:
drawin interfaceTextureDrawingTools- Parameters:
textEntity- the text entity to draw.x- the x text position.y- the y text position.
-
draw
Description copied from interface:TextureDrawingToolsDraw the givenIconat the given position.- Specified by:
drawin interfaceTextureDrawingTools- Parameters:
icon- the given icon to paint.x- the x text position.y- the y text position.
-
clear
Description copied from interface:TextureDrawingToolsClear the sprite with the given color.- Specified by:
clearin interfaceTextureDrawingTools- Parameters:
color- the new background color.
-