dplug.graphics.draw

Drawing functions. Port of ae.utils.graphics.

Members

Aliases

fill
alias fill = fillAll

Fills the whole writable view with a solid color.

Functions

pixelPtr
ViewColor!V* pixelPtr(V v, int x, int y)

Gets a pixel's address from a direct view.

putPixel
void putPixel(V v, int x, int y, COLOR value)

Forwards to safePut or opIndex, depending on the CHECKED parameter. Allows propagation of a CHECKED parameter from other callers.

rect
void rect(V v, int x1, int y1, int x2, int y2, COLOR c)

Draws a rectangle with a solid line. The coordinates represent bounds (open on the right) for the outside of the rectangle.

safeGet
COLOR safeGet(V v, int x, int y, COLOR def)

Get the pixel color at the specified coordinates, or fall back to the specified default value if the coordinates are out of bounds.

safePut
void safePut(V v, int x, int y, COLOR value)

Set the pixel color at the specified coordinates if the coordinates are not out of bounds.

uncheckedFloodFill
void uncheckedFloodFill(V v, int x, int y, COLOR c)

Unchecked! Make sure area is bounded.

Mixin templates

FixMath
mixintemplate FixMath(ubyte coordinateBitsParam = 16)

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <vladimir@thecybershadow.net> Guillaume Piolat <contact@auburnsounds.com>