Home
last modified time | relevance | path

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

/StarryEngine/starry_server/src/base/
H A Drect.rs5 pub struct Rect { struct
17 impl Rect { argument
19 pub fn new(x: i32, y: i32, w: i32, h: i32) -> Rect { in new() argument
23 Rect { x, y, w, h } in new()
62 pub fn container(&self, other: &Rect) -> Rect { in container() argument
71 Rect::new(left, top, right - left, bottom - top) in container()
75 pub fn intersection(&self, other: &Rect) -> Rect { in intersection() argument
81 Rect::new(left, top, max(0, right - left), max(0, bottom - top)) in intersection()
104 pub fn offset(&self, x: i32, y: i32) -> Rect { in offset() argument
105 Rect::new(self.x + x, self.y + y, self.w, self.h) in offset()
H A Ddisplay.rs5 rect::Rect,
34 pub fn rect(&mut self, rect: &Rect, color: Color) { in rect() argument
52 pub fn roi(&mut self, rect: &Rect) -> ImageRoi { in roi()
54 self.image.roi(&Rect::new( in roi()
68 pub fn screen_rect(&self) -> Rect { in screen_rect() argument
69 Rect::new(self.x, self.y, self.image.width(), self.image.height()) in screen_rect()
H A Dimage.rs12 use super::rect::Rect;
17 rect: Rect,
44 rect: Rect,
83 rect: Rect,
195 pub fn roi(&mut self, rect: &Rect) -> ImageRoi { in roi()
328 pub fn roi(&mut self, rect: &Rect) -> ImageRoi { in roi()
H A Dwindow.rs7 use super::{display::Display, image::Image, rect::Rect};
79 pub fn rect(&self) -> Rect { in rect() argument
80 Rect::new(self.x, self.y, self.width(), self.height()) in rect()
92 pub fn draw(&mut self, display: &mut Display, rect: &Rect) { in draw() argument
/StarryEngine/starry_toolkit/src/util/
H A Dmod.rs4 base::{panel::Panel, rect::Rect, vector2::Vector2},
19 origin_rect: Rect, in align_rect() argument
20 relative_rect: Rect, in align_rect() argument
23 ) -> Rect { in align_rect() argument
56 Rect::new( in align_rect()
73 pub fn get_local_rect(source_rect: Rect, target_rect: Rect) -> Rect { in get_local_rect() argument
74 Rect::new( in get_local_rect()
/StarryEngine/starry_toolkit/src/base/
H A Drect.rs5 pub struct Rect { struct
16 impl Rect { argument
17 pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rect { in new() argument
18 Rect { in new()
75 pub fn contains_rect(&self, r: &Rect) -> bool { in contains_rect()
82 pub fn intersects(&self, r: &Rect) -> bool { in intersects()
H A Dpanel.rs19 use super::{event::Event, rect::Rect};
85 rect: Cell<Rect>,
103 pub fn new(rect: Rect, title: &str, color: Color) -> Arc<Panel> { in new() argument
110 pub fn from_window(window: Window, rect: Rect) -> Arc<Panel> { in from_window()
161 pub fn rect(&self) -> Rect { in rect() argument
258 fn draw_rect_wireframe(renderer: &mut dyn Renderer, rect: Rect, color: Color) { in draw_rect_wireframe() argument
/StarryEngine/starry_toolkit/src/widgets/
H A Dlabel.rs11 base::{panel::Panel, rect::Rect, vector2::Vector2},
32 rect: Cell<Rect>,
45 text_rect: Cell<Rect>,
53 rect: Cell::new(Rect::default()), in new()
63 text_rect: Cell::new(Rect::default()), in new()
99 self.text_rect.set(Rect::new( in handle_overflow()
138 fn rect(&self) -> &Cell<Rect> { in rect() argument
H A Dmod.rs11 base::{event::Event, panel::Panel, rect::Rect, vector2::Vector2},
52 fn rect(&self) -> &Cell<Rect>; in rect() argument
151 let relative_rect: Rect = if self.parent().borrow().is_some() { in arrange_self_base()
159 Rect::new(0, 0, SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32) in arrange_self_base()
H A Dimage.rs10 base::{panel::Panel, rect::Rect, vector2::Vector2},
20 rect: Cell<Rect>,
46 rect: Cell::new(Rect::new(0, 0, image.width() as u32, image.height() as u32)), in new_from_image()
98 fn rect(&self) -> &Cell<Rect> { in rect() argument
/StarryEngine/starry_toolkit/src/layout/
H A Dgrid.rs11 base::{event::Event, panel::Panel, rect::Rect, vector2::Vector2},
28 rect: Cell<Rect>,
64 rect: Cell::new(Rect::default()), in new()
181 cols.push(Rect::default()); in arrange_elements()
184 rows.push(Rect::default()); in arrange_elements()
255 fn rect(&self) -> &Cell<Rect> { in rect() argument
H A Dlist.rs11 base::{panel::Panel, rect::Rect, vector2::Vector2},
33 rect: Cell<Rect>,
54 rect: Cell::new(Rect::default()), in new()
184 fn rect(&self) -> &Cell<Rect> { in rect() argument
/StarryEngine/starry_server/src/core/
H A Dcompositor.rs10 use crate::base::rect::Rect;
27 redraws: RefCell<Vec<Rect>>,
61 let mut total_redraw_rect_opt: Option<Rect> = None; in redraw_all()
140 pub fn request_redraw(&self, rect: Rect) { in request_redraw() argument
H A Dwindow_manager.rs15 rect::Rect,
269 pub fn cursor_rect(&self) -> Rect { in cursor_rect() argument
273 return Rect::new( in cursor_rect()
281 return Rect::new(self.cursor_x.get(), self.cursor_y.get(), 0, 0); in cursor_rect()
/StarryEngine/starry_applications/src/asset_manager/code/
H A Dasset_item_list.rs10 base::{panel::Panel, rect::Rect, vector2::Vector2},
21 pub rect: Cell<Rect>,
39 rect: Cell::new(Rect::new(0, 0, Self::ITEM_WIDTH, Self::ITEM_HEIGHT)), in new()
95 fn rect(&self) -> &Cell<Rect> { in rect() argument
H A Dasset_item_grid.rs10 base::{panel::Panel, rect::Rect, vector2::Vector2},
26 pub rect: Cell<Rect>,
45 rect: Cell::new(Rect::new(0, 0, Self::ITEM_WIDTH, Self::ITEM_HEIGHT)), in new()
100 fn rect(&self) -> &Cell<Rect> { in rect() argument
H A Dmod.rs9 base::{panel::Panel, rect::Rect},
42 Rect::new(0, 0, SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32), in new()
47 Rect::new(SCREEN_WIDTH as i32 - 64, SCREEN_HEIGHT as i32 - 64, 64, 64), in new()
/StarryEngine/starry_toolkit/src/
H A Dmain.rs5 rect::Rect,
14 Rect::new(0, 0, SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32), in main()