Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Lenght and intermediate points with Bezier curves

[Solved] Lenght and intermediate points with Bezier curves

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    osfesa
    wrote on last edited by
    #1

    I have some problems with Bezier curves.
    I'm developing an app that shows some bezier curves.

    Now I have to set intermediate points of this Bezier curve, between the start and finish point. And take the lenght of this points in the Bezier Curve.

    Is there any Qt class to perform that? Or someone knows how to set an intermediate point in this kind of curve? and guess the lenght of this curves?

    Thanks.

    PD: this thread is related with "this one":http://qt-project.org/forums/viewthread/25218/

    1 Reply Last reply
    0
    • U Offline
      U Offline
      utcenter
      wrote on last edited by
      #2

      http://qt-project.org/doc/qt-5.0/qtgui/qpainterpath.html#cubicTo

      void QPainterPath::cubicTo or void QPainterPath::quadTo add bezier curves to a painter path

      to move along a path, use:

      QPointF QPainterPath::pointAtPercent(qreal t) const

      It gives you a point along the curve at a position from 0.0 to 1.0

      1 Reply Last reply
      0
      • O Offline
        O Offline
        osfesa
        wrote on last edited by
        #3

        Thank You.

        Was my fault for not reading all the documentation.
        As I can see QPainterPath also solves other problem I have, intersects between paths.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved