Class AbstractTexture

java.lang.Object
com.xebisco.yield.FileInput
com.xebisco.yield.AbstractTexture
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
OnDemandTexture, Texture

public abstract class AbstractTexture extends FileInput implements AutoCloseable
This abstract class represents a texture in the application.
  • Constructor Details

    • AbstractTexture

      protected AbstractTexture(String path, TextureFilter filter)
      Constructs a new AbstractTexture object with the given path and filter.
      Parameters:
      path - The path to the texture file.
      filter - The filter to apply to the texture.
  • Method Details

    • close

      public abstract void close()
      Closes the texture and releases any associated resources.
      Specified by:
      close in interface AutoCloseable
    • imageRef

      public Object imageRef()
      Returns the reference to the image object.
      Returns:
      The reference to the image object.
    • setImageRef

      public AbstractTexture setImageRef(Object imageRef)
      Sets the reference to the image object.
      Parameters:
      imageRef - The new reference to the image object.
      Returns:
      The current AbstractTexture object for method chaining.
    • filter

      public TextureFilter filter()
      Returns the filter applied to the texture.
      Returns:
      The filter applied to the texture.