Hi,
I spent hours making tests and trying to understand the parameters, and the "points" content and I didn't find my way to make a "pie part". Whatever I do, the path becomes a circle.
Using this
cx, cy := float64(w/2.0), float64(h/2.0)
r := float64(w / 3.0)
angle := 45.0
rot := angle * math.Pi / 180.0
// find the point on circle of radius r at angle rot
px := cx + r*math.Cos(rot)
py := cy + r*math.Sin(rot)
points := []float64{r, r, angle, 1, 0, px, py}
stroker.Start(rasterx.ToFixedP(cx, cy))
//stroker.Line(rasterx.ToFixedP(cx, cy+r))
stroker.Start(rasterx.ToFixedP(px, py))
rasterx.AddArc(points, cx, cy, px, py, stroker)
//stroker.Stop(false)
//stroker.Line(rasterx.ToFixedP(cx, cy))
stroker.Stop(false)
stroker.Draw()
I made several other tests to start the path somewhere else, with no idea of how to make a "pie chart element".
This is the wanted shape:
The goal is to make a pie chart (of course :) ) but (sorry to say this) the code is not well documented... Can you please give a simple example of a pie chart element?
Hi, I spent hours making tests and trying to understand the parameters, and the "points" content and I didn't find my way to make a "pie part". Whatever I do, the path becomes a circle.
Using this
With this:
I made several other tests to start the path somewhere else, with no idea of how to make a "pie chart element".
This is the wanted shape:
The goal is to make a pie chart (of course :) ) but (sorry to say this) the code is not well documented... Can you please give a simple example of a pie chart element?