abey79 / vsvg

Fast and portable tools for plotter users
http://whisk.rs
MIT License
107 stars 12 forks source link

Implement the `Draw` trait for `Layer` #111

Closed abey79 closed 8 months ago

abey79 commented 8 months ago

This PR makes it possible to directly draw into a layer:

use vsvg::{Draw, DocumentTrait};

let mut doc = vsvg::Document::default();
let layer = doc.get_mut(0);

// Add a new path into the layer with default path metadata:
layer.circle(5.0, 5.0, 10.0);