From 3b5148a64e3aaa87d7e2d8cf698cb0d3b7b49cb3 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Mon, 15 Apr 2024 11:07:14 +0300 Subject: [PATCH] op/clip: add note about Path.End Signed-off-by: Egon Elbre --- op/clip/clip.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/op/clip/clip.go b/op/clip/clip.go index 98024ab9..d353d936 100644 --- a/op/clip/clip.go +++ b/op/clip/clip.go @@ -138,6 +138,9 @@ type Path struct { func (p *Path) Pos() f32.Point { return p.pen } // Begin the path, storing the path data and final Op into ops. +// +// Caller must also call End to finish the drawing. +// Forgetting to call it will result in a "panic: cannot mix multi ops with single ones". func (p *Path) Begin(o *op.Ops) { *p = Path{ ops: &o.Internal,