Read Rust

Tag: svg

Posts

I have just released the first version of lorikeet-dash and part of that exercise was to find out a way to draw SVG graphs using rust.

I thought my findings & approach may be useful for others looking to do the same thing and so I have documented the design evolution in this blog.

svg

CSS length values have a number and a unit, e.g. 5cm or 6px. Sometimes the unit is a percentage, like 50%, and SVG says that lengths with percentage units should be resolved with respect to a certain rectangle. The process of converting that kind of units into absolute pixels for the final drawing is called normalization. In SVG, percentage units sometimes need to be normalized with respect to the current viewport (a local coordinate system), or with respect to the size of another object (e.g. when a clipping path is used to cut the current shape in half). One detail about normalization is that it can be with respect to the horizontal dimension of the current viewport, the vertical dimension, or both.

svg

View all tags