mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-16 21:30:31 +02:00
Added fix draft
This commit is contained in:
@@ -255,7 +255,7 @@ void UnitTest::test_setAlpha(){
|
|||||||
void UnitTest::test_floodFill(){
|
void UnitTest::test_floodFill(){
|
||||||
area->addLayer(200,200,10,20,IntelliImage::ImageType::SHAPEDIMAGE);
|
area->addLayer(200,200,10,20,IntelliImage::ImageType::SHAPEDIMAGE);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
QPoint point;
|
QPoint point;
|
||||||
for(size_t i = 0; i<200; i++) {
|
for(size_t i = 0; i<200; i++) {
|
||||||
point.setX(static_cast<int>(i));
|
point.setX(static_cast<int>(i));
|
||||||
@@ -265,7 +265,7 @@ void UnitTest::test_floodFill(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
area->floodFill(0,0,0,0);
|
area->layerBundle[0].image->drawPlain(QColor(0, 0, 0, 0));
|
||||||
for(size_t i = 0; i<200; i++) {
|
for(size_t i = 0; i<200; i++) {
|
||||||
point.setX(static_cast<int>(i));
|
point.setX(static_cast<int>(i));
|
||||||
for(size_t j = 0; i<200; i++) {
|
for(size_t j = 0; i<200; i++) {
|
||||||
@@ -274,7 +274,7 @@ void UnitTest::test_floodFill(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
area->floodFill(-1,-1,-1,-1);
|
area->layerBundle[0].image->drawPlain(QColor(-1, -1, -1, -1));
|
||||||
for(size_t i = 0; i<200; i++) {
|
for(size_t i = 0; i<200; i++) {
|
||||||
point.setX(static_cast<int>(i));
|
point.setX(static_cast<int>(i));
|
||||||
for(size_t j = 0; i<200; i++) {
|
for(size_t j = 0; i<200; i++) {
|
||||||
@@ -283,7 +283,7 @@ void UnitTest::test_floodFill(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
area->floodFill(256,256,256,256);
|
area->layerBundle[0].image->drawPlain(QColor(256, 256, 256, 256));
|
||||||
for(size_t i = 0; i<200; i++) {
|
for(size_t i = 0; i<200; i++) {
|
||||||
point.setX(static_cast<int>(i));
|
point.setX(static_cast<int>(i));
|
||||||
for(size_t j = 0; i<200; i++) {
|
for(size_t j = 0; i<200; i++) {
|
||||||
@@ -299,7 +299,7 @@ void UnitTest::test_moveActive(){
|
|||||||
area->addLayer(200,200,10,20,IntelliImage::ImageType::SHAPEDIMAGE);
|
area->addLayer(200,200,10,20,IntelliImage::ImageType::SHAPEDIMAGE);
|
||||||
area->addLayer(200,200,10,20,IntelliImage::ImageType::SHAPEDIMAGE);
|
area->addLayer(200,200,10,20,IntelliImage::ImageType::SHAPEDIMAGE);
|
||||||
|
|
||||||
area->floodFill(0,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(0, 0, 0, 255));
|
||||||
QPoint point(0,0);
|
QPoint point(0,0);
|
||||||
|
|
||||||
area->moveActiveLayer(-1);
|
area->moveActiveLayer(-1);
|
||||||
@@ -407,7 +407,7 @@ void UnitTest::test_RasterImage_drawPixel(){
|
|||||||
|
|
||||||
QPoint point(0,0);
|
QPoint point(0,0);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawPixel(point, QColor(0,0,0,255));
|
area->layerBundle[0].image->drawPixel(point, QColor(0,0,0,255));
|
||||||
|
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point) == QColor(0,0,0,255));
|
||||||
@@ -423,14 +423,14 @@ void UnitTest::test_RasterImage_drawLine(){
|
|||||||
QPoint point3(5,5);
|
QPoint point3(5,5);
|
||||||
QPoint point4(6,5);
|
QPoint point4(6,5);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),1);
|
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),1);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point3)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point3)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point4)==QColor(255,255,255,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point4)==QColor(255,255,255,255));
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),3);
|
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),3);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
||||||
@@ -446,13 +446,13 @@ void UnitTest::test_RasterImage_drawPoint(){
|
|||||||
QPoint point1(5,5);
|
QPoint point1(5,5);
|
||||||
QPoint point2(5,6);
|
QPoint point2(5,6);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),1);
|
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),1);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(255,255,255,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(255,255,255,255));
|
||||||
|
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),5);
|
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),5);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(0,0,0,255));
|
||||||
@@ -463,7 +463,7 @@ void UnitTest::test_RasterImage_drawPoint(){
|
|||||||
void UnitTest::test_RasterImage_getDisplayable(){
|
void UnitTest::test_RasterImage_getDisplayable(){
|
||||||
area->addLayer(200,200,10,20,IntelliImage::ImageType::RASTERIMAGE);
|
area->addLayer(200,200,10,20,IntelliImage::ImageType::RASTERIMAGE);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
QImage img = area->layerBundle[0].image->getDisplayable(QSize(200,200),255);
|
QImage img = area->layerBundle[0].image->getDisplayable(QSize(200,200),255);
|
||||||
QPoint point;
|
QPoint point;
|
||||||
for(size_t i=0; i<200; i++) {
|
for(size_t i=0; i<200; i++) {
|
||||||
@@ -481,7 +481,7 @@ void UnitTest::test_RasterImage_getPixelColor(){
|
|||||||
area->addLayer(200,200,10,20,IntelliImage::ImageType::RASTERIMAGE);
|
area->addLayer(200,200,10,20,IntelliImage::ImageType::RASTERIMAGE);
|
||||||
|
|
||||||
QPoint point(0,0);
|
QPoint point(0,0);
|
||||||
area->floodFill(0,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(0, 0, 0, 255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point)==QColor(0,0,0,255));
|
||||||
|
|
||||||
area->deleteLayer(0);
|
area->deleteLayer(0);
|
||||||
@@ -542,7 +542,7 @@ void UnitTest::test_ShapedImage_drawPixel(){
|
|||||||
|
|
||||||
QPoint point(0,0);
|
QPoint point(0,0);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawPixel(point, QColor(0,0,0,255));
|
area->layerBundle[0].image->drawPixel(point, QColor(0,0,0,255));
|
||||||
|
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point) == QColor(0,0,0,255));
|
||||||
@@ -558,14 +558,14 @@ void UnitTest::test_ShapedImage_drawLine(){
|
|||||||
QPoint point3(5,5);
|
QPoint point3(5,5);
|
||||||
QPoint point4(6,5);
|
QPoint point4(6,5);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),1);
|
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),1);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point3)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point3)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point4)==QColor(255,255,255,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point4)==QColor(255,255,255,255));
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),3);
|
area->layerBundle[0].image->drawLine(point1, point2, QColor(0,0,0,255),3);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1)==QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2)==QColor(0,0,0,255));
|
||||||
@@ -581,13 +581,13 @@ void UnitTest::test_ShapedImage_drawPoint(){
|
|||||||
QPoint point1(5,5);
|
QPoint point1(5,5);
|
||||||
QPoint point2(5,6);
|
QPoint point2(5,6);
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),1);
|
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),1);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(255,255,255,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(255,255,255,255));
|
||||||
|
|
||||||
|
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),5);
|
area->layerBundle[0].image->drawPoint(point1, QColor(0,0,0,255),5);
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point1) == QColor(0,0,0,255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point2) == QColor(0,0,0,255));
|
||||||
@@ -611,7 +611,7 @@ void UnitTest::test_ShapedImage_getDisplayable(){
|
|||||||
QPoint(20,20),
|
QPoint(20,20),
|
||||||
QPoint(10,10)
|
QPoint(10,10)
|
||||||
};
|
};
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
area->layerBundle[0].image->setPolygon(points);
|
area->layerBundle[0].image->setPolygon(points);
|
||||||
QSize size(21,21);
|
QSize size(21,21);
|
||||||
QImage img = area->layerBundle[0].image->getDisplayable(size,255);
|
QImage img = area->layerBundle[0].image->getDisplayable(size,255);
|
||||||
@@ -634,7 +634,7 @@ void UnitTest::test_ShapedImage_getPixelColor(){
|
|||||||
area->addLayer(200,200,10,20,IntelliImage::ImageType::RASTERIMAGE);
|
area->addLayer(200,200,10,20,IntelliImage::ImageType::RASTERIMAGE);
|
||||||
|
|
||||||
QPoint point(0,0);
|
QPoint point(0,0);
|
||||||
area->floodFill(0,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(0, 0, 0, 255));
|
||||||
QVERIFY(area->layerBundle[0].image->getPixelColor(point)==QColor(0,0,0,255));
|
QVERIFY(area->layerBundle[0].image->getPixelColor(point)==QColor(0,0,0,255));
|
||||||
|
|
||||||
area->deleteLayer(0);
|
area->deleteLayer(0);
|
||||||
@@ -695,7 +695,7 @@ void UnitTest::test_Circle_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createCircleTool();
|
area->createCircleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -715,7 +715,7 @@ void UnitTest::test_Circle_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createCircleTool();
|
area->createCircleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -739,7 +739,7 @@ void UnitTest::test_FloodFill_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createFloodFillTool();
|
area->createFloodFillTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -759,7 +759,7 @@ void UnitTest::test_FloodFill_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createFloodFillTool();
|
area->createFloodFillTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -782,7 +782,7 @@ void UnitTest::test_Line_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createLineTool();
|
area->createLineTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -802,7 +802,7 @@ void UnitTest::test_Line_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createLineTool();
|
area->createLineTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -824,7 +824,7 @@ void UnitTest::test_Pen_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPenTool();
|
area->createPenTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -844,7 +844,7 @@ void UnitTest::test_Pen_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPenTool();
|
area->createPenTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -866,7 +866,7 @@ void UnitTest::test_Plain_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPlainTool();
|
area->createPlainTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -886,7 +886,7 @@ void UnitTest::test_Plain_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPlainTool();
|
area->createPlainTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -923,7 +923,7 @@ void UnitTest::test_Polygon_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPolygonTool();
|
area->createPolygonTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
||||||
area->Tool->onMouseLeftReleased(points[0].x(), points[0].y());
|
area->Tool->onMouseLeftReleased(points[0].x(), points[0].y());
|
||||||
@@ -980,7 +980,7 @@ void UnitTest::test_Polygon_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPolygonTool();
|
area->createPolygonTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
||||||
area->Tool->onMouseLeftReleased(points[0].x(), points[0].y());
|
area->Tool->onMouseLeftReleased(points[0].x(), points[0].y());
|
||||||
@@ -1021,7 +1021,7 @@ void UnitTest::test_Rectangle_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createRectangleTool();
|
area->createRectangleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,150);
|
QPoint point2(150,150);
|
||||||
@@ -1043,7 +1043,7 @@ void UnitTest::test_Rectangle_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createRectangleTool();
|
area->createRectangleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,150);
|
QPoint point2(150,150);
|
||||||
@@ -1091,7 +1091,6 @@ void UnitTest::test_Triangulation_Coverage(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///Benchmarks here
|
///Benchmarks here
|
||||||
|
|
||||||
void UnitTest::bench_addLayer(){
|
void UnitTest::bench_addLayer(){
|
||||||
@@ -1134,7 +1133,7 @@ void UnitTest::bench_floodFill(){
|
|||||||
area->addLayer(200,200,0,0,IntelliImage::ImageType::RASTERIMAGE);
|
area->addLayer(200,200,0,0,IntelliImage::ImageType::RASTERIMAGE);
|
||||||
|
|
||||||
QBENCHMARK{
|
QBENCHMARK{
|
||||||
area->floodFill(255,255,255,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 255, 255, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
area->deleteLayer(0);
|
area->deleteLayer(0);
|
||||||
@@ -1390,7 +1389,7 @@ void UnitTest::bench_Circle_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createCircleTool();
|
area->createCircleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1408,7 +1407,7 @@ void UnitTest::bench_Circle_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createCircleTool();
|
area->createCircleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1429,7 +1428,7 @@ void UnitTest::bench_FloodFill_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createFloodFillTool();
|
area->createFloodFillTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1447,7 +1446,7 @@ void UnitTest::bench_FloodFill_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createFloodFillTool();
|
area->createFloodFillTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1468,7 +1467,7 @@ void UnitTest::bench_Line_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createLineTool();
|
area->createLineTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1486,7 +1485,7 @@ void UnitTest::bench_Line_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createLineTool();
|
area->createLineTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1507,7 +1506,7 @@ void UnitTest::bench_Pen_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPenTool();
|
area->createPenTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1525,7 +1524,7 @@ void UnitTest::bench_Pen_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPenTool();
|
area->createPenTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1545,7 +1544,7 @@ void UnitTest::bench_Plain_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPlainTool();
|
area->createPlainTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1563,7 +1562,7 @@ void UnitTest::bench_Plain_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPlainTool();
|
area->createPlainTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,100);
|
QPoint point2(150,100);
|
||||||
@@ -1590,7 +1589,7 @@ void UnitTest::bench_Polygon_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPolygonTool();
|
area->createPolygonTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QBENCHMARK{
|
QBENCHMARK{
|
||||||
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
||||||
@@ -1627,7 +1626,7 @@ void UnitTest::bench_Polygon_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createPolygonTool();
|
area->createPolygonTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QBENCHMARK{
|
QBENCHMARK{
|
||||||
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
area->Tool->onMouseLeftPressed(points[0].x(), points[0].y());
|
||||||
@@ -1646,7 +1645,7 @@ void UnitTest::bench_Rectangle_fullDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createRectangleTool();
|
area->createRectangleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,150);
|
QPoint point2(150,150);
|
||||||
@@ -1665,7 +1664,7 @@ void UnitTest::bench_Rectangle_interruptedDraw(){
|
|||||||
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
area->colorPicker.setFirstColor(QColor(255,255,255,255));
|
||||||
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
area->colorPicker.setSecondColor(QColor(0,0,0,255));
|
||||||
area->createRectangleTool();
|
area->createRectangleTool();
|
||||||
area->floodFill(255,0,0,255);
|
area->layerBundle[0].image->drawPlain(QColor(255, 0, 0, 255));
|
||||||
|
|
||||||
QPoint point1(100,100);
|
QPoint point1(100,100);
|
||||||
QPoint point2(150,150);
|
QPoint point2(150,150);
|
||||||
@@ -1710,9 +1709,6 @@ void UnitTest::bench_Triangulation_Coverage(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QTEST_MAIN(UnitTest)
|
QTEST_MAIN(UnitTest)
|
||||||
|
|
||||||
#include "tst_unittest.moc"
|
#include "tst_unittest.moc"
|
||||||
|
|||||||
Reference in New Issue
Block a user