You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to have a few more small examples. One thing in particular would be how to add multiple objects. Like a square and a circle, both with different stroke styles.
As it stands one might thing that the way to do this would be:
let front = square(start, size);let path = Path::new().set("fill","none").set("stroke","black").set("stroke-width",3).set("d", front);let back = Data::new().move_to((start.0 - size / 5, start.1 + size / 5)).line_by((0, size)).line_by((size,0)).line_by((0, -size)).close();let other_path = Path::new().set("fill","none").set("stroke","black").set("stroke-width",3).set("d", back);
path.add(other_path)
```
But no svg renderer accepts that as a valid output, they render only one of the 2 boxess.
The text was updated successfully, but these errors were encountered:
Yes, indeed the documentation is sparse. The assumption here is that the user is familiar with the format and knows what combines with what and how. The example you gave breaks against the rules (at least, I have not see nesting paths in paths), which are not enforced by the crate.
In any case, the format will probably not be explained here; it does not feel to belong. One could show more examples, but they will not be exhaustive, and one would run into problems still if there is no prior knowledge of the format.
It would be helpful to have a few more small examples. One thing in particular would be how to add multiple objects. Like a square and a circle, both with different stroke styles.
As it stands one might thing that the way to do this would be:
The text was updated successfully, but these errors were encountered: