Results 1 to 1 of 1

Thread: QPainterPath::quadTo(...) calls QPainterPath::cubicTo(...) ?

  1. #1
    Join Date
    Jan 2011
    Posts
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QPainterPath::quadTo(...) calls QPainterPath::cubicTo(...) ?

    Hi,

    I am using the QPainterPath::quadTo(...) to create quadratic Bezier curves.

    Oddly, whenever I call this, the call is internally passed on to QPainterPath::cubicTo(...) and a curve with a start, end & 2 different control points is created. I was expecting a curve with a start, end and 1 control point.

    This does not seem correct to me. Does anyone have any input on this?

    for example, when I call
    Qt Code:
    1. QPainterPath path( QPointF( 0,0 ) );
    2. path.quadTo( 100,100, 200,200 );
    To copy to clipboard, switch view to plain text mode 

    I have stepped into the call with a debugger and inside QPainterPath::quadTo(...) at the end of the function it calls:
    Qt Code:
    1. cubicTo(66.666666, 66.666666, 133.333333, 133.333333, 200.0, 200.0)
    To copy to clipboard, switch view to plain text mode 

    I'm using Qt 4.7.1 64-bit with MS VS2008 64-bit

    Insights much appreciated!

    Best,
    Bruce

  2. The following user says thank you to brucelamond for this useful post:


Similar Threads

  1. QPainterPath and scale()
    By edwardc in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2010, 10:03
  2. QPainterPath and QPolygon
    By Muz in forum Qt Programming
    Replies: 0
    Last Post: 18th September 2009, 07:16
  3. Reusing a QPainterPath
    By Micawber in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2009, 19:49
  4. QPainter ,QPainterPath...and cubicTo()
    By salmanmanekia in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2008, 13:42
  5. QPainterPath.arcTo
    By grellsworth in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2008, 17:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.