Hi Ognyan,

Could you report those as feature requests to https://bugreports.qt.io? That 
would make it easier to track.

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: PySide <pyside-boun...@qt-project.org> on behalf of Ognyan Moore 
<ognyan.mo...@gmail.com>
Sent: Friday, May 6, 2022 11:06:16 PM
To: pyside@qt-project.org <pyside@qt-project.org>
Subject: [PySide] Expose QPainter draw methods that accept pointers

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