CurveAdapter

Overview

CurveAdapter is a class in Aspose.Font FOSS for Python.

CurveAdapter.quad_to_cubic converts a quadratic Bézier (p0, q, p3) to an equivalent cubic Bézier, returning four points.

This class provides 4 methods for working with CurveAdapter objects in Python programs. Available methods include: convert_path_cubic_to_quad, convert_path_quad_to_cubic, cubic_to_quads, quad_to_cubic. All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.

Methods

SignatureDescription
quad_to_cubic(p0: Point, q: Point, p3: Point)tuple[Point, Point, Point, Point]Converts a quadratic Bézier (p0, q, p3) to an equivalent cubic Bézier, returning four points
cubic_to_quads(p0: Point, c1: Point, c2: Point, p3: Point, tolerance: float)list[QuadSegment]Approximates a cubic Bézier (p0, c1, c2, p3) with quadratic segments within tolerance, returning a list of QuadSegment
convert_path_quad_to_cubic(path: GlyphPath)GlyphPathConverts all quadratic segments in a GlyphPath to cubic segments, returning a new GlyphPath
convert_path_cubic_to_quad(path: GlyphPath, tolerance: float)GlyphPathCalls convert_path_cubic_to_quad on this CurveAdapter instance.

See Also