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
    void draw​(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height)  
    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)  
    float getPolygonHeight()  
    float getPolygonWidth()  
    float getPolygonX()  
    float getPolygonY()  
    com.badlogic.gdx.graphics.g2d.PolygonRegion getRegion()  
    void setRegion​(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, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods 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 be set before use.
    • PolygonRegionDrawable

      public PolygonRegionDrawable​(com.badlogic.gdx.graphics.g2d.PolygonRegion region)
      Parameters:
      region - the region to use
    • PolygonRegionDrawable

      public PolygonRegionDrawable​(PolygonRegionDrawable drawable)
      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:
      draw in interface com.badlogic.gdx.scenes.scene2d.utils.Drawable
      Overrides:
      draw in class com.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:
      draw in interface com.badlogic.gdx.scenes.scene2d.utils.TransformDrawable
    • setRegion

      public void setRegion​(com.badlogic.gdx.graphics.g2d.PolygonRegion region)
      Parameters:
      region - the region to 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