Passing actual color in fill attribute
This commit is contained in:
parent
20adbeed14
commit
ca3edb72a1
|
@ -57,11 +57,13 @@ fn export_svg<W: Write>(scene: &Scene, writer: &mut W) -> io::Result<()> {
|
|||
for draw_path_index in 0..scene.draw_path_count() {
|
||||
let draw_path_id = DrawPathId(draw_path_index);
|
||||
let draw_path = scene.get_draw_path(draw_path_id);
|
||||
let paint = scene.get_paint(draw_path.paint);
|
||||
|
||||
write!(writer, " <path")?;
|
||||
if !draw_path.name.is_empty() {
|
||||
write!(writer, " id=\"{}\"", draw_path.name)?;
|
||||
}
|
||||
writeln!(writer, " fill=\"{:?}\" d=\"{:?}\" />", draw_path.paint, draw_path.outline)?;
|
||||
writeln!(writer, " fill=\"{:?}\" d=\"{:?}\" />", paint.base_color(), draw_path.outline)?;
|
||||
}
|
||||
writeln!(writer, "</svg>")?;
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue