canvasity

D Port of canvas_ity.h Modifications: * some SIMD * buffer is passed and external instead of owned, it can be any format * removal of text, gradients, patterns, TODO add them back * integration with gamut and colors

Members

Enums

CanvasCompositeOp
enum CanvasCompositeOp

Compositing operation for blending new drawing and old pixels. The sourceCopy, sourceIn, sourceOut, destinationAtop, and destinationIn operations may clear parts of the canvas outside the new drawing but within the clip region. Defaults to: sourceOver.

CanvasGammaCurve
enum CanvasGammaCurve

The gamma space where colors are manipulated. Proper sRGB conversion to linear and back is very expensive.

CanvasLineCap
enum CanvasLineCap

The shape used to draw the end points of lines.

CanvasLineJoin
enum CanvasLineJoin

The shape used to join two line segments where they meet.

Functions

comparePixelRuns
int comparePixelRuns(pixel_run a, pixel_run b)
Undocumented in source. Be warned that the author may not have intended to support it.
signed_16
int signed_16(Vec!ubyte data, int index)
Undocumented in source. Be warned that the author may not have intended to support it.
signed_32
int signed_32(Vec!ubyte data, int index)
Undocumented in source. Be warned that the author may not have intended to support it.
signed_8
int signed_8(Vec!ubyte data, int index)
Undocumented in source. Be warned that the author may not have intended to support it.
unsigned_16
int unsigned_16(Vec!ubyte data, int index)
Undocumented in source. Be warned that the author may not have intended to support it.
unsigned_8
int unsigned_8(Vec!ubyte data, int index)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

CanvasOptions
struct CanvasOptions

Options you can give while initializing a Canvasity.

Canvasity
struct Canvasity

Main canvas API. Given an image buffer, a Canvasity can draw 2D shapes without any GPU usage.

Meta