Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(primitives): SVG parser/renderer (#893)
* Dependency: add markup.ml * initial implementation * example * split into separate modules * add basic SVGString component * split out RenderContext * pass dimensions to canvas render function * largeArc -> size * fix viewport transform * add CanvasContext.drawRoundedRect * viewBox * implement arc path commands * add polygon * add named color lookup by string * parse color names * improve error reporting * add more examples * implement quad path command * make color lookup case insensitive * fix fill and stroke defaults * fix stroke width default * handle auto for rect's rx, ry * fix v path command * add fixed examples compensating for missing features * implement polyline * add source to examples where appropriate * add a few real world examples * convert path parser to state machine to fix several edge cases * enable anti-aliasing on paint * skia: add Path.getLastPoint * implement V and H path commands * implement S path command * implement s path command (hopefully) * format, * refactor path command parser to support implicit chaining * fix flash example source * remove redundant tweaked close path example * add second quad bezier example * implement T following Q (but not q, T, t) * remove empty Style module Co-authored-by: Et7f3 <cadeaudeelie@gmail.com> * refactor SVGExample to remove smelly code * simplify pattern match Co-authored-by: Et7f3 <cadeaudeelie@gmail.com> * format, Co-authored-by: Github Runner <runner@runner.github.com> Co-authored-by: Et7f3 <cadeaudeelie@gmail.com>
- Loading branch information