/StarryEngine/starry_toolkit/src/base/ |
H A D | rect.rs | 7 pub x: i32, 9 pub y: i32, 17 pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rect { in new() argument 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() 40 Vector2::new(self.x, self.y + self.height as i32 / 2) in left_pos() 45 self.x + self.width as i32 / 2, in center_pos() 46 self.y + self.height 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() 55 Vector2::new(self.x, self.y + self.height as i32) in bottom_left_pos() [all …]
|
H A D | vector2.rs | 7 pub x: i32, 9 pub y: i32, 13 pub fn new(x: i32, y: i32) -> Self { in new() argument
|
H A D | panel.rs | 137 pub fn x(&self) -> i32 { in x() argument 143 pub fn y(&self) -> i32 { in y() argument 172 pub fn set_pos(&self, x: i32, y: i32) { in set_pos() argument
|
H A D | event.rs | 23 x: i32, 24 y: i32,
|
/StarryEngine/starry_client/src/base/ |
H A D | renderer.rs | 46 fn pixel(&mut self, x: i32, y: i32, color: Color) { in pixel() argument 55 if x >= 0 && y >= 0 && x < w as i32 && y < h as i32 { in pixel() 85 fn char(&mut self, x: i32, y: i32, c: char, color: Color) { in char() argument 113 fn image(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, data: &[Color]) { in image() argument 126 fn image_over(&mut self, start: i32, image_data: &[Color]) { in image_over() argument 138 fn image_opaque(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color]) { in image_opaque() argument 173 fn image_fast(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color]) { in image_fast() argument 224 fn arc(&mut self, x0: i32, y0: i32, radius: i32, parts: u8, color: Color) { in arc() argument 294 fn circle(&mut self, x0: i32, y0: i32, radius: i32, color: Color) { in circle() argument 345 fn line4points(&mut self, x0: i32, y0: i32, x: i32, y: i32, color: Color) { in line4points() argument [all …]
|
H A D | graphicspath.rs | 10 x: i32, 12 y: i32, 14 pub points: Vec<(i32, i32, PointType)>, 28 pub fn move_to(&mut self, x: i32, y: i32) { in move_to() argument 35 pub fn line_to(&mut self, x: i32, y: i32) { in line_to() argument 42 pub fn quadratic_bezier_curve_to(&mut self, argx1: i32, argy1: i32, argx2: i32, argy2: i32) { in quadratic_bezier_curve_to() argument 66 self.points.push((x as i32, y as i32, PointType::Connect)); in quadratic_bezier_curve_to() 76 argx1: i32, in cubic_bezier_curve_to() argument 77 argy1: i32, in cubic_bezier_curve_to() argument 78 argx2: i32, in cubic_bezier_curve_to() argument [all …]
|
H A D | event.rs | 92 pub dx: i32, 94 pub dy: i32, 110 dx: event.a as i32, in from_event() 111 dy: event.b as i32, in from_event() 159 pub x: i32, 161 pub y: i32, 177 x: event.a as i32, in from_event() 178 y: event.b as i32, in from_event() 186 pub x: i32, 187 pub y: i32, [all …]
|
/StarryEngine/starry_server/src/base/ |
H A D | rect.rs | 7 x: i32, 9 y: i32, 11 w: i32, 13 h: i32, 19 pub fn new(x: i32, y: i32, w: i32, h: i32) -> Rect { in new() argument 27 pub fn area(&self) -> i32 { in area() argument 32 pub fn left(&self) -> i32 { in left() argument 37 pub fn right(&self) -> i32 { in right() argument 42 pub fn top(&self) -> i32 { in top() argument 47 pub fn bottom(&self) -> i32 { in bottom() argument [all …]
|
H A D | image.rs | 19 w: i32, 23 i: i32, 46 w: i32, 50 i: i32, 85 w: i32, 167 w: i32, 168 h: i32, 175 pub fn from_data(width: i32, height: i32, data: &'a mut [Color]) -> Self { in from_data() argument 185 pub fn width(&self) -> i32 { in width() argument 190 pub fn height(&self) -> i32 { in height() argument [all …]
|
H A D | window.rs | 24 pub x: i32, 26 pub y: i32, 28 pub scale: i32, 50 pub fn new(x: i32, y: i32, _w: i32, _h: i32, scale: i32, image_path: &[u8]) -> Window { in new() argument 62 .unwrap_or(Image::new(SCREEN_HEIGHT as i32, SCREEN_HEIGHT as i32)), in new() 69 pub fn width(&self) -> i32 { in width() argument 74 pub fn height(&self) -> i32 { in height() argument
|
H A D | display.rs | 11 pub x: i32, 13 pub y: i32, 20 pub fn new(x: i32, y: i32, width: i32, height: i32) -> Self { in new() argument 63 pub fn resize(&mut self, width: i32, height: i32) { in resize() argument
|
/StarryEngine/starry_client/src/ |
H A D | window.rs | 27 x: i32, 29 y: i32, 69 let width = min(self.width() as i32, SCREEN_WIDTH as i32 - self.x); in sync() 70 let height = min(self.height() as i32, SCREEN_HEIGHT as i32 - self.y); in sync() 72 for y in 0..height as i32 { in sync() 73 for x in 0..width as i32 { in sync() 75 let offset = (((y + self.y()) * SCREEN_WIDTH as i32) + x + self.x()) * 4; in sync() 96 pub fn new(x: i32, y: i32, w: u32, h: u32, title: &str, color: Color) -> Self { in new() argument 115 pub fn x(&self) -> i32 { in x() argument 120 pub fn y(&self) -> i32 { in y() argument [all …]
|
/StarryEngine/starry_server/src/core/ |
H A D | window_manager.rs | 64 pub cursor_x: Cell<i32>, 66 pub cursor_y: Cell<i32>, 83 cursor_x: Cell::new(SCREEN_WIDTH as i32 / 2), in new() 84 cursor_y: Cell::new(SCREEN_HEIGHT as i32 / 2), in new() 111 mut x: i32, in window_new() argument 112 mut y: i32, in window_new() argument 113 width: i32, in window_new() argument 114 height: i32, in window_new() argument 129 x = cmp::max(0, (SCREEN_WIDTH as i32 - width) / 2); in window_new() 130 y = cmp::max(0, (SCREEN_HEIGHT as i32 - height) / 2); in window_new() [all …]
|
H A D | mod.rs | 79 SCREEN_WIDTH as i32, in run() 80 SCREEN_HEIGHT as i32, in run()
|
H A D | compositor.rs | 124 let offset = (((y + display_redraw.top()) * SCREEN_WIDTH as i32) in redraw_all()
|
/StarryEngine/starry_toolkit/src/layout/ |
H A D | list.rs | 126 Vector2::new(x_offset as i32, y_offset as i32) in arrange_elements() 129 x_offset as i32, in arrange_elements() 130 y_offset as i32 + (max_size - element.rect().get().height) as i32 / 2, in arrange_elements() 133 x_offset as i32, in arrange_elements() 134 y_offset as i32 + (max_size - element.rect().get().height) as i32, in arrange_elements() 141 Vector2::new(x_offset as i32, y_offset as i32) in arrange_elements() 144 x_offset as i32 + (max_size - element.rect().get().width) as i32 / 2, in arrange_elements() 145 y_offset as i32, in arrange_elements() 148 x_offset as i32 + (max_size - element.rect().get().width) as i32, in arrange_elements() 149 y_offset as i32, in arrange_elements()
|
H A D | grid.rs | 35 space_x: Cell<i32>, 37 space_y: Cell<i32>, 156 pub fn set_space(&self, x: i32, y: i32) -> &Self { in set_space() argument 210 x += col.width as i32 + space_x; in arrange_elements() 216 y += row.height as i32 + space_y; 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()
|
/StarryEngine/starry_applications/src/asset_manager/code/ |
H A D | mod.rs | 47 Rect::new(SCREEN_WIDTH as i32 - 64, SCREEN_HEIGHT as i32 - 64, 64, 64), in new() 96 let row_offset: i32 = match char { in init_grid() 108 let col_offset: i32 = match char { in init_grid() 123 let mut nxt_row = grid.focused_id.get().unwrap().0 as i32 + row_offset; in init_grid() 124 let mut nxt_col = grid.focused_id.get().unwrap().1 as i32 + col_offset; in init_grid() 127 || nxt_row >= grid.max_row.get() as i32 in init_grid() 129 || nxt_col >= grid.max_column.get() as i32 in init_grid()
|
/StarryEngine/starry_toolkit/src/widgets/ |
H A D | image.rs | 32 Self::new_from_image(ImageResource::new(width as i32, height as i32)) in new() 37 width as i32, in new_from_color() 38 height as i32, in new_from_color() 78 self.rect.get().width as i32, in set_from_color() 79 self.rect.get().height as i32, in set_from_color()
|
H A D | label.rs | 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() 181 && current_rect.y + 16 <= origin_rect.y + origin_rect.height as i32 in draw()
|
/StarryEngine/starry_server/src/core/input/ |
H A D | inputs.rs | 118 dx: self.dx as i32 * self.scale as i32, in handle() 119 dy: self.dy as i32 * self.scale as i32, in handle()
|
/StarryEngine/starry_server/src/ |
H A D | main.rs | 15 SCREEN_WIDTH as i32, in main() 16 SCREEN_HEIGHT as i32, in main()
|
/StarryEngine/starry_toolkit/src/util/ |
H A D | mod.rs | 39 let negative_width = -(origin_rect.width as i32); in align_rect() 40 let negative_height = -(origin_rect.height as i32); in align_rect()
|