libgdx API

com.badlogic.gdx.graphics.g2d
Class NinePatch

java.lang.Object
  extended by com.badlogic.gdx.graphics.g2d.NinePatch
Direct Known Subclasses:
EmptyNinePatch, Skin.TintedNinePatch

public class NinePatch
extends java.lang.Object


Field Summary
static int BOTTOM_CENTER
           
static int BOTTOM_LEFT
           
static int BOTTOM_RIGHT
           
static int MIDDLE_CENTER
           
static int MIDDLE_LEFT
           
static int MIDDLE_RIGHT
           
static int TOP_CENTER
           
static int TOP_LEFT
           
static int TOP_RIGHT
           
 
Constructor Summary
NinePatch(NinePatch ninePatch)
           
NinePatch(NinePatch ninePatch, Color color)
           
NinePatch(Texture texture)
           
NinePatch(Texture texture, Color color)
           
NinePatch(Texture texture, int left, int right, int top, int bottom)
           
NinePatch(TextureRegion... patches)
           
NinePatch(TextureRegion region)
           
NinePatch(TextureRegion region, Color color)
           
NinePatch(TextureRegion region, int left, int right, int top, int bottom)
           
 
Method Summary
 void draw(SpriteBatch batch, float x, float y, float width, float height)
           
 float getBottomHeight()
           
 Color getColor()
           
 float getLeftWidth()
           
 TextureRegion[] getPatches()
           
 float getRightWidth()
           
 float getTopHeight()
           
 float getTotalHeight()
           
 float getTotalWidth()
           
 void setBlending(boolean blending)
           
 void setColor(Color color)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOP_LEFT

public static final int TOP_LEFT
See Also:
Constant Field Values

TOP_CENTER

public static final int TOP_CENTER
See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
See Also:
Constant Field Values

MIDDLE_LEFT

public static final int MIDDLE_LEFT
See Also:
Constant Field Values

MIDDLE_CENTER

public static final int MIDDLE_CENTER
See Also:
Constant Field Values

MIDDLE_RIGHT

public static final int MIDDLE_RIGHT
See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
See Also:
Constant Field Values

BOTTOM_CENTER

public static final int BOTTOM_CENTER
See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
See Also:
Constant Field Values
Constructor Detail

NinePatch

public NinePatch(Texture texture,
                 int left,
                 int right,
                 int top,
                 int bottom)

NinePatch

public NinePatch(TextureRegion region,
                 int left,
                 int right,
                 int top,
                 int bottom)

NinePatch

public NinePatch(Texture texture,
                 Color color)

NinePatch

public NinePatch(Texture texture)

NinePatch

public NinePatch(TextureRegion region,
                 Color color)

NinePatch

public NinePatch(TextureRegion region)

NinePatch

public NinePatch(TextureRegion... patches)

NinePatch

public NinePatch(NinePatch ninePatch)

NinePatch

public NinePatch(NinePatch ninePatch,
                 Color color)
Method Detail

draw

public void draw(SpriteBatch batch,
                 float x,
                 float y,
                 float width,
                 float height)

getLeftWidth

public float getLeftWidth()

getRightWidth

public float getRightWidth()

getTopHeight

public float getTopHeight()

getBottomHeight

public float getBottomHeight()

getTotalHeight

public float getTotalHeight()

getTotalWidth

public float getTotalWidth()

getPatches

public TextureRegion[] getPatches()

setColor

public void setColor(Color color)

getColor

public Color getColor()

setBlending

public void setBlending(boolean blending)

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)