Renderer

Abstract class for a video renderer.

Members

Aliases

COLOR
alias COLOR = BGRX
Undocumented in source.

Functions

clear
void clear()

Clear the entire surface.

draw
void draw(int x, int y, TextureSource source, int u0, int v0, int u1, int v1)

Draw a texture.

draw
void draw(float x0, float y0, float x1, float y1, TextureSource source, int u0, int v0, int u1, int v1)

Draw a texture with scaling.

fastLock
Bitmap fastLock()

Lock a 32-bit, BGRX/BGRA surface

fillRect
void fillRect(int x0, int y0, int x1, int y1, COLOR color)

Draw a filled rectangle.

fillRect
void fillRect(float x0, float y0, float x1, float y1, COLOR color)
Undocumented in source.
hline
void hline(int x0, int x1, int y, COLOR color)

Draw a horizontal line.

line
void line(float x0, float y0, float x1, float y1, COLOR color)

Draw a straight line.

lock
Bitmap lock()

Lock a 32-bit, BGRX/BGRA surface

present
void present()

Finalize rendering and present it to the user (flip buffers etc.)

putPixel
void putPixel(int x, int y, COLOR color)

Set a single pixel.

putPixels
void putPixels(Pixel[] pixels)
Undocumented in source. Be warned that the author may not have intended to support it.
shutdown
void shutdown()

Destroy any bound resources

unlock
void unlock()

Unlock what was previously locked

vline
void vline(int x, int y0, int y1, COLOR color)

Draw a vertical line.

Properties

height
uint height [@property getter]
Undocumented in source.
width
uint width [@property getter]

Get geometry.

Structs

Bitmap
struct Bitmap

BGRX/BGRA-only.

Pixel
struct Pixel

Set some pixels.

Variables

canFastLock
bool canFastLock;

True when this renderer can lock quickly (usually when it's rendering in software).

Meta