This commit is contained in:
brindosch 2017-05-07 22:34:06 +02:00
parent 41691b438f
commit 4dd6404b32

View File

@ -628,6 +628,11 @@ PyObject* Effect::wrapImageDrawPolygon(PyObject *self, PyObject *args)
if (length % 2 == 0)
{
QVector <QPoint> points;
static const QPoint pointss[3] = {
QPoint(0, 0),
QPoint(6, 3),
QPoint(0, 6)
};
char * data = PyByteArray_AS_STRING(bytearray);
for (int idx=0; idx<length; idx+=2)
@ -637,7 +642,7 @@ PyObject* Effect::wrapImageDrawPolygon(PyObject *self, PyObject *args)
QPainter * painter = effect->_painter;
painter->setBrush(QBrush(QColor(r,g,b,a), Qt::SolidPattern));
painter->drawPolygon(points);
painter->drawPolygon(pointss, 3);
return Py_BuildValue("");
}