Skip to content

Add Quadratic Bezier Curve #45

@ajstarks

Description

@ajstarks

Problem / Use Case

No support for Quadratic Bezier curves. My application uses these.

Proposed Solution

opts := &creator.BezierOptions{
    Color: creator.Blue,
    Width: 2.0,
}
segments := []creator.BezierSegment{
    {
        Start: creator.Point{X: 100, Y: 100},
        C1:    creator.Point{X: 150, Y: 200},
        End:   creator.Point{X: 250, Y: 100},
    },
}
err := page.DrawQuadBezierCurve(segments, opts)

Alternatives Considered

Attempting to derive Quad Bezier with the existing Cubic Bezier failed, Cubic curves cannot be represented exactly by a single quadratic curve.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions