-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
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.radevgit