Class PolygonRegionDrawable
java.lang.Object
com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
net.dermetfan.gdx.scenes.scene2d.utils.PolygonRegionDrawable
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Drawable,com.badlogic.gdx.scenes.scene2d.utils.TransformDrawable
public class PolygonRegionDrawable
extends com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
implements com.badlogic.gdx.scenes.scene2d.utils.TransformDrawable
Drawable for a
PolygonRegion.- Since:
- 0.10.0
-
Constructor Summary
Constructors Constructor Description PolygonRegionDrawable()Creates an uninitialized instance.PolygonRegionDrawable(com.badlogic.gdx.graphics.g2d.PolygonRegion region)PolygonRegionDrawable(PolygonRegionDrawable drawable) -
Method Summary
Modifier and Type Method Description voiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height)voiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)floatgetPolygonHeight()floatgetPolygonWidth()floatgetPolygonX()floatgetPolygonY()com.badlogic.gdx.graphics.g2d.PolygonRegiongetRegion()voidsetRegion(com.badlogic.gdx.graphics.g2d.PolygonRegion region)Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getName, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinSize, setMinWidth, setName, setPadding, setRightWidth, setTopHeight, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.badlogic.gdx.scenes.scene2d.utils.Drawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
-
Constructor Details
-
PolygonRegionDrawable
public PolygonRegionDrawable()Creates an uninitialized instance. The region must besetbefore use. -
PolygonRegionDrawable
public PolygonRegionDrawable(com.badlogic.gdx.graphics.g2d.PolygonRegion region)- Parameters:
region- the region to use
-
PolygonRegionDrawable
- Parameters:
drawable- the drawable to copy
-
-
Method Details
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height)- Specified by:
drawin interfacecom.badlogic.gdx.scenes.scene2d.utils.Drawable- Overrides:
drawin classcom.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)- Specified by:
drawin interfacecom.badlogic.gdx.scenes.scene2d.utils.TransformDrawable
-
setRegion
public void setRegion(com.badlogic.gdx.graphics.g2d.PolygonRegion region)- Parameters:
region- theregionto set
-
getRegion
public com.badlogic.gdx.graphics.g2d.PolygonRegion getRegion()- Returns:
- the
region
-
getPolygonX
public float getPolygonX()- Returns:
- the
polygonX
-
getPolygonY
public float getPolygonY()- Returns:
- the
polygonY
-
getPolygonWidth
public float getPolygonWidth()- Returns:
- the
polygonWidth
-
getPolygonHeight
public float getPolygonHeight()- Returns:
- the
polygonHeight
-