IDrawable

The interface for normal rendering by coordinates. All properties are specified in the constructor at best.

Members

Functions

draw
void draw(IRenderer renderer, Vecf position)

draw object implemetation

Examples

class Rectangle : IDrawable
{
    public
    {
        uint width, height;
        Color!ubyte color;
    }

    this(uint width,uint height,Color!ubyte color);

    override void draw(IRenderer renderer,Vecf position) @safe
    {
        renderer.rectangle(position,width,height,color,true);
    }
}

Meta