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

Rename PaintCmd to Shape

This commit is contained in:
Emil Ernerfeldt
2021-01-10 11:43:01 +01:00
parent a0b0f36d29
commit fb2317c993
33 changed files with 225 additions and 235 deletions

View File

@@ -34,7 +34,7 @@ impl super::View for DancingStrings {
let desired_size = ui.available_width() * vec2(1.0, 0.35);
let (_id, rect) = ui.allocate_space(desired_size);
let mut cmds = vec![];
let mut shapes = vec![];
for &mode in &[2, 3, 5] {
let mode = mode as f32;
@@ -55,13 +55,13 @@ impl super::View for DancingStrings {
.collect();
let thickness = 10.0 / mode;
cmds.push(paint::PaintCmd::line(
shapes.push(paint::Shape::line(
points,
Stroke::new(thickness, Color32::from_additive_luminance(196)),
));
}
ui.painter().extend(cmds);
ui.painter().extend(shapes);
});
ui.add(crate::__egui_github_link_file!());
}