ImageRef

Represents a reference to COLOR data already existing elsewhere in memory. Assumes that pixels are stored row-by-row, with a known distance between each row.

Members

Functions

scanline
inout(StorageType)[] scanline(xy_t y)

Returns an array for the pixels at row y.

Mixins

__anonymous
mixin DirectView
h
xy_t h;
Undocumented in source.

Variables

pitch
size_t pitch;

In bytes, not COLORs

pixels
StorageType* pixels;
Undocumented in source.
w
xy_t w;
Undocumented in source.

Mixed In Members

From mixin DirectView

StorageType
alias StorageType = Unqual!(typeof(scanline(0)[0]))
Undocumented in source.
COLOR
alias COLOR = Unqual!(typeof(StorageType.init[0]))
Undocumented in source.
opIndex
inout(COLOR) opIndex(xy_t x, xy_t y)

Implements the view[x, y] operator.

Row
struct Row

Allows array-like viewyx access.

opIndex
Row opIndex(xy_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
COLOR opIndexAssign(COLOR value, xy_t x, xy_t y)

Implements the view[x, y] = c operator.

Meta