mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +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)
|
||||
}
|
||||
|
||||
// Border represents the clip area of a rectangular border.
|
||||
// Border represents a rectangular border.
|
||||
type Border struct {
|
||||
// Rect is the bounds of the border.
|
||||
Rect f32.Rectangle
|
||||
Rect f32.Rectangle
|
||||
// Width of the line tracing Rect.
|
||||
Width float32
|
||||
Dashes DashSpec
|
||||
// The corner radii.
|
||||
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 {
|
||||
var p Path
|
||||
p.Begin(ops)
|
||||
|
||||
Reference in New Issue
Block a user