Polygon Fixes

Polygon kann jetzt im Shaped-Image nicht außerhalb des Polygons gestartet werden
This commit is contained in:
AshBastian
2020-01-07 17:39:52 +01:00
parent 011026899c
commit e540bd64f2
11 changed files with 67 additions and 21 deletions

View File

@@ -8,13 +8,7 @@
#include <QWidget>
#include <vector>
/*!
* \brief The Types, which an Image can be.
*/
enum class ImageType {
Raster_Image,
Shaped_Image
};
#include "IntelliHelper/IntelliHelper.h"
class IntelliTool;
@@ -23,6 +17,16 @@ class IntelliTool;
*/
class IntelliImage {
friend IntelliTool;
public:
/*!
* \brief The Types, which an Image can be.
*/
enum class ImageType {
Raster_Image,
Shaped_Image
};
protected:
void resizeImage(QImage*image, const QSize &newSize);
@@ -30,6 +34,11 @@ void resizeImage(QImage*image, const QSize &newSize);
* \brief The underlying image data.
*/
QImage imageData;
/*!
* \brief The Type, an Image is.
*/
ImageType TypeOfImage;
public:
/*!
* \brief The Construcor of the IntelliImage. Given the Image dimensions.
@@ -114,6 +123,10 @@ virtual std::vector<QPoint> getPolygonData(){
return std::vector<QPoint>();
}
virtual ImageType getTypeOfImage(){
return TypeOfImage;
}
/*!
* \brief A function that loads and sclaes an image to the fitting dimensions.
* \param filePath - The path+name of the image which to loaded.