texture
a loaded texture object.
get_out() | returns the output of the image decoder. |
---|---|
sprite_sheet(settings) | turns the given texture into a sprite sheet object. |
scale_down(factor) | scales down the given texture by the given factor. |
update() | updates the textures mipmaps |
set_pixel(x, y, c) | sets a pixel in the image |
set_pixel(x, y, t) | sets a pixel in the images transparency mask layer |
fields | stores bunch of metadata and also stores the image as a 2D map of blit colors. |
- get_out()Source
returns the output of the image decoder. Can be used to for example to get the quantized palette object.
Returns
- any ouput of the image decoder
- sprite_sheet(settings)Source
turns the given texture into a sprite sheet object.
Parameters
- settings table the settings to split the texture into sprite_sheet with. view sprite sheet settings
Returns
- sprite_sheet the generated sprite_sheet object
- scale_down(factor)Source
scales down the given texture by the given factor.
Parameters
- factor number the factor to scale down the texture by.
Returns
- texture returns self for easy chain calling
- update()Source
updates the textures mipmaps
- set_pixel(x, y, c)Source
sets a pixel in the image
Parameters
- x number the
x
position of the pixel in the texture - y number the
y
position of the pixel in the texture - c number the color to set this pixel to
- x number the
- set_pixel(x, y, t)Source
sets a pixel in the images transparency mask layer
Parameters
- x number the
x
position of the pixel in the texture - y number the
y
position of the pixel in the texture - t boolean transparency state
- x number the
- fieldsSource
stores bunch of metadata and also stores the image as a 2D map of blit colors.
c3d the data that the decoder has access to and can store data from. - c3dSource
the data that the decoder has access to and can store data from. It stores the decoders output for example.