Skip to main content

Texture

Complete API reference for Texture, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Material

Component: no


public class Texture

Constructors

SignatureDescription
Texture(TextureInstance)Executes Texture and returns after the underlying engine call finishes.
Texture(Engine)Executes Texture and returns after the underlying engine call finishes.
Texture(int, int)Executes Texture and returns after the underlying engine call finishes.
Texture(int, int, boolean)Creates a new instance of Texture.
Texture(int, int, boolean, boolean)Executes Texture and returns after the underlying engine call finishes.
Texture(int, int, Format)Creates a new instance of Texture.
Texture(int, int, boolean, Format)Creates a new instance of Texture.
Texture(int, int, boolean, boolean, Format)Executes Texture and returns after the underlying engine call finishes.

Attributes

NameTypeDescription
instanceTextureInstanceRepresents the instance value stored on this instance. Read or assign to update the property.

Virtual Attributes

NameTypeAccessDescription
heightintgetVirtual attribute exposed by getHeight. Access it like a field to read or write the underlying value.
mipmapEnabledbooleanget/setVirtual attribute exposed by isMipmapEnabled. Access it like a field to read or write the underlying value.
widthintgetVirtual attribute exposed by getWidth. Access it like a field to read or write the underlying value.
writablebooleangetVirtual attribute exposed by isWritable. Access it like a field to read or write the underlying value.

Methods

SignatureReturnsDescription
exportToFile(JAVARuntime.File)voidPerforms the exportToFile operation using the provided parameters (file).
exportToFile(JAVARuntime.File, int)voidPerforms the exportToFile operation using the provided parameters (file, quality).
exportToFile(JAVARuntime.File, int, ExportFormat)voidExecutes exportToFile and returns after the underlying engine call finishes.
apply()voidExecutes apply and returns after the underlying engine call finishes.
getPixel(int, int)ColorReturns the current pixel.
getPixel(Vector2)ColorReturns the current pixel.
setPixel(int, int, Color)voidSets or updates the pixel.
setPixel(Vector2, Color)voidSets or updates the pixel.
get(int, int)ColorReturns the current value.
get(int, int, Color)ColorReturns the current value.
getFloatRed(int, int)floatReturns the current float red.
getFloatGreen(int, int)floatReturns the current float green.
getFloatBlue(int, int)floatReturns the current float blue.
getFloatAlpha(int, int)floatReturns the current float alpha.
getIntRed(int, int)intReturns the current int red.
getIntGreen(int, int)intReturns the current int green.
getIntBlue(int, int)intReturns the current int blue.
getIntAlpha(int, int)intReturns the current int alpha.
set(int, int, Color)voidSets or updates the the value.
set(int, int, float, float, float, float)voidSets or updates the the value.
set(int, int, float, float, float)voidSets or updates the the value.
setR(int, int, float)voidSets or updates the r.
setG(int, int, float)voidSets or updates the g.
setB(int, int, float)voidSets or updates the b.
setA(int, int, float)voidSets or updates the a.
set(int, int, int, int, int, int)voidSets or updates the the value.
set(int, int, int, int, int)voidSets or updates the the value.
setR(int, int, int)voidSets or updates the r.
setG(int, int, int)voidSets or updates the g.
setB(int, int, int)voidSets or updates the b.
setA(int, int, int)voidSets or updates the a.
copyPixels(Texture)voidReturns a copy of this Texture instance.
extractGPUImageToBtm(ExtractCallback)voidExecutes extractGPUImageToBtm and returns after the underlying engine call finishes.
saveGPUImageToFile(File)voidExecutes saveGPUImageToFile and returns after the underlying engine call finishes.
saveGPUImageToFile(File, Runnable)voidExecutes saveGPUImageToFile and returns after the underlying engine call finishes.

Static Methods

SignatureReturnsDescription
genericInterface()GenericClassInspectorEntryExecutes genericInterface and returns after the underlying engine call finishes.
inspectorController()ClassInspectorEntryExecutes inspectorController and returns after the underlying engine call finishes.
loadFile(TextureFile)TextureLoads file into the object.
loadFile(JAVARuntime.File)TextureLoads file into the object.
loadInputStream(InputStream)TextureLoads input stream into the object.
loadURL(String)TextureExecutes loadURL and returns after the underlying engine call finishes.
newDepth(int, int)TextureCreates a new depth.
white()TextureExecutes white and returns after the underlying engine call finishes.
empty()TextureExecutes empty and returns after the underlying engine call finishes.
black()TextureExecutes black and returns after the underlying engine call finishes.
isRenderable(Texture)booleanReturns whether renderable is true.
isRenderable(TextureInstance)booleanReturns whether renderable is true.