Documentation ¶
Overview ¶
Package stroke implements conversion of strokes to filled outlines. It is used as a fallback for stroke configurations not natively supported by the renderer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArcTransform ¶
ArcTransform computes a transformation that can be used for generating quadratic bézier curve approximations for an arc.
The math is extracted from the following paper:
"Drawing an elliptical arc using polylines, quadratic or cubic Bezier curves", L. Maisonobe
An electronic version may be found at:
http://spaceroots.org/documents/ellipse/elliptical-arc.pdf
func IsSolidLine ¶
Types ¶
type QuadSegment ¶
func SplitCubic ¶
func SplitCubic(from, ctrl0, ctrl1, to f32.Point) []QuadSegment
func (QuadSegment) Transform ¶
func (q QuadSegment) Transform(t f32.Affine2D) QuadSegment
type StrokeQuad ¶
type StrokeQuad struct { Contour uint32 Quad QuadSegment }
type StrokeQuads ¶
type StrokeQuads []StrokeQuad
func StrokePathCommands ¶
func StrokePathCommands(style StrokeStyle, dashes DashOp, scene []byte) StrokeQuads
type StrokeStyle ¶
type StrokeStyle struct { Width float32 Miter float32 Cap StrokeCap Join StrokeJoin }
The following are copies of types from op/clip to avoid a circular import of that package. TODO: when the old renderer is gone, this package can be merged with op/clip, eliminating the duplicate types.
Click to show internal directories.
Click to hide internal directories.