Path builder should store an Arc command
Currently we have this in the path parser:
pub enum PathCommand {
MoveTo (f64, f64),
LineTo (f64, f64),
CurveTo ((f64, f64), (f64, f64), (f64, f64)),
ClosePath
}
When parsing the A
or a
commands for elliptical arcs, we synthesize CurveTo commands out of them. This results in several things:

We can't easily test the results of parsing an arc command, since we don't know what CurveTo commands the algorithm will generate. (1)

We emit markers at the ends of each CurveTo, so each arc may have markers along the arc, instead of just at its ends. We should be emitting markers for the whole Arc command. (2)
For (1) it should be easy to add an Arc
variant to the enum and test its resulting values. We can explode the arc into Bézier curves when translating the PathBuilder to Cairo.
For (2) we need some new logic to compute the directionality at the endpoints of an Arc segment. Ideally we would generate generate exact angles (I don't know how to compute this off the top of my head), or we could rerun the "explode to Bézier" algorithm and see what tangents it generates at the ends.