Patent ID: 8773439

Claim:
A method of approximating cubic Bèzier path segments, the method comprising: receiving a stroke width and a path including a cubic Bèzier path segment; computing a first endpoint position, a second endpoint position, a first tangent at the first endpoint, and a second tangent at the second endpoint for the cubic Bèzier path segment fitting an approximating quadratic Bèzier curve segment to the endpoint positions and tangents computed for the cubic Bèzier path segment; determining whether the approximating quadratic Bèzier curve segment is an accurate approximation of the cubic Bèzier path segment based on a variance metric; and stroking an approximated path including the approximating quadratic Bezier curve segment by: constructing a bounding hull geometry that encloses the approximating quadratic Bèzier curve segment; writing results to a stencil buffer indicating whether sample points within the bounding hull geometry are inside of a stroke region specified by the stroke width and the approximated path; and filling the stroke region by writing a color buffer using the results stored in the stencil buffer.