Package com.badlogic.gdx.graphics.g2d
Class RepeatablePolygonSprite
- java.lang.Object
-
- com.badlogic.gdx.graphics.g2d.RepeatablePolygonSprite
-
public class RepeatablePolygonSprite extends java.lang.Object
Renders 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 void
draw(PolygonSpriteBatch batch)
void
setColor(Color color)
void
setPolygon(TextureRegion region, float[] vertices)
Sets polygon with repeating texture region, the size of repeating grid is equal to region sizevoid
setPolygon(TextureRegion region, float[] vertices, float density)
Sets polygon with repeating texture region, the size of repeating grid is equal to region sizevoid
setPosition(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)
-
-