mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-13 20:00:32 +02:00
Merge branch 'dev' into dev-warnings
This commit is contained in:
@@ -59,13 +59,16 @@ void IntelliImage::drawPixel(const QPoint &p1, const QColor& color){
|
||||
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||
}
|
||||
// Used to draw on the widget
|
||||
QPainter painter(&imageData);
|
||||
QPainter* painter = new QPainter(&imageData);
|
||||
|
||||
// Set the current settings for the pen
|
||||
painter.setPen(QPen(color, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
painter->setPen(QPen(color, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
|
||||
// Draw a line from the last registered point to the current
|
||||
painter.drawPoint(p1);
|
||||
painter->drawPoint(p1);
|
||||
delete painter;
|
||||
painter = nullptr;
|
||||
|
||||
if(fastRenderering) {
|
||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||
}
|
||||
@@ -76,12 +79,15 @@ void IntelliImage::drawPoint(const QPoint &p1, const QColor& color, const int& p
|
||||
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||
}
|
||||
// Used to draw on the widget
|
||||
QPainter painter(&imageData);
|
||||
QPainter* painter = new QPainter(&imageData);
|
||||
|
||||
// Set the current settings for the pen
|
||||
painter.setPen(QPen(color, penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
painter->setPen(QPen(color, penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
// Draw a line from the last registered point to the current
|
||||
painter.drawPoint(p1);
|
||||
painter->drawPoint(p1);
|
||||
delete painter;
|
||||
|
||||
painter = nullptr;
|
||||
if(fastRenderering) {
|
||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||
}
|
||||
@@ -92,13 +98,16 @@ void IntelliImage::drawLine(const QPoint &p1, const QPoint& p2, const QColor& co
|
||||
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||
}
|
||||
// Used to draw on the widget
|
||||
QPainter painter(&imageData);
|
||||
QPainter* painter = new QPainter(&imageData);
|
||||
|
||||
// Set the current settings for the pen
|
||||
painter.setPen(QPen(color, penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
painter->setPen(QPen(color, penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
|
||||
// Draw a line from the last registered point to the current
|
||||
painter.drawLine(p1, p2);
|
||||
painter->drawLine(p1, p2);
|
||||
delete painter;
|
||||
painter = nullptr;
|
||||
|
||||
if(fastRenderering) {
|
||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||
}
|
||||
|
||||
@@ -11,12 +11,16 @@
|
||||
#include "IntelliHelper/IntelliTriangulation.h"
|
||||
#include "IntelliHelper/IntelliRenderSettings.h"
|
||||
|
||||
//for unit testing
|
||||
class UnitTest;
|
||||
|
||||
class IntelliTool;
|
||||
|
||||
/*!
|
||||
* \brief An abstract class which manages the basic IntelliImage operations.
|
||||
*/
|
||||
class IntelliImage {
|
||||
friend UnitTest;
|
||||
friend IntelliTool;
|
||||
public:
|
||||
|
||||
|
||||
@@ -47,6 +47,5 @@ QImage IntelliRasterImage::getDisplayable(const QSize& displaySize, int alpha){
|
||||
}
|
||||
|
||||
void IntelliRasterImage::setPolygon(const std::vector<QPoint>& polygonData){
|
||||
qDebug() << "Raster Image has no polygon data " << polygonData.size() << "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
|
||||
#include "Image/IntelliImage.h"
|
||||
|
||||
//for unit testing
|
||||
class UnitTest;
|
||||
|
||||
/*!
|
||||
* \brief The IntelliRasterImage manages a RASTERIMAGE.
|
||||
*/
|
||||
class IntelliRasterImage : public IntelliImage {
|
||||
friend UnitTest;
|
||||
friend IntelliTool;
|
||||
protected:
|
||||
/*!
|
||||
|
||||
@@ -4,10 +4,14 @@
|
||||
#include "Image/IntelliRasterImage.h"
|
||||
#include <vector>
|
||||
|
||||
//for unit testing
|
||||
class UnitTest;
|
||||
|
||||
/*!
|
||||
* \brief The IntelliShapedImage manages a Shapedimage.
|
||||
*/
|
||||
class IntelliShapedImage : public IntelliRasterImage {
|
||||
friend UnitTest;
|
||||
friend IntelliTool;
|
||||
private:
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user