~eliasnaur/gio

4 3

op/path: draw-arc ?

Sebastien Binet
Details
Message ID
<kZng9jHxbQDJl24b6kwmtTCzyE7a3_75ZLKmansWaq6FSg9w3gCV0jzLqnAFA5mUaHbOs78PezuGRdhXJWJ9rqf67QG38_2366kIRR3mCMs=@sbinet.org>
DKIM signature
missing
Download raw message
hi there,

as mentioned on slack, I am interested in trying to provide a Gio backend for gonum/plot.

(I initially thought I could just do that climbing on the shoulders of @ajstark's giocanvas, but I need access to the op/path level, so...)

I noticed that op/path is missing a way to draw arcs.
gonum/plot API[1,2] is based off the HTML5 Canvas one[3], and is thus exposing a way to draw arcs.

would there be interest in adding a way to draw arcs directly to op/path ?

cheers,
-s

[1]: https://godoc.org/gonum.org/v1/plot/vg#Canvas
[2]: https://godoc.org/gonum.org/v1/plot/vg#Path
[3]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
Details
Message ID
<CANtNKfrxd3JkFkicEmTDdCkgFTLKGx5iDDOOomwvyNyw=Qseag@mail.gmail.com>
In-Reply-To
<kZng9jHxbQDJl24b6kwmtTCzyE7a3_75ZLKmansWaq6FSg9w3gCV0jzLqnAFA5mUaHbOs78PezuGRdhXJWJ9rqf67QG38_2366kIRR3mCMs=@sbinet.org> (view parent)
DKIM signature
pass
Download raw message
Hi,

You can draw arcs using bezier curves:
* http://davepoulter.net/2016/03/19/bezier-rings/
* https://stackoverflow.com/questions/734076/how-to-best-approximate-a-geometrical-arc-with-a-bezier-curve

Egon

On Mon, Jun 15, 2020 at 5:42 PM Sebastien Binet <s@sbinet.org> wrote:
>
> hi there,
>
> as mentioned on slack, I am interested in trying to provide a Gio backend for gonum/plot.
>
> (I initially thought I could just do that climbing on the shoulders of @ajstark's giocanvas, but I need access to the op/path level, so...)
>
> I noticed that op/path is missing a way to draw arcs.
> gonum/plot API[1,2] is based off the HTML5 Canvas one[3], and is thus exposing a way to draw arcs.
>
> would there be interest in adding a way to draw arcs directly to op/path ?
>
> cheers,
> -s
>
> [1]: https://godoc.org/gonum.org/v1/plot/vg#Canvas
> [2]: https://godoc.org/gonum.org/v1/plot/vg#Path
> [3]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
Sebastien Binet
Details
Message ID
<yuKhlSoKI2Dfrasv2tDcCCYEy9wWwJ3-D_acSF2KgBDVAdPFgfLTd2VHZgwnPa1_F-UY-4QUXTsx1_l41x1YAZkzxosR8z31daBJLYKpC4c=@sbinet.org>
In-Reply-To
<CANtNKfrxd3JkFkicEmTDdCkgFTLKGx5iDDOOomwvyNyw=Qseag@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
hi Egon,


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, June 15, 2020 5:00 PM, Egon Elbre <egonelbre@gmail.com> wrote:

> Hi,
>
> You can draw arcs using bezier curves:
>
> -   http://davepoulter.net/2016/03/19/bezier-rings/
> -   https://stackoverflow.com/questions/734076/how-to-best-approximate-a-geometrical-arc-with-a-bezier-curve

thanks.
yes, one can draw arcs of a circle w/ Bezier curves.
(I think I did something along these lines in a more or less roundabout way :P)

but as it's one of those basic shapes... I thought it could have been beneficial to have it at the op/clip.Path level.

I guess not?

cheers,
-s
Details
Message ID
<CANtNKfpKTC=yoi4_0BzNZN+hBTi7=mMfcm7i7OavBasU+1KJwQ@mail.gmail.com>
In-Reply-To
<yuKhlSoKI2Dfrasv2tDcCCYEy9wWwJ3-D_acSF2KgBDVAdPFgfLTd2VHZgwnPa1_F-UY-4QUXTsx1_l41x1YAZkzxosR8z31daBJLYKpC4c=@sbinet.org> (view parent)
DKIM signature
pass
Download raw message
On Mon, Jun 15, 2020 at 6:14 PM Sebastien Binet <s@sbinet.org> wrote:
>
> hi Egon,
>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Monday, June 15, 2020 5:00 PM, Egon Elbre <egonelbre@gmail.com> wrote:
>
> > Hi,
> >
> > You can draw arcs using bezier curves:
> >
> > -   http://davepoulter.net/2016/03/19/bezier-rings/
> > -   https://stackoverflow.com/questions/734076/how-to-best-approximate-a-geometrical-arc-with-a-bezier-curve
>
> thanks.
> yes, one can draw arcs of a circle w/ Bezier curves.
> (I think I did something along these lines in a more or less roundabout way :P)
>
> but as it's one of those basic shapes... I thought it could have been beneficial to have it at the op/clip.Path level.
>
> I guess not?

I think arcs do make sense in the clip.Path level, but I'll leave that
decision to Elias.

>
> cheers,
> -s
Details
Message ID
<C3IDNFDPSJHR.JV8HHU9YGIR7@themachine>
In-Reply-To
<kZng9jHxbQDJl24b6kwmtTCzyE7a3_75ZLKmansWaq6FSg9w3gCV0jzLqnAFA5mUaHbOs78PezuGRdhXJWJ9rqf67QG38_2366kIRR3mCMs=@sbinet.org> (view parent)
DKIM signature
pass
Download raw message
On Mon Jun 15, 2020 at 14:42, Sebastien Binet wrote:
> hi there,
>
> as mentioned on slack, I am interested in trying to provide a Gio backend for gonum/plot.
>
> (I initially thought I could just do that climbing on the shoulders of @ajstark's giocanvas, but I need access to the op/path level, so...)
>
> I noticed that op/path is missing a way to draw arcs.
> gonum/plot API[1,2] is based off the HTML5 Canvas one[3], and is thus exposing a way to draw arcs.
>
> would there be interest in adding a way to draw arcs directly to op/path ?

SGTM. Arcs belong in op/path just as much as cubic curves do.

-- elias
Export thread (mbox)