APIdia Launch Partner
Top Description Fields Methods
com.badlogic.gdx.graphics.g2d

public Interface PolygonBatch

extends Batch
Known Direct Implementers
com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch
Imports
com.badlogic.gdx.graphics.Texture

A PolygonBatch is an extension of the Batch interface that provides additional render methods specifically for rendering polygons.
Authors
mzechner, Nathan Sweet

Field Summary

Inherited from com.badlogic.gdx.graphics.g2d.Batch:
C1C2C3C4U1U2U3U4V1V2V3V4X1X2X3X4Y1Y2Y3Y4

Method Summary

Modifier and TypeMethod and Description
public void
draw(PolygonRegion region, float x, float y)

Draws a polygon region with the bottom left corner at x,y having the width and height of the region.

public void
draw(PolygonRegion region, float x, float y, float width, float height)

Draws a polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.

public void
draw(PolygonRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)

Draws the polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.

public void
draw(Texture texture, float[] polygonVertices, int verticesOffset, int verticesCount, short[] polygonTriangles, int trianglesOffset, int trianglesCount)

Draws the polygon using the given vertices and triangles.

Inherited from com.badlogic.gdx.graphics.g2d.Batch:
begindisableBlendingdrawdrawdrawdrawdrawdrawdrawdrawdrawdrawdrawdrawenableBlendingendflushgetBlendDstFuncgetBlendDstFuncAlphagetBlendSrcFuncgetBlendSrcFuncAlphagetColorgetPackedColorgetProjectionMatrixgetShadergetTransformMatrixisBlendingEnabledisDrawingsetBlendFunctionsetBlendFunctionSeparatesetColorsetColorsetPackedColorsetProjectionMatrixsetShadersetTransformMatrix

Method Detail

drawback to summary
public void draw(PolygonRegion region, float x, float y)

Draws a polygon region with the bottom left corner at x,y having the width and height of the region.

drawback to summary
public void draw(PolygonRegion region, float x, float y, float width, float height)

Draws a polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.

drawback to summary
public void draw(PolygonRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)

Draws the polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height. The polygon region is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the polygon region should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around originX, originY.

drawback to summary
public void draw(Texture texture, float[] polygonVertices, int verticesOffset, int verticesCount, short[] polygonTriangles, int trianglesOffset, int trianglesCount)

Draws the polygon using the given vertices and triangles. Each vertices must be made up of 5 elements in this order: x, y, color, u, v.