dplug.graphics.draw

Drawing functions. Port of ae.utils.graphics.

Members

Functions

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

Gets a pixel's address from a direct view.

putPixel
void putPixel(auto ref 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(auto ref 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(auto ref 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(auto ref 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(auto ref V v, int x, int y, COLOR c)

Unchecked! Make sure area is bounded.

Mixin templates

FixMath
mixin template 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/.