mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu,op/clip: implement stroked paths with miter joins
Signed-off-by: Sebastien Binet <s@sbinet.org>
This commit is contained in:
committed by
Elias Naur
parent
7de8ce51a5
commit
7eb32360e5
@@ -55,6 +55,7 @@ func (p Op) Add(o *op.Ops) {
|
||||
bo.PutUint32(data[17:], math.Float32bits(p.width))
|
||||
data[21] = uint8(p.style.Cap)
|
||||
data[22] = uint8(p.style.Join)
|
||||
bo.PutUint32(data[23:], math.Float32bits(p.style.Miter))
|
||||
}
|
||||
|
||||
// Begin the path, storing the path data and final Op into ops.
|
||||
|
||||
@@ -8,6 +8,11 @@ package clip
|
||||
type StrokeStyle struct {
|
||||
Cap StrokeCap
|
||||
Join StrokeJoin
|
||||
|
||||
// Miter is the limit to apply to a miter joint.
|
||||
// The zero Miter disables the miter joint; setting Miter to +∞
|
||||
// unconditionally enables the miter joint.
|
||||
Miter float32
|
||||
}
|
||||
|
||||
// StrokeCap describes the head or tail of a stroked path.
|
||||
|
||||
Reference in New Issue
Block a user