[Interest] Mapping floating point screen coordinates to QGraphicsScene
Patrick Stinson
patrickkidd at gmail.com
Sun Mar 19 03:59:30 CET 2017
UITouch coordinates are floating point on iOS, for example for the Apple Pencil. Is there a way to map this? Seems like this would be easy to implement based on the QPoint version…
// pks: apple pencil
QPointF QGraphicsView::mapToScene(const QPointF &point) const
{
Q_D(const QGraphicsView);
QPointF p = point;
p.rx() += d->horizontalScroll();
p.ry() += d->verticalScroll();
return d->identityMatrix ? p : d->matrix.inverted().map(p);
}
More information about the Interest
mailing list