IntelliPhoto 0.6

IntelliShapedImage.h
Go to the documentation of this file.
1 #ifndef INTELLISHAPE_H
2 #define INTELLISHAPE_H
3
4 #include "Image/IntelliRasterImage.h"
5 #include <vector>
6
7 //for unit testing
8 class UnitTest;
9
13 class IntelliShapedImage : public IntelliRasterImage {
14 friend UnitTest;
15 friend IntelliTool;
16 private:
20 std::vector<Triangle> triangles;
21
25 virtual void calculateVisiblity() override;
26 protected:
27
31 std::vector<QPoint> polygonData;
32 public:
39 IntelliShapedImage(int width, int height, bool fastRendererOn);
40
41 IntelliShapedImage* copy(const IntelliShapedImage& image);
45 virtual ~IntelliShapedImage() override;
46
53 virtual QImage getDisplayable(const QSize& displaySize, int alpha = 255) override;
54
60 virtual QImage getDisplayable(int alpha = 255) override;
61
66 virtual IntelliImage* getDeepCopy() override;
67
72 virtual std::vector<QPoint> getPolygonData() override {
73 return polygonData;
74 }
75
80 virtual void setPolygon(const std::vector<QPoint>& polygonData) override;
81
82
87 virtual std::vector<QPoint> getPolygon() override;
88 };
89
90
91 #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:77
IntelliShapedImage::copy
IntelliShapedImage * copy(const IntelliShapedImage &image)
Definition: IntelliShapedImage.cpp:13
IntelliShapedImage::getPolygon
virtual std::vector< QPoint > getPolygon() override
getPolygon
Definition: IntelliShapedImage.cpp:122
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:28
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:72
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:20
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:95