Class TextureRegion<T>

java.lang.Object
juuxel.libninepatch.TextureRegion<T>
Type Parameters:
T - the texture type

public final class TextureRegion<T> extends Object
Texture regions represent a partial region of a larger texture image.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The texture from which this region is cut.
    float
    The left edge of this region as a fraction from 0 to 1.
    float
    The right edge of this region as a fraction from 0 to 1.
    float
    The top edge of this region as a fraction from 0 to 1.
    float
    The bottom edge of this region as a fraction from 0 to 1.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextureRegion​(T texture, float u1, float v1, float u2, float v2)
    Constructs a texture region.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
     
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • texture

      public final T texture
      The texture from which this region is cut.
    • u1

      public final float u1
      The left edge of this region as a fraction from 0 to 1.
    • v1

      public final float v1
      The top edge of this region as a fraction from 0 to 1.
    • u2

      public final float u2
      The right edge of this region as a fraction from 0 to 1.
    • v2

      public final float v2
      The bottom edge of this region as a fraction from 0 to 1.
  • Constructor Details

    • TextureRegion

      public TextureRegion​(T texture, float u1, float v1, float u2, float v2)
      Constructs a texture region.
      Parameters:
      texture - the texture from which this region is cut
      u1 - The left edge of this region as a fraction from 0 to 1
      v1 - the top edge of this region as a fraction from 0 to 1
      u2 - the right edge of this region as a fraction from 0 to 1
      v2 - the bottom edge of this region as a fraction from 0 to 1
  • Method Details