Hello PySide developers,

I am one of the maintainers of pyqtgraph.  I'm writing to request that
PySide expose more of the QPainter draw methods that accept pointers.

The method we would most benefit from PySide exposing to us is
QPainter::drawLines(const QLine *lines, int lineCount)

To demonstrate a typical usage, I will do a simplified version of how we
use QPainter::drawPixmapFragments which does allow a pointer to be passed
in.

import numpy as np
size = 1_000
arr = np.empty((size, 10), dtype=np.float64)
ptrs = shiboken6.wrapInstance(arr.ctypes.data,
QtGui.QPainter.PixmapFragment)
...
QPainter.drawPixmapFragments(ptrs, size, pixmap)


Having this functionality would definitely make our code substantially more
efficient.  If it's not too much trouble, we would appreciate other draw
methods that accept pointers to be available from PySide; however, those
are not as critical to us.

QPainter::drawConvexPolygon(const QPointF *points, int pointCount)
QPainter::drawPoints(const QPointF *points, int pointCount)
QPainter::drawPolygon(const QPointF *points, int pointCount, Qt::FillRule
fillRule = Qt::OddEvenFill)
QPainter::drawRects(const QRectF *rectangles, int rectCount)
QPainter::drawPolyline(const QPointF *points, int pointCount)

Let me know if I can provide any additional information!

Ogi
_______________________________________________
PySide mailing list
PySide@qt-project.org
https://lists.qt-project.org/listinfo/pyside

Reply via email to