Class Image
java.lang.Object
dev.prozilla.pine.common.asset.image.Image
- All Implemented Interfaces:
Asset,Cloneable<Image>,Destructible
Represents an STB image with a width and a height.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a new object that is equal to this object.voiddestroy()Removes this asset from the asset pool and deletes it.booleanChecks if the given object is equal to this object.booleanstatic ByteBufferflipImageVertically(ByteBuffer image, int width, int height, int channels) intintgetPath()Returns the path to the file this asset was loaded from.intgetWidth()inthashCode()static ByteBufferpremultiplyAlpha(ByteBuffer image, int width, int height, int channels)
-
Field Details
-
id
public final int id
-
-
Constructor Details
-
Image
-
-
Method Details
-
getFlippedImage
-
getPremultipliedImage
-
getPixels
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getChannels
public int getChannels() -
getPath
Description copied from interface:AssetReturns the path to the file this asset was loaded from. -
destroy
public void destroy()Description copied from interface:AssetRemoves this asset from the asset pool and deletes it.- Specified by:
destroyin interfaceAsset- Specified by:
destroyin interfaceDestructible
-
equals
-
equals
Description copied from interface:CloneableChecks if the given object is equal to this object. -
hashCode
public int hashCode() -
clone
Description copied from interface:CloneableReturns a new object that is equal to this object. -
toGLFWImage
-
premultiplyAlpha
-
flipImageVertically
-