paysages3d/src/render/software/CanvasPreview.cpp

23 lines
446 B
C++
Raw Normal View History

2014-06-10 13:13:16 +00:00
#include "CanvasPreview.h"
CanvasPreview::CanvasPreview()
{
width = 1;
height = 1;
pixels = new CanvasPreviewPixel[1];
}
CanvasPreview::~CanvasPreview()
{
delete [] pixels;
}
void CanvasPreview::setSize(int real_width, int real_height, int preview_width, int preview_height)
{
delete [] pixels;
pixels = new CanvasPreviewPixel[preview_width * preview_height];
width = preview_width;
height = preview_height;
}