/StarryEngine/starry_client/src/base/ |
H A D | renderer.rs | 46 fn pixel(&mut self, x: i32, y: i32, color: Color) { in pixel() 55 if x >= 0 && y >= 0 && x < w as i32 && y < h as i32 { in pixel() 58 let old_color = &mut data[y as usize * w as usize + x as usize].data; in pixel() 85 fn char(&mut self, x: i32, y: i32, c: char, color: Color) { in char() 97 self.pixel(x + col, y + row, color); in char() 226 let mut y = 0; in arc() localVariable 229 while x >= y { in arc() 232 self.rect(x0 - x, y0 + y, x as u32, 1, color); in arc() 235 self.rect(x0, y0 + y, x as u32 + 1, 1, color); in arc() 238 self.rect(x0 - y, y0 + x, y as u32, 1, color); in arc() [all …]
|
H A D | graphicspath.rs | 12 y: i32, field 22 y: 0, in new() 28 pub fn move_to(&mut self, x: i32, y: i32) { in move_to() 29 self.points.push((x, y, PointType::Move)); in move_to() 31 self.y = y; in move_to() 35 pub fn line_to(&mut self, x: i32, y: i32) { in line_to() 36 self.points.push((x, y, PointType::Connect)); in line_to() 38 self.y = y; in line_to() 48 let mut y: f32; in quadratic_bezier_curve_to() localVariable 57 y = (self.y as f32) * uu; in quadratic_bezier_curve_to() [all …]
|
H A D | event.rs | 161 pub y: i32, field 170 b: self.y as i64, in to_event() 178 y: event.b as i32, in from_event() 187 pub y: i32, field 195 b: self.y as i64, in to_event() 202 y: event.b as i32, in from_event()
|
/StarryEngine/starry_toolkit/src/base/ |
H A D | rect.rs | 9 pub y: i32, field 17 pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rect { in new() 20 y: y, in new() 28 Vector2::new(self.x, self.y) in top_left_pos() 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() 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 | 9 pub y: i32, field 13 pub fn new(x: i32, y: i32) -> Self { in new() 14 Vector2 { x: x, y: y } in new() 24 y: self.y + other.y, in add() 35 y: self.y - other.y, in sub()
|
H A D | panel.rs | 105 Window::new(rect.x, rect.y, rect.width, rect.height, title, color), in new() 143 pub fn y(&self) -> i32 { in y() method 145 (*window).y() in y() 172 pub fn set_pos(&self, x: i32, y: i32) { in set_pos() 174 (*window).set_pos(x, y); in set_pos() 261 [rect.top_left_pos().x, rect.top_left_pos().y], in draw_rect_wireframe() 262 [rect.top_right_pos().x, rect.top_right_pos().y], in draw_rect_wireframe() 263 [rect.bottom_right_pos().x, rect.bottom_right_pos().y], in draw_rect_wireframe() 264 [rect.bottom_left_pos().x, rect.bottom_left_pos().y], in draw_rect_wireframe() 265 [rect.top_left_pos().x, rect.top_left_pos().y], in draw_rect_wireframe()
|
H A D | event.rs | 24 y: i32,
|
/StarryEngine/starry_client/src/ |
H A D | window.rs | 29 y: i32, field 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() 74 let pixel = self.get_pixel(x, y); 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() 99 y: y, in new() 120 pub fn y(&self) -> i32 { in y() method 121 self.y in y() 130 pub fn set_pos(&mut self, x: i32, y: i32) { in set_pos() [all …]
|
/StarryEngine/starry_server/src/base/ |
H A D | rect.rs | 9 y: i32, field 19 pub fn new(x: i32, y: i32, w: i32, h: i32) -> Rect { in new() 23 Rect { x, y, w, h } in new() 43 self.y in top() 48 self.y + self.h in bottom() 85 pub fn contains(&self, x: i32, y: i32) -> bool { in contains() 86 self.left() <= x && self.right() >= x && self.top() <= y && self.bottom() >= y in contains() 104 pub fn offset(&self, x: i32, y: i32) -> Rect { in offset() 105 Rect::new(self.x + x, self.y + y, self.w, self.h) in offset()
|
H A D | display.rs | 13 pub y: i32, field 20 pub fn new(x: i32, y: i32, width: i32, height: i32) -> Self { in new() 23 y, in new() 37 rect.top() - self.y, in rect() 56 rect.top() - self.y, in roi() 69 Rect::new(self.x, self.y, self.image.width(), self.image.height()) in screen_rect()
|
H A D | window.rs | 26 pub y: i32, field 50 pub fn new(x: i32, y: i32, _w: i32, _h: i32, scale: i32, image_path: &[u8]) -> Window { in new() 53 y: y, in new() 80 Rect::new(self.x, self.y, self.width(), self.height()) in rect()
|
H A D | image.rs | 283 for y in 0..img_heigh { in from_path() 285 let pixel = img.get_pixel(x, y); in from_path() 286 let offset = y * img_width + x; in from_path()
|
/StarryEngine/starry_server/src/core/ |
H A D | window_manager.rs | 112 mut y: i32, in window_new() 128 if x < 0 && y < 0 { in window_new() 130 y = cmp::max(0, (SCREEN_HEIGHT as i32 - height) / 2); in window_new() 135 let window = Window::new(x, y, width, height, 1, image_path); in window_new() 156 y: self.cursor_y.get(), in window_new() 214 let y = cmp::max( in handle_mouse_relative_event() localVariable 219 self.handle_mouse_update_event(MouseUpdateEvent { x, y }); in handle_mouse_relative_event() 229 self.update_cursor(event.x, event.y, new_cursor); in handle_mouse_update_event() 251 fn update_cursor(&self, x: i32, y: i32, kind: CursorKind) { in update_cursor() 254 if kind != self.cursor_i.get() || x != self.cursor_x.get() || y != self.cursor_y.get() { in update_cursor() [all …]
|
H A D | compositor.rs | 118 for y in 0..display_redraw.height() { in redraw_all() 122 y + display_redraw.top() - display.y, in redraw_all() 124 let offset = (((y + display_redraw.top()) * SCREEN_WIDTH as i32) in redraw_all()
|
/StarryEngine/starry_toolkit/src/layout/ |
H A D | grid.rs | 156 pub fn set_space(&self, x: i32, y: i32) -> &Self { in set_space() 158 self.space_y.set(y); in set_space() 213 let mut y = 0; in arrange_elements() localVariable 215 row.y = y; in arrange_elements() 216 y += row.height as i32 + space_y; in arrange_elements() 225 child.set_pivot_offset(Vector2::new(cols[col].x, rows[row].y)); in arrange_elements()
|
/StarryEngine/starry_toolkit/src/widgets/ |
H A D | label.rs | 177 current_rect.y += 16; in draw() 181 && current_rect.y + 16 <= origin_rect.y + origin_rect.height as i32 in draw() 188 renderer.char(local_rect.x, local_rect.y, char, self.text_color.get()); in draw()
|
H A D | image.rs | 129 local_rect.y, in draw()
|
/StarryEngine/starry_toolkit/src/util/ |
H A D | mod.rs | 58 target_pos.y, in align_rect() 76 source_rect.y - target_rect.y, in get_local_rect()
|