- copy
Canvas copy(Canvas canvas)
- draw
void draw(Vec2f pos, Vec2f anchor)
Draw the texture at the specified location.
Render the whole texture here
- draw
void draw(Vec2f pos, Vec4i srcRect, Vec2f anchor)
Render a section of the texture here
- draw
void draw(Vec2f pos, Vec2f size, Vec2f anchor)
Render the whole texture here
- draw
void draw(Vec2f pos, Vec2f size, Vec4i srcRect, Vec2f anchor)
Render a section of the texture here
- draw
void draw(Vec2f pos, Vec2f size, Vec4i srcRect, float angle, Flip flip, Vec2f anchor)
Render a section of the texture here
- setSmooth
void setSmooth(bool isSmooth_)
Toggle the canvas smoothing
- alpha
float alpha [@property getter]
float alpha [@property setter]
- blend
Blend blend [@property getter]
Blend blend [@property setter]
- color
Color color [@property getter]
Color color [@property setter]
Color added to the canvas.
- height
uint height [@property getter]
- isLoaded
bool isLoaded [@property getter]
- renderSize
Vec2i renderSize [@property getter]
Vec2i renderSize [@property setter]
The size (in texels) of the surface to be rendered on.
Changing that value allocate a new texture, so don't do it everytime.
- target
const(SDL_Texture*) target [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- width
uint width [@property getter]
- isLoaded
bool isLoaded [@property getter]
- width
uint width [@property getter]
- height
uint height [@property getter]
- color
Color color [@property getter]
Color color [@property setter]
Color added to the renderable.
- alpha
float alpha [@property getter]
float alpha [@property setter]
- blend
Blend blend [@property getter]
Blend blend [@property setter]
- draw
void draw(Vec2f pos, Vec2f anchor)
Render the whole texture here
- draw
void draw(Vec2f pos, Vec4i srcRect, Vec2f anchor)
Render a section of the texture here
- draw
void draw(Vec2f pos, Vec2f size, Vec2f anchor)
Render the whole texture here
- draw
void draw(Vec2f pos, Vec2f size, Vec4i srcRect, Vec2f anchor)
Render a section of the texture here
- draw
void draw(Vec2f pos, Vec2f size, Vec4i srcRect, float angle, Flip flip, Vec2f anchor)
Render a section of the texture here
Behave like Texture but you can render onto it. Use pushCanvas/popCanvas to start the drawing region on it.