1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Make it easier to create an Outline

This commit is contained in:
Emil Ernerfeldt
2020-04-19 11:11:41 +02:00
parent 2170081221
commit 1afda00fc4
6 changed files with 18 additions and 24 deletions

View File

@@ -91,6 +91,15 @@ pub struct Outline {
pub color: Color,
}
impl Outline {
pub fn new(width: impl Into<f32>, color: impl Into<Color>) -> Self {
Self {
width: width.into(),
color: color.into(),
}
}
}
#[derive(Clone, Debug, Serialize)]
#[serde(rename_all = "snake_case", tag = "kind")]
pub enum PaintCmd {