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

Refactor text layout: fewer allocations

This commit is contained in:
Emil Ernerfeldt
2020-05-16 17:28:15 +02:00
parent cdfd42eb3e
commit d3a3e4fa73
5 changed files with 115 additions and 75 deletions

View File

@@ -47,6 +47,11 @@ impl Default for Resize {
}
impl Resize {
pub fn default_width(mut self, width: f32) -> Self {
self.default_size.x = width;
self
}
pub fn default_height(mut self, height: f32) -> Self {
self.default_size.y = height;
self