3 releases
0.1.2 | Sep 23, 2020 |
---|---|
0.1.1 | Sep 8, 2020 |
0.1.0 | Sep 8, 2020 |
#594 in Graphics APIs
22 downloads per month
18KB
239 lines
rgx-lyon
This crate provides extremely feature-rich vector shape rendering to rgx via lyon.
A basic example
let mut builder = ShapeBuilder::default();
lyon::tessellation::basic_shapes::fill_circle(
Point::new(50., 50.),
25.,
&FillOptions::default(),
&mut builder,
)
.expect("Error tesselating circle");
let shape = builder.prepare(&renderer);
// { ... }
pass.set_pipeline(&self.pipeline);
self.shape.draw(pass);
For a more in-depth look, check out the examples/ directory. You can run individual examples using cargo run --example <name>
, e.g., cargo run --example circle
Dependencies
~11MB
~221K SLoC