Monday, 19 August 2013

Draw a dashed and dotted bezier curve in QML

Draw a dashed and dotted bezier curve in QML

I've seen there is an example implementation of Bezier curvein QML, but
I'm looking for a hint how to implement dashed or dotted bezier curve
line. As far as I see, tha authors of Bezier curve example are using
QSGGeometryNode to store inside QSGGeometry with a QSGFlatColorMaterial
material applied on it. Then they simply create list of points and draw
segments between them.
Is it possible to store more than one QSGGeometry inside QSGGeometryNode?
(to be able to draw each "dashed" segment separately, or is there a
possibility to write a shader, which will be applied to
QSGFlatColorMaterial and will render this line as dashed?
Any hint would be highly appreciated! :)

No comments:

Post a Comment