On Tue, 21 Feb 2017 02:17:24 -0800
Patrick Stinson <patrickk...@gmail.com> wrote:

> Hello!
> I am painting a series of connected QLineF's with varying vectors and
> widths. Is there any way to smooth them out to be more vector-ish, so
> you don't see the jagged transitions between the segments?
> 
> This is for hand writing notes with the Apple Pencil. I have one
> segment per event with pressure determining width and it just looks
> so jagged now...
> 
> Thanks!

QSplineSeries from Qt Charts (http://doc.qt.io/qt-5/qsplineseries.html)
solves the same problem, but unfortunately it doesn't seem to be very
generalised.

Perhaps you could take the relevant parts of its implementation, which
seem to be calculateControlPoints(), updateGeometry() and paint() in

http://code.qt.io/cgit/qt/qtcharts.git/tree/src/charts/splinechart/splinechartitem.cpp

-Francis
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to