mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
op/clip: document dimensions of Border.
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
+6
-3
@@ -47,17 +47,20 @@ func (rr RRect) Add(ops *op.Ops) {
|
|||||||
rr.Op(ops).Add(ops)
|
rr.Op(ops).Add(ops)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Border represents the clip area of a rectangular border.
|
// Border represents a rectangular border.
|
||||||
type Border struct {
|
type Border struct {
|
||||||
// Rect is the bounds of the border.
|
// Rect is the bounds of the border.
|
||||||
Rect f32.Rectangle
|
Rect f32.Rectangle
|
||||||
|
// Width of the line tracing Rect.
|
||||||
Width float32
|
Width float32
|
||||||
Dashes DashSpec
|
Dashes DashSpec
|
||||||
// The corner radii.
|
// The corner radii.
|
||||||
SE, SW, NW, NE float32
|
SE, SW, NW, NE float32
|
||||||
}
|
}
|
||||||
|
|
||||||
// Op returns the Op for the border.
|
// Op returns the clip operation for the border. Its area corresponds to a
|
||||||
|
// stroked line that traces the border rectangle, optionally with rounded
|
||||||
|
// corners and dashes.
|
||||||
func (b Border) Op(ops *op.Ops) Op {
|
func (b Border) Op(ops *op.Ops) Op {
|
||||||
var p Path
|
var p Path
|
||||||
p.Begin(ops)
|
p.Begin(ops)
|
||||||
|
|||||||
Reference in New Issue
Block a user