Documentation ¶
Overview ¶
Package stroke converts complex strokes to gioui.org/op/clip operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stroke ¶
type Stroke struct { Path Path Width float32 // Width of the stroked path. // Miter is the limit to apply to a miter joint. Miter float32 Cap StrokeCap // Cap describes the head or tail of a stroked path. Join StrokeJoin // Join describes how stroked paths are collated. Dashes Dashes }
Stroke defines a stroke.
type StrokeCap ¶
type StrokeCap uint8
StrokeCap describes the head or tail of a stroked path.
const ( // RoundCap caps stroked paths with a round cap, joining the right-hand and // left-hand sides of a stroked path with a half disc of diameter the // stroked path's width. RoundCap StrokeCap = iota // FlatCap caps stroked paths with a flat cap, joining the right-hand // and left-hand sides of a stroked path with a straight line. FlatCap // SquareCap caps stroked paths with a square cap, joining the right-hand // and left-hand sides of a stroked path with a half square of length // the stroked path's width. SquareCap // TriangularCap caps stroked paths with a triangular cap, joining the // right-hand and left-hand sides of a stroked path with a triangle // with height half of the stroked path's width. TriangularCap )
type StrokeJoin ¶
type StrokeJoin uint8
StrokeJoin describes how stroked paths are collated.
const ( // RoundJoin joins path segments with a round segment. RoundJoin StrokeJoin = iota // BevelJoin joins path segments with sharp bevels. BevelJoin // MiterJoin joins path segments with a sharp corner. // It falls back to a bevel join if the miter limit is exceeded. MiterJoin )
Click to show internal directories.
Click to hide internal directories.