- allocatePlace
void allocatePlace(uint w, uint h)
Allocates space for image data.
- bind
void bind(IRenderer render)
Undocumented in source. Be warned that the author may not have intended to support it.
- blit
void blit(Image otherImage, Vecf position)
Merges two images (no alpha blending).
- bytes
ubyte[] bytes()
Gives away bytes as data for an image.
- bytes
void bytes(ubyte[] data)
Accepts bytes as data for an image.
- copy
Image copy(int x, int y, int cWidth, int cHeight)
Redraws the part to a new picture.
- draw
void draw(IRenderer renderer, Vecf position)
Undocumented in source. Be warned that the author may not have intended to support it.
- drawEx
void drawEx(IRenderer renderer, Vecf position, float angle, Vecf center, Vecf size, ubyte alpha, Color!ubyte color)
Undocumented in source. Be warned that the author may not have intended to support it.
- drawning
void drawning(IRenderer render)
Undocumented in source. Be warned that the author may not have intended to support it.
- empty
bool empty()
Whether the data has the current image.
- fill
void fill(Color!ubyte color)
Fills the data with color.
- freeData
void freeData()
- getPixel
Color!ubyte getPixel(int x, int y)
Returns the pixel at the specified location.
- load
Image load(string path)
Loads a surface from a file. Supported formats are described here:
https://code.dlang.org/packages/imageformats
- opIndex
Color!ubyte opIndex(size_t x, size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
- resize
Image resize(uint newWidth, uint newHeight)
- scale
Image scale(float k)
Enlarges the image by a factor.
- scanline
Color!ubyte[] scanline(uint y)
Undocumented in source. Be warned that the author may not have intended to support it.
- scanlines
Color!ubyte[][] scanlines()
Undocumented in source. Be warned that the author may not have intended to support it.
- setPixel
void setPixel(int x, int y, Color!ubyte color)
Sets the pixel to the specified position.
- toTexture
void toTexture()
Converts an image to a texture (i.e. for rendering an image with hardware
acceleration). At the same time, now, when the image is called, the texture
itself will be drawn. You can get such a texture and change its parameters
from the "texture" property.
- toTextureWithoutShape
void toTextureWithoutShape()
Converts an image to a texture (i.e. for rendering an image with hardware
acceleration). At the same time, now, when the image is called, the texture
itself will be drawn. You can get such a texture and change its parameters
from the "texture" property.
- unbind
void unbind(IRenderer render)
Undocumented in source. Be warned that the author may not have intended to support it.
Image description structure. (Colors are in RGBA format.)