Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Curved lines and dashed line

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12261

    Kool

    Hi guys,

    I’m looking for two things.

    The first is a curved line, along the lines of defining a start point and an end point and between points to ‘curve’. Is there anything like this in Felgo/Qt Quick?

    The second is to take this curved line, and draw it in a ‘dashed’ mode, rather than one solid line.

    Cheers in advance!

    #12262

    Günther
    Felgo Team

    The QML Canvas type allows to draw curves, for example with the bezierCurveTo(…) method.
    I don’t know of a simple way to make dashed lines though. Maybe you can find a custom solution online that works for you.

    Cheers,
    Günther

     

    #12403

    Nathan

    Hi, KoolBanana. This function works for drawing dashed lines on a canvas: https://davidowens.wordpress.com/2010/09/07/html-5-canvas-and-dashed-lines/ Instead of adding the function to the context prototype, just set it on the context directly: context.dashedLineTo = function(...){...} Note that after drawing your line(s) you need to call context.stroke() in order to make them visible on your canvas.

    That doesn’t help you directly with curved dashed lines, but perhaps it’ll give you a start? Good luck.

    #12404

    Kool

    Hi Nathan,

    Much appreciated. I’ll definitely check this out and post any updates!

    Cheers

    #12405

    Nathan

    Please do! If you get a working curved dotted line version, I’ll be interested to see it. 🙂 Good luck

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded