mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
.
This commit is contained in:
parent
41691b438f
commit
4dd6404b32
@ -628,6 +628,11 @@ PyObject* Effect::wrapImageDrawPolygon(PyObject *self, PyObject *args)
|
|||||||
if (length % 2 == 0)
|
if (length % 2 == 0)
|
||||||
{
|
{
|
||||||
QVector <QPoint> points;
|
QVector <QPoint> points;
|
||||||
|
static const QPoint pointss[3] = {
|
||||||
|
QPoint(0, 0),
|
||||||
|
QPoint(6, 3),
|
||||||
|
QPoint(0, 6)
|
||||||
|
};
|
||||||
char * data = PyByteArray_AS_STRING(bytearray);
|
char * data = PyByteArray_AS_STRING(bytearray);
|
||||||
|
|
||||||
for (int idx=0; idx<length; idx+=2)
|
for (int idx=0; idx<length; idx+=2)
|
||||||
@ -637,7 +642,7 @@ PyObject* Effect::wrapImageDrawPolygon(PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
QPainter * painter = effect->_painter;
|
QPainter * painter = effect->_painter;
|
||||||
painter->setBrush(QBrush(QColor(r,g,b,a), Qt::SolidPattern));
|
painter->setBrush(QBrush(QColor(r,g,b,a), Qt::SolidPattern));
|
||||||
painter->drawPolygon(points);
|
painter->drawPolygon(pointss, 3);
|
||||||
|
|
||||||
return Py_BuildValue("");
|
return Py_BuildValue("");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user