#include "RasterPainter.h"

#include "DrawingSurface.h"
#include "DrawingContext.h"
#include "Grid.h"

RasterPainter::RasterPainter()
     : mGrid(std::make_unique<Grid<unsigned char> >(Rectangle(Point(0, 0), Point(100, 100))))
{

}

void RasterPainter::paint(DrawingContext* context)
{
    const auto width = context->getSurface()->getWidth();
    const auto height = context->getSurface()->getHeight();
    mGrid->resetBounds(Rectangle(Point(0, 0), Point(width, height)));

    /*
    for (unsigned idx=0; idx< context->getNumItems(); idx++)
    {
        context->getDrawable(idx)->sample(mGrid.get());
    }

    context->getSurface()->getImage()->setData(mGrid->getValues());
    */
}
