Image

An in-memory image. Pixels are stored as contiguous scanlines, with each scanline consisting of one or more StorageType.

Constructors

this
this(xy_t w, xy_t h)
Undocumented in source.

Members

Functions

rowSize
size_t rowSize()

Number of StorageType per scanline (row).

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

Returns an array for the pixels at row y.

size
void size(xy_t w, xy_t h)

Does not scale image

Mixins

__anonymous
mixin DirectView
Undocumented in source.

Properties

visiblePixels
inout(StorageType)[] visiblePixels [@property getter]

Returns the visible part of pixels (i.e. covered by wxh). The pixels array may actually be larger.

Variables

h
xy_t h;

Geometry.

pixels
StorageType[] pixels;

Array of pixels, in row-major order.

w
xy_t w;

Geometry.

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