lqyp0420
5th April 2016, 14:54
Hi, I have a problem when i use QPainterPath.arcTo, and it puzzls me for a long time. just as the flowing:
r=100.1232131
path=QPainterPath(QPointF(r, 0))
rect=QRectF(-r, -r, 2*r, 2*r)
path.arcTo(rect, 0.0, 78.0)
p2=path.pointAtPercent(1.0)
print QLineF(p2, QPointF(0, 0)).length()
the printed r=100.143731537 not equal the one before
is there some way to improve the accuray or does i make any mistakes in the program?
Thanks for your suggestions and greatly appreciated.
r=100.1232131
path=QPainterPath(QPointF(r, 0))
rect=QRectF(-r, -r, 2*r, 2*r)
path.arcTo(rect, 0.0, 78.0)
p2=path.pointAtPercent(1.0)
print QLineF(p2, QPointF(0, 0)).length()
the printed r=100.143731537 not equal the one before
is there some way to improve the accuray or does i make any mistakes in the program?
Thanks for your suggestions and greatly appreciated.