IntelliShapedImage.h
Go to the documentation of this file.
#ifndef INTELLISHAPE_H
#define INTELLISHAPE_H
#include "Image/IntelliRasterImage.h"
#include <vector>
//for unit testing
class UnitTest;
class IntelliShapedImage : public IntelliRasterImage {
friend UnitTest;
friend IntelliTool;
private:
std::vector<Triangle> triangles;
virtual void calculateVisiblity() override;
protected:
std::vector<QPoint> polygonData;
public:
IntelliShapedImage(int width, int height, bool fastRendererOn);
virtual ~IntelliShapedImage() override;
virtual QImage getDisplayable(const QSize& displaySize, int alpha = 255) override;
virtual QImage getDisplayable(int alpha = 255) override;
virtual IntelliImage* getDeepCopy() override;
virtual std::vector<QPoint> getPolygonData() override {
return polygonData;
}
virtual void setPolygon(const std::vector<QPoint>& polygonData) override;
virtual std::vector<QPoint> getPolygon() override;
};
#endif
IntelliShapedImage::getDisplayable
virtual QImage getDisplayable(const QSize &displaySize, int alpha=255) override
A function returning the displayable ImageData in a requested transparence and size.
Definition: IntelliShapedImage.cpp:69
IntelliShapedImage::getPolygon
virtual std::vector< QPoint > getPolygon() override
getPolygon
Definition: IntelliShapedImage.cpp:114
IntelliShapedImage
The IntelliShapedImage manages a Shapedimage.
Definition: IntelliShapedImage.h:13
IntelliShapedImage::getDeepCopy
virtual IntelliImage * getDeepCopy() override
A function that copys all that returns a [allocated] Image.
Definition: IntelliShapedImage.cpp:20
IntelliRasterImage.h
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:17
IntelliShapedImage::getPolygonData
virtual std::vector< QPoint > getPolygonData() override
A function that returns the Polygondata if existent.
Definition: IntelliShapedImage.h:71
UnitTest
Definition: mainUnitTest.cpp:8
IntelliImage
An abstract class which manages the basic IntelliImage operations.
Definition: IntelliImage.h:30
IntelliShapedImage::polygonData
std::vector< QPoint > polygonData
The Vertices of The Polygon. Needs to be a planar Polygon.
Definition: IntelliShapedImage.h:31
IntelliShapedImage::IntelliShapedImage
IntelliShapedImage(int width, int height, bool fastRendererOn)
The Construcor of the IntelliShapedImage. Given the Image dimensions.
Definition: IntelliShapedImage.cpp:7
IntelliShapedImage::~IntelliShapedImage
virtual ~IntelliShapedImage() override
An Destructor.
Definition: IntelliShapedImage.cpp:12
IntelliRasterImage
The IntelliRasterImage manages a RASTERIMAGE.
Definition: IntelliRasterImage.h:12
IntelliShapedImage::setPolygon
virtual void setPolygon(const std::vector< QPoint > &polygonData) override
A function that sets the data of the visible Polygon.
Definition: IntelliShapedImage.cpp:87