gpu,op/clip: implement dashed stroked paths

Signed-off-by: Sebastien Binet <s@sbinet.org>
This commit is contained in:
Sebastien Binet
2020-12-09 09:59:46 +00:00
committed by Elias Naur
parent ac14320bec
commit e71bf13c9a
14 changed files with 745 additions and 7 deletions
+4 -2
View File
@@ -50,8 +50,9 @@ func (rr RRect) Add(ops *op.Ops) {
// Border represents the clip area of a rectangular border.
type Border struct {
// Rect is the bounds of the border.
Rect f32.Rectangle
Width float32
Rect f32.Rectangle
Width float32
Dashes DashSpec
// The corner radii.
SE, SW, NW, NE float32
}
@@ -68,6 +69,7 @@ func (b Border) Op(ops *op.Ops) Op {
Style: StrokeStyle{
Width: b.Width,
},
Dashes: b.Dashes,
}.Op()
}