Package com.xebisco.yield
Class AbstractTexture
java.lang.Object
com.xebisco.yield.FileInput
com.xebisco.yield.AbstractTexture
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
OnDemandTexture,Texture
This abstract class represents a texture in the application.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTexture(String path, TextureFilter filter) Constructs a new AbstractTexture object with the given path and filter. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclose()Closes the texture and releases any associated resources.filter()Returns the filter applied to the texture.imageRef()Returns the reference to the image object.setImageRef(Object imageRef) Sets the reference to the image object.Methods inherited from class com.xebisco.yield.FileInput
fileFormat, path
-
Constructor Details
-
AbstractTexture
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:
closein interfaceAutoCloseable
-
imageRef
Returns the reference to the image object.- Returns:
- The reference to the image object.
-
setImageRef
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
Returns the filter applied to the texture.- Returns:
- The filter applied to the texture.
-