SDL2Renderer

Use SDL 2 drawing APIs.

Constructors

this
this(SDL_Renderer* renderer, uint w, uint h)
Undocumented in source.

Members

Functions

clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(int x, int y, TextureSource source, int u0, int v0, int u1, int v1)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(float x0, float y0, float x1, float y1, TextureSource source, int u0, int v0, int u1, int v1)
Undocumented in source. Be warned that the author may not have intended to support it.
fastLock
Bitmap fastLock()
Undocumented in source. Be warned that the author may not have intended to support it.
fillRect
void fillRect(int x0, int y0, int x1, int y1, COLOR color)
Undocumented in source. Be warned that the author may not have intended to support it.
fillRect
void fillRect(float x0, float y0, float x1, float y1, COLOR color)
Undocumented in source. Be warned that the author may not have intended to support it.
hline
void hline(int x0, int x1, int y, COLOR color)
Undocumented in source. Be warned that the author may not have intended to support it.
line
void line(float x0, float y0, float x1, float y1, COLOR color)
Undocumented in source. Be warned that the author may not have intended to support it.
lock
Bitmap lock()
Undocumented in source. Be warned that the author may not have intended to support it.
present
void present()
Undocumented in source. Be warned that the author may not have intended to support it.
putPixel
void putPixel(int x, int y, COLOR color)
Undocumented in source. Be warned that the author may not have intended to support it.
putPixels
void putPixels(Pixel[] pixels)
Undocumented in source. Be warned that the author may not have intended to support it.
shutdown
void shutdown()
Undocumented in source. Be warned that the author may not have intended to support it.
unlock
void unlock()
Undocumented in source. Be warned that the author may not have intended to support it.
vline
void vline(int x, int y0, int y1, COLOR color)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

height
uint height [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
width
uint width [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

h
uint h;

Width and height.

renderer
SDL_Renderer* renderer;

SDL renderer object.

w
uint w;

Width and height.

Inherited Members

From Renderer

COLOR
alias COLOR = BGRX
Undocumented in source.
Bitmap
struct Bitmap

BGRX/BGRA-only.

canFastLock
bool canFastLock;

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

fastLock
Bitmap fastLock()
lock
Bitmap lock()

Lock a 32-bit, BGRX/BGRA surface

unlock
void unlock()

Unlock what was previously locked

present
void present()

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

shutdown
void shutdown()

Destroy any bound resources

width
uint width [@property getter]

Get geometry.

height
uint height [@property getter]
Undocumented in source.
putPixel
void putPixel(int x, int y, COLOR color)

Set a single pixel.

Pixel
struct Pixel

Set some pixels.

putPixels
void putPixels(Pixel[] pixels)
Undocumented in source. Be warned that the author may not have intended to support it.
line
void line(float x0, float y0, float x1, float y1, COLOR color)

Draw a straight line.

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

Draw a vertical line.

hline
void hline(int x0, int x1, int y, COLOR color)

Draw a horizontal line.

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.
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.

Meta