I was playing around a bit with the reference implementation and was wondering what the correct handling is for Stroked paths when dashing is enabled. An example is:

Code :
unsigned char cmds[] = {VG_MOVE_TO_ABS, VG_LINE_TO_ABS, VG_LINE_TO_ABS, VG_CLOSE_PATH};
float pathdata[] = {100,50,  100,150, 200,150};
float dashpattern[] = {100,25,25,25};

The end caps should be set to VG_CAP_SQUARE (and dash phase=0).

At the bottom of the first vertical stroke, the spec is pretty clear that it (the initial vertex) is supposed to be a "JOIN" vertex (p.78-79), but clearly the end cap has been applied in the reference implementation (if the dashing is set such that the final part of the close path line connects to the starting point, the reference implementation creates a JOIN vertex as expected).

The other issue is the top of the first stroke. The first stroke is exactly as long as the dashing phase. What is the correct behavior in this case? The reference implementation first creates the join, then adds the end cap in the direction of the next path element. Or is a 0-length "ON" path supposed to be created at the start of the second line (are 0 length paths ever supposed to be created during dashing?)?

Thanks in advance