Go to the documentation of this file.
26 void IntelliShapedImage::calculateVisiblity(){
45 clr.setAlpha(std::min(255, clr.alpha()));
56 for(
int y = 0; y<copy.height(); y++) {
57 for(
int x = 0; x<copy.width(); x++) {
58 QColor clr = copy.pixelColor(x,y);
59 clr.setAlpha(std::min(alpha,clr.alpha()));
60 copy.setPixelColor(x,y, clr);
63 return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
68 this->polygonData.clear();
70 this->polygonData.clear();
72 this->polygonData.push_back(QPoint(element.x(), element.y()));
virtual QImage getDisplayable(const QSize &displaySize, int alpha=255) override
A function returning the displayable ImageData in a requested transparence and size.
The IntelliShapedImage manages a Shapedimage.
virtual IntelliImage * getDeepCopy() override
A function that copys all that returns a [allocated] Image.
bool isInPolygon(std::vector< Triangle > &triangles, QPoint &point)
A function to check if a point lies in a polygon by checking its spanning triangles.
std::vector< Triangle > calculateTriangles(std::vector< QPoint > polyPoints)
A function to split a polygon in its spanning traingles by using Meisters Theorem of graph theory by ...
QImage imageData
The underlying image data.
An abstract class which manages the basic IntelliImage operations.
std::vector< QPoint > polygonData
The Vertices of The Polygon. Needs to be a planar Polygon.
IntelliShapedImage(int weight, int height)
The Construcor of the IntelliShapedImage. Given the Image dimensions.
virtual ~IntelliShapedImage() override
An Destructor.
The IntelliRasterImage manages a Rasterimage.
virtual void setPolygon(const std::vector< QPoint > &polygonData) override
A function that sets the data of the visible Polygon.