Files
lcd-image-converter/classes/bitmapcontainer.cpp
Vladimir 60c0594507 Project renamed.
Added scaled view for image (from BitmapContainer).
2010-12-17 17:27:33 +05:00

31 lines
978 B
C++

#include "bitmapcontainer.h"
#include <QColor>
#include <QImage>
//-----------------------------------------------------------------------------
BitmapContainer::BitmapContainer(QObject *parent) :
QObject(parent)
{
//this->mImage = NULL;
this->mImage = new QImage(":/images/template");
//this->createNew(10, 10);
}
//-----------------------------------------------------------------------------
void BitmapContainer::createNew(quint32 width, quint32 height)
{
if (this->mImage != NULL)
delete this->mImage;
this->mImage = new QImage(width, height, QImage::Format_RGB32);
}
//-----------------------------------------------------------------------------
void BitmapContainer::inverse()
{
this->mImage->invertPixels();
}
//-----------------------------------------------------------------------------
QImage *BitmapContainer::image()
{
return this->mImage;
}
//-----------------------------------------------------------------------------