Implement Frame::stroke_text in canvas API
This commit is contained in:
parent
8f3bca299b
commit
acde7ea735
4 changed files with 41 additions and 0 deletions
|
|
@ -245,6 +245,17 @@ impl geometry::frame::Backend for Frame {
|
|||
}
|
||||
}
|
||||
|
||||
fn stroke_text<'a>(
|
||||
&mut self,
|
||||
text: impl Into<geometry::Text>,
|
||||
stroke: impl Into<Stroke<'a>>,
|
||||
) {
|
||||
let text = text.into();
|
||||
let stroke = stroke.into();
|
||||
|
||||
text.draw_with(|path, _color| self.stroke(&path, stroke));
|
||||
}
|
||||
|
||||
fn push_transform(&mut self) {
|
||||
self.stack.push(self.transform);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue