PDA

View Full Version : QPainterPath::quadTo(...) calls QPainterPath::cubicTo(...) ?



brucelamond
29th April 2011, 00:30
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


QPainterPath path( QPointF( 0,0 ) );
path.quadTo( 100,100, 200,200 );


I have stepped into the call with a debugger and inside QPainterPath::quadTo(...) at the end of the function it calls:


cubicTo(66.666666, 66.666666, 133.333333, 133.333333, 200.0, 200.0)


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

Insights much appreciated!

Best,
Bruce