Skip to content

Implement the Draw trait for Layer#111

Merged
abey79 merged 1 commit into
masterfrom
layer-draw
Jan 14, 2024
Merged

Implement the Draw trait for Layer#111
abey79 merged 1 commit into
masterfrom
layer-draw

Conversation

@abey79

@abey79 abey79 commented Jan 14, 2024

Copy link
Copy Markdown
Owner

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);

@abey79 abey79 added vsvg Relates to vsvg feature New feature labels Jan 14, 2024
@abey79 abey79 merged commit 2484929 into master Jan 14, 2024
@abey79 abey79 deleted the layer-draw branch January 14, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature vsvg Relates to vsvg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Draw for Layer

1 participant