~eliasnaur/gio

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] op/paint: make documentation of Line clearer

aarzilli
Details
Message ID
<20191105130439.21764-1-alessandro.arzilli@gmail.com>
DKIM signature
pass
Download raw message
Patch: +3 -3
The movement is not to an absolute coordinate but by a delta relative
to the current position of the pen.
---
 op/paint/path.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/op/paint/path.go b/op/paint/path.go
index 73f3fab..225c8b9 100644
--- a/op/paint/path.go
+++ b/op/paint/path.go
@@ -65,9 +65,9 @@ func (p *Path) end() {
 	p.contour++
 }
 
-// Line records a line from the pen to end.
-func (p *Path) Line(to f32.Point) {
-	to = to.Add(p.pen)
+// Line moves the pen by the amount specified by delta, recording a line.
+func (p *Path) Line(delta f32.Point) {
+	to := delta.Add(p.pen)
 	p.lineTo(to)
 }
 
-- 
2.17.1
Details
Message ID
<BY84FIYTPVF9.DKPO0L92VI5R@toolbox>
In-Reply-To
<20191105130439.21764-1-alessandro.arzilli@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Thanks, merged.