Implement Default for canvas::Text
This commit is contained in:
parent
e9194cbf4a
commit
b4f970ee73
1 changed files with 14 additions and 0 deletions
|
|
@ -18,3 +18,17 @@ pub struct Text {
|
||||||
/// The vertical alignment of the text
|
/// The vertical alignment of the text
|
||||||
pub vertical_alignment: VerticalAlignment,
|
pub vertical_alignment: VerticalAlignment,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Text {
|
||||||
|
fn default() -> Text {
|
||||||
|
Text {
|
||||||
|
content: String::new(),
|
||||||
|
position: Point::ORIGIN,
|
||||||
|
color: Color::BLACK,
|
||||||
|
size: 16.0,
|
||||||
|
font: Font::Default,
|
||||||
|
horizontal_alignment: HorizontalAlignment::Left,
|
||||||
|
vertical_alignment: VerticalAlignment::Top,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue