Image

Undocumented in source.

Constructors

this
this()

Default constructor.

this
this(sfImage* image)
Undocumented in source.

Destructor

~this
~this()

Destructor.

Members

Functions

copyImage
void copyImage(const(Image) source, uint destX, uint destY, IntRect sourceRect, bool applyAlpha)

Copy pixels from another image onto this one.

create
void create(uint width, uint height, Color color)

Create the image and fill it with a unique color.

create
void create(uint width, uint height, const(ubyte)[] pixels)

Create the image from an array of pixels.

createMaskFromColor
void createMaskFromColor(Color maskColor, ubyte alpha)

Create a transparency mask from a specified color-key.

flipHorizontally
void flipHorizontally()

Flip the image horizontally (left <-> right)

flipVertically
void flipVertically()

Flip the image vertically (top <-> bottom)

getPixel
Color getPixel(uint x, uint y)

Get the color of a pixel

getPixelArray
const(ubyte)[] getPixelArray()

Get the read-only array of pixels that make up the image.

getSize
Vector2u getSize()

Return the size (width and height) of the image.

loadFromFile
bool loadFromFile(const(char)[] filename)

Load the image from a file on disk.

loadFromMemory
bool loadFromMemory(const(void)[] data)

Load the image from a file in memory.

saveToFile
bool saveToFile(const(char)[] filename)

Save the image to a file on disk.

setPixel
void setPixel(uint x, uint y, Color color)

Change the color of a pixel.

Properties

dup
Image dup [@property getter]

Create a copy of the Image.

Variables

sfPtr
sfImage* sfPtr;
Undocumented in source.

Meta