abstract TextureData(TextureDataImpl)
package peote.view
from TextureDataImpl, to TextureDataImpl,
Stores image data into different TextureFormat
s to use it for Texture
s.
It supports basic converting functions and a low level api to edit pixels.
Static methods
staticinlinetoTexture(this:TextureDataImpl):Texture
Creates a new Texture with 1 slot what is using the texturedata.
staticinlinetoUInt8Array(this:TextureDataImpl):UInt8Array
Converts the texturedata bytes into an UInt8Array
.
staticinlinetoFloat32Array(this:TextureDataImpl):Float32Array
Converts the texturedata bytes into a Float32Array
.
staticinlineRGBAfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into RGBA
TextureFormat
.
The alpha value will be 255 (opaque) if the source texturedata have no alpha channel.
Parameters:
textureData | source data to convert from |
---|
staticinlineRGBfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into RGB
TextureFormat
.
If the source format is of type ALPHA
, the alpha value will be converted into the red colorchannel.
Parameters:
textureData | source data to convert from |
---|
staticinlineRGfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into RG
TextureFormat
.
If the source format is of type ALPHA
, the alpha value will be converted into the red colorchannel.
Parameters:
textureData | source data to convert from |
---|
staticinlineRfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into R
TextureFormat
.
If the source format is of type ALPHA
, the alpha value will be converted into the red colorchannel.
Parameters:
textureData | source data to convert from |
---|
staticinlineLuminanceAlphaFrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into LUMINANCE_ALPHA
TextureFormat
.
The alpha value will be 255 (opaque) if the source texturedata have no alpha channel.
Parameters:
textureData | source data to convert from |
---|
staticinlineLuminanceFrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into LUMINANCE
TextureFormat
.
If the source format is of type ALPHA
, the alpha value will be used for luminance.
Parameters:
textureData | source data to convert from |
---|
staticinlineAlphaFrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into ALPHA
TextureFormat
.
If the source have no alpha channel it will convert the red color channel into alpha.
Parameters:
textureData | source data to convert from |
---|
staticinlineFloatRGBAfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into FLOAT_RGBA
TextureFormat
.
The alpha value will be 1.0 (opaque) if the source texturedata have no alpha channel.
Parameters:
textureData | source data to convert from |
---|
staticinlineFloatRGBfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into FLOAT_RGB
TextureFormat
.
If the source format is of type ALPHA
, the alpha value will be converted into the red colorchannel.
Parameters:
textureData | source data to convert from |
---|
staticinlineFloatRGfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into FLOAT_RG
TextureFormat
.
If the source format is of type ALPHA
, the alpha value will be converted into the red colorchannel.
Parameters:
textureData | source data to convert from |
---|
staticinlineFloatRfrom(textureData:TextureData):TextureData
Creates a new texturedata by converting into FLOAT_R
TextureFormat
.
If the source format is of type ALPHA
, the alpha value will be converted into the red colorchannel.
Parameters:
textureData | source data to convert from |
---|
staticfromFormatPNG(bytes:Bytes):TextureData
Creates new texturedata from png
imagedata by using the format
haxelib.
Parameters:
bytes |
|
---|
staticinlinefromLimeImage(image:Image):TextureData
staticinlinefromVisionImage(image:Image):TextureData
staticinlinefromPixelImage(pixelImage:Pixelimage_):TextureData
Creates new texturedata from a Pixelimage
of the pi_xy library.
Parameters:
pixelImage |
|
---|