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
fieldsstores 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

  1. any ouput of the image decoder
sprite_sheet(settings)Source

turns the given texture into a sprite sheet object.

Parameters

  1. settings table the settings to split the texture into sprite_sheet with. view sprite sheet settings

Returns

  1. sprite_sheet the generated sprite_sheet object
scale_down(factor)Source

scales down the given texture by the given factor.

Parameters

  1. factor number the factor to scale down the texture by.

Returns

  1. 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

  1. x number the x position of the pixel in the texture
  2. y number the y position of the pixel in the texture
  3. c number the color to set this pixel to
set_pixel(x, y, t)Source

sets a pixel in the images transparency mask layer

Parameters

  1. x number the x position of the pixel in the texture
  2. y number the y position of the pixel in the texture
  3. t boolean transparency state
fieldsSource

stores bunch of metadata and also stores the image as a 2D map of blit colors.

c3dthe 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.