Home
last modified time | relevance | path

Searched refs:x (Results 1 – 18 of 18) sorted by relevance

/StarryEngine/starry_client/src/base/
H A Drenderer.rs46 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()
225 let mut x = radius.abs(); 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 Dgraphicspath.rs10 x: i32, field
21 x: 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()
30 self.x = x; 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()
37 self.x = x; in line_to()
47 let mut x: f32; in quadratic_bezier_curve_to() localVariable
56 x = (self.x as f32) * uu; in quadratic_bezier_curve_to()
[all …]
H A Devent.rs159 pub x: i32, field
169 a: self.x as i64, in to_event()
177 x: event.a as i32, in from_event()
186 pub x: i32, field
194 a: self.x as i64, in to_event()
201 x: event.a as i32, in from_event()
/StarryEngine/starry_toolkit/src/base/
H A Drect.rs7 pub x: i32, field
17 pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rect { in new()
19 x: x, 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()
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()
55 Vector2::new(self.x, self.y + self.height as i32) in bottom_left_pos()
[all …]
H A Dvector2.rs7 pub x: i32, field
13 pub fn new(x: i32, y: i32) -> Self { in new()
14 Vector2 { x: x, y: y } in new()
23 x: self.x + other.x, in add()
34 x: self.x - other.x, in sub()
H A Dpanel.rs105 Window::new(rect.x, rect.y, rect.width, rect.height, title, color), in new()
137 pub fn x(&self) -> i32 { in x() method
139 (*window).x() in x()
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 Devent.rs23 x: i32,
/StarryEngine/starry_client/src/
H A Dwindow.rs27 x: i32, field
69 let width = min(self.width() as i32, SCREEN_WIDTH as i32 - self.x); in sync()
73 for x in 0..width 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()
98 x: x, in new()
115 pub fn x(&self) -> i32 { in x() method
116 self.x in x()
130 pub fn set_pos(&mut self, x: i32, y: i32) { in set_pos()
[all …]
/StarryEngine/starry_server/src/base/
H A Drect.rs7 x: 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()
33 self.x in left()
38 self.x + self.w in right()
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 Ddisplay.rs11 pub x: i32, field
20 pub fn new(x: i32, y: i32, width: i32, height: i32) -> Self { in new()
22 x, in new()
36 rect.left() - self.x, in rect()
55 rect.left() - self.x, in roi()
69 Rect::new(self.x, self.y, self.image.width(), self.image.height()) in screen_rect()
H A Dwindow.rs24 pub x: i32, field
50 pub fn new(x: i32, y: i32, _w: i32, _h: i32, scale: i32, image_path: &[u8]) -> Window { in new()
52 x: x, in new()
80 Rect::new(self.x, self.y, self.width(), self.height()) in rect()
H A Dimage.rs284 for x in 0..img_width as u32 { 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 Dwindow_manager.rs111 mut x: i32, in window_new()
128 if x < 0 && y < 0 { 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()
155 x: self.cursor_x.get(), in window_new()
210 let x = 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 Dcompositor.rs119 for x in 0..display_redraw.width() { in redraw_all()
121 x + display_redraw.left() - display.x, in redraw_all()
125 + x in redraw_all()
/StarryEngine/starry_toolkit/src/widgets/
H A Dlabel.rs165 let origin_x = origin_rect.x; in draw()
176 current_rect.x = origin_x; in draw()
180 if current_rect.x + 8 <= origin_rect.x + origin_rect.width as i32 in draw()
188 renderer.char(local_rect.x, local_rect.y, char, self.text_color.get()); in draw()
193 current_rect.x += 8; in draw()
H A Dimage.rs128 local_rect.x, in draw()
/StarryEngine/starry_toolkit/src/layout/
H A Dgrid.rs156 pub fn set_space(&self, x: i32, y: i32) -> &Self { in set_space()
157 self.space_x.set(x); in set_space()
207 let mut x = 0; in arrange_elements() localVariable
209 col.x = x; in arrange_elements()
210 x += col.width as i32 + space_x; in arrange_elements()
225 child.set_pivot_offset(Vector2::new(cols[col].x, rows[row].y)); in arrange_elements()
/StarryEngine/starry_toolkit/src/util/
H A Dmod.rs57 target_pos.x, in align_rect()
75 source_rect.x - target_rect.x, in get_local_rect()