~sbinet

~sbinet/go-hep

Last active 2 months ago
View more

Recent activity

Re: [PATCH v3] op/clip: implement arc path 30 days ago

From Sebastien Binet to ~eliasnaur/gio-patches





‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, July 12, 2020 6:25 PM, Gordon Klaus <gordon.klaus@gmail.com> wrote:

> May I suggest that, instead of using radians, we use either rotations
> [0, 1] or degrees [0, 360] for angles. Multiplying by 2*math.Pi only
> serves to distract from the intent.

wouldn't it artificially/mechanically increase the number of "pointless" multiplications and divisions by math.Pi?
I mean, for better or worse, all math.Func involving angles take arguments (or return values) in radians.

Re: [PATCH v3] op/clip: implement arc path 30 days ago

From Sebastien Binet to ~eliasnaur/gio-patches


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, July 12, 2020 1:39 PM, Elias Naur <mail@eliasnaur.com> wrote:

> On Sat Jul 11, 2020 at 15:06, Sebastien Binet wrote:
>
> > On Friday, July 10, 2020 1:13 PM, Elias Naur mail@eliasnaur.com wrote:
> >
> > > Looking through the change I'm wondering whether Path is too low-level for
> > > for Arc. Two reasons:
> > >
> > > -   I find the SVG API very confusing, in particular largeArc and sweep flags.
> >

Re: [PATCH v3] op/clip: implement arc path a month ago

From Sebastien Binet to ~eliasnaur/gio-patches


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, July 10, 2020 1:13 PM, Elias Naur <mail@eliasnaur.com> wrote:

> CC: Anthony Starks ajstarks@gmail.com
>
> Looking through the change I'm wondering whether Path is too low-level for
> for Arc. Two reasons:
>
> -   I find the SVG API very confusing, in particular largeArc and sweep flags.
agreed.
as I wrote on slack, I sticked to the SVG API b/c I thought you wanted something that looked like it :)
(from the gonum/plot point of view, we only need circular arcs.

[PATCH v3] op/clip: implement arc path a month ago

From Sebastien Binet to ~eliasnaur/gio-patches

---
 internal/rendertest/clip_test.go          |  34 +++++
 internal/rendertest/refs/TestPaintArc.png | Bin 0 -> 2756 bytes
 op/clip/clip.go                           | 147 ++++++++++++++++++++++
 3 files changed, 181 insertions(+)
 create mode 100644 internal/rendertest/refs/TestPaintArc.png

diff --git a/internal/rendertest/clip_test.go b/internal/rendertest/clip_test.go
index 6d205f7..d7fa660 100644
--- a/internal/rendertest/clip_test.go
+++ b/internal/rendertest/clip_test.go
@@ -49,6 +49,40 @@ func TestPaintClippedCirle(t *testing.T) {
	})
}
[message trimmed]

Re: [PATCH v2] op/clip: implement arc path a month ago

From Sebastien Binet to ~eliasnaur/gio-patches





‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, July 1, 2020 3:33 PM, Sebastien Binet <s@sbinet.org> wrote:

>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Wednesday, July 1, 2020 1:53 PM, Elias Naur mail@eliasnaur.com wrote:
>
> > > -         p.lineTo(f32.Pt(x0, y0))

Re: [PATCH v2] op/clip: implement arc path a month ago

From Sebastien Binet to ~eliasnaur/gio-patches


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, July 1, 2020 1:53 PM, Elias Naur <mail@eliasnaur.com> wrote:
> > -       p.lineTo(f32.Pt(x0, y0))
> >
> >
>
> This is still a gratuitous (first) line, right? If we keep the start of the
> arc to the current point, a better Arc would be
>
> // Arc records an arc from the current point to end. In general, two
> // arcs satisfy the constraints; largeArcs selects the larger arc.
> func (p *Path) Arc(end f32.Point, largeArc bool)

[PATCH v2] op/clip: implement arc path a month ago

From Sebastien Binet to ~eliasnaur/gio-patches

---
 internal/rendertest/clip_test.go          |  21 ++++++++++
 internal/rendertest/refs/TestPaintArc.png | Bin 0 -> 1924 bytes
 op/clip/clip.go                           |  46 ++++++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 internal/rendertest/refs/TestPaintArc.png

diff --git a/internal/rendertest/clip_test.go b/internal/rendertest/clip_test.go
index fa8f285..cd42a59 100644
--- a/internal/rendertest/clip_test.go
+++ b/internal/rendertest/clip_test.go
@@ -1,6 +1,8 @@
package rendertest

[message trimmed]

[PATCH] op/clip: implement arc path a month ago

From Sebastien Binet to ~eliasnaur/gio-patches

---
 internal/rendertest/clip_test.go          |  21 +++++++++++
 internal/rendertest/refs/TestPaintArc.png | Bin 0 -> 1924 bytes
 op/clip/clip.go                           |  41 ++++++++++++++++++++++
 3 files changed, 62 insertions(+)
 create mode 100644 internal/rendertest/refs/TestPaintArc.png

diff --git a/internal/rendertest/clip_test.go b/internal/rendertest/clip_test.go
index fa8f285..cd42a59 100644
--- a/internal/rendertest/clip_test.go
+++ b/internal/rendertest/clip_test.go
@@ -1,6 +1,8 @@
package rendertest

[message trimmed]

Re: testing key pressed a month ago

From Sebastien Binet to ~eliasnaur/gio


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, June 29, 2020 5:41 PM, Elias Naur <mail@eliasnaur.com> wrote:

> On Mon Jun 29, 2020 at 14:00, Sebastien Binet wrote:
>
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > On Saturday, June 27, 2020 11:02 AM, Elias Naur mail@eliasnaur.com wrote:
> >
> > > On Fri Jun 26, 2020 at 19:11, Sebastien Binet wrote:
> > >
> > > > hi,
> > > > (apologies for the barrage of questions lately)

Re: testing key pressed a month ago

From Sebastien Binet to ~eliasnaur/gio





‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, June 27, 2020 11:02 AM, Elias Naur <mail@eliasnaur.com> wrote:

> On Fri Jun 26, 2020 at 19:11, Sebastien Binet wrote:
>
> > hi,
> > (apologies for the barrage of questions lately)
> > I am trying to test a code path is taken inside my application.
> > That part is listening for the 'Q' key or escape key to be pressed and does something.