Make Frame::fill_text
take a generic Into<Text>
This commit is contained in:
parent
dce1034699
commit
6779fcf621
@ -175,9 +175,11 @@ impl Frame {
|
|||||||
/// [`Text`]: struct.Text.html
|
/// [`Text`]: struct.Text.html
|
||||||
/// [`Frame`]: struct.Frame.html
|
/// [`Frame`]: struct.Frame.html
|
||||||
/// [`Canvas`]: struct.Canvas.html
|
/// [`Canvas`]: struct.Canvas.html
|
||||||
pub fn fill_text(&mut self, text: Text) {
|
pub fn fill_text(&mut self, text: impl Into<Text>) {
|
||||||
use std::f32;
|
use std::f32;
|
||||||
|
|
||||||
|
let text = text.into();
|
||||||
|
|
||||||
let position = if self.transforms.current.is_identity {
|
let position = if self.transforms.current.is_identity {
|
||||||
text.position
|
text.position
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user