Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.0
-
None
Description
Find out how to handle projective transforms of painter paths (transforming the control points of curves is probably not enough).
To properly solve this we'd need to add use homogeneous coordinates (x, y, and w) for the control points of a painter path, effectively giving us rational cubic bezier curves. It would probably be wise to have a flag in QPainterPathPrivate that says whether the path contains elements with w != 1, to avoid reduced performance in those cases. Also all code that operates with bezier curves will need to be changed, and we'll either need to modify QBezier or introduce QRationalBezier.
Having rational cubic bezier curves could be flagged as a new feature though, as they are more powerful than normal cubic bezier curves. For example a circle can be modeled perfectly by two rational cubic bezier curves (one for each half-circle), whereas we now have to use four cubic bezier curves, and then only as an approximation (although a close one).
Attachments
Issue Links
- resulted in
-
QTBUG-2381 Incorrect filled path when using QPainterPath::cubicTo() and combined transformations
-
- Closed
-