From d93874005c694b1f85ce3cb13af67ece33940c87 Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Tue, 19 Jan 2021 07:51:55 -0500 Subject: [PATCH] op/clip: document dimensions of Border. Signed-off-by: Chris Waldon --- op/clip/shapes.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/op/clip/shapes.go b/op/clip/shapes.go index 6bfe0154..28287a7d 100644 --- a/op/clip/shapes.go +++ b/op/clip/shapes.go @@ -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)