mirror of
https://github.com/riuson/lcd-image-converter.git
synced 2026-03-22 16:06:59 +01:00
31 lines
978 B
C++
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;
|
|
}
|
|
//-----------------------------------------------------------------------------
|