/StarryEngine/starry_toolkit/src/base/ |
H A D | rect.rs | 11 pub width: u32, field 17 pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rect { in new() 21 width: width, in new() 32 Vector2::new(self.x + self.width as i32 / 2, self.y) in top_pos() 36 Vector2::new(self.x + self.width as i32, self.y) in top_right_pos() 45 self.x + self.width as i32 / 2, in center_pos() 51 Vector2::new(self.x + self.width as i32, self.y + self.height as i32 / 2) in right_pos() 59 Vector2::new(self.x + self.width as i32 / 2, self.y + self.height as i32) in bottom_pos() 63 Vector2::new(self.x + self.width as i32, self.y + self.height as i32) in bottom_right_pos() 69 && p.x < self.x + self.width as i32 in contains() [all …]
|
H A D | panel.rs | 48 fn width(&self) -> u32 { in width() method 49 self.window.width() in width() 105 Window::new(rect.x, rect.y, rect.width, rect.height, title, color), in new() 149 pub fn width(&self) -> u32 { in width() method 151 (*window).width() in width() 178 pub fn set_size(&self, width: u32, height: u32) { in set_size() 180 (*window).set_size(width, height); in set_size()
|
H A D | event.rs | 28 width: u32,
|
/StarryEngine/starry_server/src/base/ |
H A D | image.rs | 32 let end = start + self.rect.width(); in next() 71 let end = self.rect.left() as usize + self.rect.width() as usize; in next() 175 pub fn from_data(width: i32, height: i32, data: &'a mut [Color]) -> Self { in from_data() 177 w: width, in from_data() 185 pub fn width(&self) -> i32 { in width() method 205 fn width(&self) -> u32 { in width() method 245 pub fn new(width: i32, height: i32) -> Self { in new() 246 Image::from_color(width, height, Color::rgb(0, 0, 0)) in new() 250 pub fn from_color(width: i32, height: i32, color: Color) -> Self { in from_color() 252 width, in from_color() [all …]
|
H A D | display.rs | 20 pub fn new(x: i32, y: i32, width: i32, height: i32) -> Self { in new() 24 image: Image::new(width, height), in new() 38 rect.width().try_into().unwrap_or(0), in rect() 57 rect.width(), in roi() 63 pub fn resize(&mut self, width: i32, height: i32) { in resize() 64 self.image = Image::new(width, height) in resize() 69 Rect::new(self.x, self.y, self.image.width(), self.image.height()) in screen_rect()
|
H A D | window.rs | 69 pub fn width(&self) -> i32 { in width() method 70 self.image.width() in width() 80 Rect::new(self.x, self.y, self.width(), self.height()) in rect()
|
H A D | rect.rs | 52 pub fn width(&self) -> i32 { in width() method
|
/StarryEngine/starry_client/src/base/ |
H A D | renderer.rs | 22 fn width(&self) -> u32; in width() method 51 let w = self.width(); in pixel() 127 let start = start as usize * self.width() as usize; in image_over() 141 let width = self.width() as usize; in image_opaque() localVariable 147 if start_x >= width || start_y >= height { in image_opaque() 154 let offset = start_y * width + start_x; in image_opaque() 157 let start = offset + l * width; in image_opaque() 162 if start_x + w > width { in image_opaque() 163 stop = (start_y + l + 1) * width - 1; in image_opaque() 176 let width = self.width() as usize; in image_fast() localVariable [all …]
|
H A D | event.rs | 210 pub width: u32, field 218 a: self.width as i64, in to_event() 225 width: event.a as u32, in from_event()
|
/StarryEngine/starry_toolkit/src/layout/ |
H A D | grid.rs | 187 if rect.width >= cols[col].width { in arrange_elements() 188 cols[col as usize].width = rect.width; in arrange_elements() 190 if rect.width >= rows[row].width { in arrange_elements() 191 rows[row as usize].width = rect.width; in arrange_elements() 210 x += col.width as i32 + space_x; in arrange_elements() 219 let grid_width = cols.len() as i32 * (cols[0].width as i32 + space_x) - space_x; in arrange_elements() 220 let grid_height = rows.len() as i32 * (rows[0].width as i32 + space_y) - space_y; in arrange_elements() 227 child.resize(cols[col].width, rows[row].height); in arrange_elements()
|
H A D | list.rs | 112 max_size = u32::max(max_size, element.rect().get().width); in arrange_elements() 144 x_offset as i32 + (max_size - element.rect().get().width) as i32 / 2, in arrange_elements() 148 x_offset as i32 + (max_size - element.rect().get().width) as i32, in arrange_elements() 161 x_offset += element.rect().get().width + self.space.get(); in arrange_elements()
|
/StarryEngine/starry_toolkit/src/widgets/ |
H A D | image.rs | 31 pub fn new(width: u32, height: u32) -> Arc<Self> { in new() 32 Self::new_from_image(ImageResource::new(width as i32, height as i32)) in new() 35 pub fn new_from_color(width: u32, height: u32, color: Color) -> Arc<Self> { in new_from_color() 37 width as i32, in new_from_color() 46 rect: Cell::new(Rect::new(0, 0, image.width() as u32, image.height() as u32)), in new_from_image() 78 self.rect.get().width as i32, in set_from_color() 130 local_rect.width, in draw()
|
H A D | mod.rs | 122 fn resize(&self, width: u32, height: u32) { in resize() 123 self.resize_base(width, height); in resize() 127 fn resize_base(&self, width: u32, height: u32) { in resize_base() 129 rect.width = width; in resize_base()
|
H A D | label.rs | 89 if text.len() as u32 * 8 > rect.width { in handle_overflow() 90 let max_count = max(0, (rect.width as i32 - 3 * 8) / 8); in handle_overflow() 180 if current_rect.x + 8 <= origin_rect.x + origin_rect.width as i32 in draw() 220 fn resize(&self, width: u32, height: u32) { in resize() 221 self.resize_base(width, height); in resize()
|
/StarryEngine/starry_client/src/ |
H A D | window.rs | 51 fn width(&self) -> u32 { in width() method 69 let width = min(self.width() as i32, SCREEN_WIDTH as i32 - self.x); in sync() localVariable 73 for x in 0..width as i32 { in sync() 136 pub fn set_size(&mut self, width: u32, height: u32) { in set_size() 137 self.w = width; in set_size()
|
/StarryEngine/starry_server/src/core/ |
H A D | window_manager.rs | 113 width: i32, in window_new() 129 x = cmp::max(0, (SCREEN_WIDTH as i32 - width) / 2); in window_new() 135 let window = Window::new(x, y, width, height, 1, image_path); in window_new() 212 cmp::min(max_x - cursor_rect.width(), self.cursor_x.get() + event.dx), in handle_mouse_relative_event() 276 image.width(), in cursor_rect()
|
H A D | compositor.rs | 119 for x in 0..display_redraw.width() { in redraw_all()
|
/StarryEngine/starry_toolkit/src/util/ |
H A D | mod.rs | 39 let negative_width = -(origin_rect.width as i32); in align_rect() 59 origin_rect.width, in align_rect() 77 source_rect.width, in get_local_rect()
|