Make Frame::stroke
take a generic Into<Stroke>
This commit is contained in:
parent
81096ef454
commit
dce1034699
@ -127,11 +127,13 @@ impl Frame {
|
||||
///
|
||||
/// [`Path`]: path/struct.Path.html
|
||||
/// [`Frame`]: struct.Frame.html
|
||||
pub fn stroke(&mut self, path: &Path, stroke: Stroke) {
|
||||
pub fn stroke(&mut self, path: &Path, stroke: impl Into<Stroke>) {
|
||||
use lyon::tessellation::{
|
||||
BuffersBuilder, StrokeOptions, StrokeTessellator,
|
||||
};
|
||||
|
||||
let stroke = stroke.into();
|
||||
|
||||
let mut buffers = BuffersBuilder::new(
|
||||
&mut self.buffers,
|
||||
StrokeVertex(stroke.color.into_linear()),
|
||||
|
Loading…
Reference in New Issue
Block a user