dplug.graphics.drawex

Members

Classes

OwnedImage
class OwnedImage(COLOR)

Manually managed image which is also GC-proof.

Functions

aaFillRectFloat
void aaFillRectFloat(V v, float x1, float y1, float x2, float y2, COLOR color, float globalAlpha)
Undocumented in source. Be warned that the author may not have intended to support it.
aaFillSector
void aaFillSector(V v, float x, float y, float r0, float r1, float a0, float a1, COLOR c)

Rough anti-aliased fillsector

aaPutPixelFloat
void aaPutPixelFloat(V v, int x, int y, COLOR color, A alpha)
Undocumented in source. Be warned that the author may not have intended to support it.
aaSoftCircle
void aaSoftCircle(V v, float x, float y, float r1, float r2, float r3, COLOR color, float globalAlpha)

Draw a circle gradually fading in between r1 and r2 and fading out between r2 and r3

aaSoftDisc
void aaSoftDisc(V v, float x, float y, float r1, float r2, COLOR color, float globalAlpha)
Undocumented in source. Be warned that the author may not have intended to support it.
aaSoftEllipse
void aaSoftEllipse(V v, float x, float y, float r1, float r2, float scaleX, float scaleY, COLOR color, float globalAlpha)
Undocumented in source. Be warned that the author may not have intended to support it.
blendWithAlpha
void blendWithAlpha(SRC srcView, DST dstView, ImageRef!L8 alphaView)

Blits a view onto another. The views must have the same size. PERF: optimize that

crop
auto crop(V src, box2i b)

Crop a view from a box2i

cropImageRef
ImageRef!COLOR cropImageRef(ImageRef!COLOR src, box2i rect)

Crop an ImageRef and get an ImageRef instead of a Voldemort type. This also avoid adding offset to coordinates.

fillRectFloat
void fillRectFloat(V v, int x1, int y1, int x2, int y2, COLOR b, float globalAlpha)
Undocumented in source. Be warned that the author may not have intended to support it.
horizontalSlope
void horizontalSlope(V v, box2i rect, COLOR c0, COLOR c1)

Fill rectangle while interpolating a color horiontally

loadImageSeparateAlpha
OwnedImage!RGBA loadImageSeparateAlpha(void[] imageDataRGB, void[] imageDataAlpha)

Loads two different images: - the 1st is the RGB channels - the 2nd is interpreted as greyscale and fetch in the alpha channel of the result. The OwnedImage is allocated with mallocEmplace and should be destroyed with destroyFree.

loadOwnedImage
OwnedImage!RGBA loadOwnedImage(void[] imageData)

The one function you probably want to use. Loads an image from a static array. The OwnedImage is allocated with mallocEmplace and should be destroyed with destroyFree.

readImageFromMem
IFImage readImageFromMem(const(ubyte[]) imageData, int channels)
Undocumented in source. Be warned that the author may not have intended to support it.
verticalSlope
void verticalSlope(V v, box2i rect, COLOR c0, COLOR c1)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

IFImage
struct IFImage
Undocumented in source.

Meta

Authors

Guillaume Piolat