~eliasnaur/gio-patches

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

Details
Message ID
<CAD1K+AKKSYKeO1=WNqRjc+Jv7c0z+0D3+XHg7_0xOVGMJf7cjA@mail.gmail.com>
DKIM signature
missing
Download raw message
Re: SVG API -- I'm not a fan either, but it has the advantage of familiarity.
Re: Arcs like the existing Loader (older version), see:

https://github.com/ajstarks/giocanvas/blob/74de31426979ddf304fcd6701c5a057d2a0b13b7/abs.go#L246-L284

Re: Use cases for arc: (both circular and elliptical)

1) making a stroked arc
2) making a "wedge" shape (as seen in pie charts)

the elements are for making the arc:

1) center point
2) width, height
3) start angle
4) end angle
5) stroke width

with these elements you can accomplish both use cases cited above for
both circular (width and height are equal) and elliptical arcs.
If the stroke width is the same as the width you get the wedge shape
for circular arcs.

The coordinate system should match the traditional polar coordinates:
angles go from 0-360 degrees (0-2π radians), increasing
counter-clockwise.

If you want to rotate the arc, apply the standard affine transformations.

Proposed API:
Arc(center f32.Point, width, height float32, startAngle, endAngle
float64, strokeWidth float32)
Reply to thread Export thread (mbox)