mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Optimize meshing
This commit is contained in:
@@ -157,8 +157,8 @@ fn paint_icon(ui: &mut Ui, state: &State, interact: &InteractInfo) {
|
||||
));
|
||||
|
||||
// Draw a minus:
|
||||
ui.add_paint_cmd(PaintCmd::Line {
|
||||
points: vec![
|
||||
ui.add_paint_cmd(PaintCmd::LineSegment {
|
||||
points: [
|
||||
pos2(small_icon_rect.left(), small_icon_rect.center().y),
|
||||
pos2(small_icon_rect.right(), small_icon_rect.center().y),
|
||||
],
|
||||
@@ -168,8 +168,8 @@ fn paint_icon(ui: &mut Ui, state: &State, interact: &InteractInfo) {
|
||||
|
||||
if !state.open {
|
||||
// Draw it as a plus:
|
||||
ui.add_paint_cmd(PaintCmd::Line {
|
||||
points: vec![
|
||||
ui.add_paint_cmd(PaintCmd::LineSegment {
|
||||
points: [
|
||||
pos2(small_icon_rect.center().x, small_icon_rect.top()),
|
||||
pos2(small_icon_rect.center().x, small_icon_rect.bottom()),
|
||||
],
|
||||
|
||||
@@ -256,7 +256,7 @@ fn paint_resize_corner(ui: &mut Ui, interact: &InteractInfo) {
|
||||
|
||||
while w < 12.0 {
|
||||
ui.add_paint_cmd(PaintCmd::line_segment(
|
||||
(pos2(corner.x - w, corner.y), pos2(corner.x, corner.y - w)),
|
||||
[pos2(corner.x - w, corner.y), pos2(corner.x, corner.y - w)],
|
||||
color,
|
||||
width,
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user