~andybalholm

Recent activity

Re: [PATCH go-sieve] Fix tokenization of numbers 2 months ago

From Andy Balholm to ~emersion/public-inbox

Currently, numbers always give a syntax error, because the tokenizer is 
expecting them to be made up of letters.

Andy

[PATCH go-sieve] Fix tokenization of numbers 2 months ago

From Andy Balholm to ~emersion/public-inbox

---
 tokenizer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tokenizer.go b/tokenizer.go
index 406225a..d1aded6 100644
--- a/tokenizer.go
+++ b/tokenizer.go
@@ -226,7 +226,7 @@ func (t *tokenizer) number() string {
			break
		}

		if !isAlpha(c) {
		if !isDigit(c) {
[message trimmed]

Re: [PATCH gio-x] stroke: add ArcTo 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

On 5/18/22 08:18, Sebastien Binet wrote:
> ok.
> I'll try to send something along these lines against your repo.
> I hope it's fine LICENSE-wise as the arcTransform code originates
> from gio (I wrote the first version but Egon improved upon it.)
> always unsure about these things.
>
> -s

If it comes from Gio, it should be under the Unlicense, which is 
compatible with anything.

Andy

Re: [PATCH gio-x] stroke: add ArcTo 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

I would be fine with adding something like this to 
github.com/andybalholm/stroke.

It would make more sense to use a cubic approximation of the arc 
directly, instead of using a quadratic approximation (which then gets 
converted to cubic segments). With a cubic approximation, you could 
split the circle into 6 or 8 segments instead of 16.

Andy

On 5/17/22 04:47, Elias Naur wrote:
> Andy (CC'ed), do you have bandwidth to review this? Does ArcTo belong
> in https://github.com/andybalholm/stroke?
>

[PATCH gio-x] stroke: use github.com/andybalholm/stroke 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

I had to adjust test thresholds to make the tests pass, because the
output isn't pixel-perfect identical to the old implementation, but
there is no visible difference between the two (other than for
TesttDashedPathFlatCapZNoPath, which I deleted because the new
implementation haas different behavior for invalid dash patterns).

References: https://todo.sr.ht/~eliasnaur/gio/379
Signed-off-by: Andy Balholm <andy@balholm.com>
---
 go.mod                                       |   1 +
 go.sum                                       |   2 +
 stroke/approx.go                             | 865 -------------------
 stroke/clip_test.go                          |  44 +-
 stroke/dash.go                               | 389 ---------
[message trimmed]

[PATCH gio] internal/stroke: don't draw round join if angle is NaN 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

References: https://todo.sr.ht/~eliasnaur/gio/331
Signed-off-by: Andy Balholm <andy@balholm.com>
---
 gpu/internal/rendertest/clip_test.go          |  26 ++++++++++++++++++
 .../refs/TestStrokedPathBalloon.png           | Bin 0 -> 1977 bytes
 internal/stroke/stroke.go                     |   8 ++++--
 3 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 gpu/internal/rendertest/refs/TestStrokedPathBalloon.png

diff --git a/gpu/internal/rendertest/clip_test.go b/gpu/internal/rendertest/clip_test.go
index 4275a7cf..3a147312 100644
--- a/gpu/internal/rendertest/clip_test.go
+++ b/gpu/internal/rendertest/clip_test.go
@@ -207,6 +207,32 @@ func TestStrokedPathCoincidentControlPoint(t *testing.T) {
[message trimmed]

[PATCH gio-x] stroke: don't draw round joins when angle is NaN 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

I was getting more of the strange rectangular artifacts like I
reported in issue 331. I discovered that the outline that was being
generated had points with NaN (not a number) coordinates. These were
a result of a NaN returned by the ACos function (probably because of
a rounding error somewhere). It seems to work fine to just skip drawing
those arcs; apparently they are at joins with very small angles.

Updates https://todo.sr.ht/~eliasnaur/gio/331

Signed-off-by: Andy Balholm <andy@balholm.com>
---
 stroke/approx.go                       |  10 ++++++---
 stroke/clip_test.go                    |  30 +++++++++++++++++++++++++
 stroke/refs/TestStrokedPathBalloon.png | Bin 0 -> 1977 bytes
[message trimmed]

[PATCH gio] Regression test for issue 331. 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

References: https://todo.sr.ht/~eliasnaur/gio/331
Signed-off-by: Andy Balholm <andy@balholm.com>
---
 gpu/internal/rendertest/clip_test.go          |  22 ++++++++++++++++++
 .../TestStrokedPathCoincidentControlPoint.png | Bin 0 -> 1918 bytes
 gpu/internal/rendertest/util_test.go          |   7 +++++-
 3 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 gpu/internal/rendertest/refs/TestStrokedPathCoincidentControlPoint.png

diff --git a/gpu/internal/rendertest/clip_test.go b/gpu/internal/rendertest/clip_test.go
index 22703617..0820639f 100644
--- a/gpu/internal/rendertest/clip_test.go
+++ b/gpu/internal/rendertest/clip_test.go
@@ -185,6 +185,28 @@ func TestStrokedPathZeroWidth(t *testing.T) {
[message trimmed]

Re: [PATCH gio] internal/stroke: properly calculate maxDist 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

I've sent a test for the x/stroke version. There are currently no tests 
for the internal/stroke package. Apparently all the tests and testing 
infrastructure were moved to x/stroke.

Andy

On 1/4/22 8:30 AM, Elias Naur wrote:
> Thanks, merged.
>
> A test would be nice :)
>
> Elias

[PATCH gio-x] Regression test for issue 331. 2 years ago

From Andy Balholm to ~eliasnaur/gio-patches

References: https://todo.sr.ht/~eliasnaur/gio/331
Signed-off-by: Andy Balholm <andy@balholm.com>
---
 stroke/clip_test.go                           |  25 ++++++++++++++++++
 .../TestStrokedPathCoincidentControlPoint.png | Bin 0 -> 1918 bytes
 stroke/util_test.go                           |   7 ++++-
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 stroke/refs/TestStrokedPathCoincidentControlPoint.png

diff --git a/stroke/clip_test.go b/stroke/clip_test.go
index b775a0d..19a5572 100644
--- a/stroke/clip_test.go
+++ b/stroke/clip_test.go
@@ -306,6 +306,31 @@ func TestDashedPathFlatCapZNoPath(t *testing.T) {
[message trimmed]