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

Add new Resize container

This commit is contained in:
Emil Ernerfeldt
2020-04-25 14:37:39 +02:00
parent 9ba5bea143
commit 3a430c8fc7
13 changed files with 262 additions and 31 deletions

View File

@@ -180,3 +180,13 @@ pub enum PaintCmd {
/// Low-level triangle mesh
Mesh(Mesh),
}
impl PaintCmd {
pub fn line_segment(seg: (Pos2, Pos2), color: Color, width: f32) -> Self {
Self::Line {
points: vec![seg.0, seg.1],
color,
width,
}
}
}