Package com.badlogic.gdx.graphics.g2d
Class RepeatablePolygonSprite
- java.lang.Object
-
- com.badlogic.gdx.graphics.g2d.RepeatablePolygonSprite
-
public class RepeatablePolygonSprite extends java.lang.ObjectRenders polygon filled with a repeating TextureRegion with specified density Without causing an additional flush or render call
-
-
Constructor Summary
Constructors Constructor Description RepeatablePolygonSprite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(PolygonSpriteBatch batch)voidsetColor(Color color)voidsetPolygon(TextureRegion region, float[] vertices)Sets polygon with repeating texture region, the size of repeating grid is equal to region sizevoidsetPolygon(TextureRegion region, float[] vertices, float density)Sets polygon with repeating texture region, the size of repeating grid is equal to region sizevoidsetPosition(float x, float y)
-
-
-
Method Detail
-
setPolygon
public void setPolygon(TextureRegion region, float[] vertices)
Sets polygon with repeating texture region, the size of repeating grid is equal to region size- Parameters:
region- - region to repeatvertices- - cw vertices of polygon
-
setPolygon
public void setPolygon(TextureRegion region, float[] vertices, float density)
Sets polygon with repeating texture region, the size of repeating grid is equal to region size- Parameters:
region- - region to repeatvertices- - cw vertices of polygondensity- - number of regions per polygon width bound
-
draw
public void draw(PolygonSpriteBatch batch)
-
setColor
public void setColor(Color color)
- Parameters:
color- - Tint color to be applied to entire polygon
-
setPosition
public void setPosition(float x, float y)
-
-