/StarryEngine/starry_client/src/base/ |
H A D | color.rs | 5 pub struct Color { struct 11 impl Color { impl 14 Color { in rgb() 21 Color { in rgba() 47 pub fn interpolate(from_color: Color, to_color: Color, scale: f64) -> Color { in interpolate() argument 48 let r = Color::value_interpolate(from_color.r(), to_color.r(), scale); in interpolate() 49 let g = Color::value_interpolate(from_color.r(), to_color.r(), scale); in interpolate() 50 let b = Color::value_interpolate(from_color.r(), to_color.r(), scale); in interpolate() 51 let a = Color::value_interpolate(from_color.r(), to_color.r(), scale); in interpolate() 52 Color::rgba(r, g, b, a) in interpolate() [all …]
|
H A D | renderer.rs | 4 color::Color, 28 fn data(&self) -> &[Color]; in data() argument 31 fn data_mut(&mut self) -> &mut [Color]; in data_mut() argument 46 fn pixel(&mut self, x: i32, y: i32, color: Color) { in pixel() argument 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 [all …]
|
/StarryEngine/starry_server/src/base/ |
H A D | image.rs | 6 color::Color, 21 data: &'a [Color], 28 type Item = &'a [Color]; 48 data: &'a mut [Color], 55 type Item = &'a mut [Color]; 87 data: &'a mut [Color], 92 type Item = &'a [Color]; 169 data: &'a mut [Color], 175 pub fn from_data(width: i32, height: i32, data: &'a mut [Color]) -> Self { in from_data() 213 fn data(&self) -> &[Color] { in data() argument [all …]
|
H A D | display.rs | 1 use starry_client::base::{color::Color, renderer::Renderer}; 34 pub fn rect(&mut self, rect: &Rect, color: Color) { in rect() argument
|
/StarryEngine/starry_toolkit/src/ |
H A D | main.rs | 1 use starry_client::base::color::Color; 16 Color::rgb(255, 255, 255), in main() 21 let image1 = Image::new_from_color(32, 32, Color::rgb(128, 255, 255)); in main() 22 let image2 = Image::new_from_color(32, 32, Color::rgb(128, 255, 255)); in main() 23 let image3 = Image::new_from_color(32, 32, Color::rgb(128, 255, 255)); in main() 24 let image4 = Image::new_from_color(32, 32, Color::rgb(128, 255, 255)); in main() 25 let image5 = Image::new_from_color(32, 32, Color::rgb(128, 255, 255)); in main()
|
/StarryEngine/starry_client/src/ |
H A D | window.rs | 9 color::Color, 45 data_opt: Option<Box<[Color]>>, 59 fn data(&self) -> &[Color] { in data() argument 63 fn data_mut(&mut self) -> &mut [Color] { in data_mut() argument 96 pub fn new(x: i32, y: i32, w: u32, h: u32, title: &str, color: Color) -> Self { in new()
|
/StarryEngine/starry_toolkit/src/base/ |
H A D | panel.rs | 3 color::Color, 56 fn data(&self) -> &[Color] { in data() argument 60 fn data_mut(&mut self) -> &mut [Color] { in data_mut() argument 103 pub fn new(rect: Rect, title: &str, color: Color) -> Arc<Panel> { in new() 238 Self::draw_rect_wireframe(renderer, widget.rect().get(), Color::rgb(0, 0, 0)); in draw_widget() 252 Self::draw_rect_wireframe(renderer, child.rect().get(), Color::rgb(0, 0, 0)); in draw_widget() 258 fn draw_rect_wireframe(renderer: &mut dyn Renderer, rect: Rect, color: Color) { in draw_rect_wireframe() argument
|
/StarryEngine/starry_applications/src/asset_manager/code/ |
H A D | asset_item_grid.rs | 8 use starry_client::base::{color::Color, renderer::Renderer}; 60 Image::new_from_color(Self::ITEM_WIDTH, Self::ITEM_HEIGHT, Color::rgba(0, 0, 0, 0)); in new() 136 bg_image.set_from_color(Color::rgba(0, 255, 255, 64)); in draw() 138 bg_image.set_from_color(Color::rgba(0, 0, 0, 0)); in draw()
|
H A D | mod.rs | 4 use starry_client::base::color::Color; 44 Color::rgb(0, 0, 0), in new() 49 Color::rgb(255, 255, 255), in new()
|
H A D | asset_item_list.rs | 8 use starry_client::base::{color::Color, renderer::Renderer}; 55 Color::rgba(0, 255, 255, 64), in new()
|
/StarryEngine/starry_toolkit/src/widgets/ |
H A D | label.rs | 8 use starry_client::base::{color::Color, renderer::Renderer}; 42 text_color: Cell<Color>, 61 text_color: Cell::new(Color::rgb(0, 0, 0)), // 默认黑色字体 in new() 248 fn set_text_color(&self, color: Color) -> &Self { in set_text_color()
|
H A D | image.rs | 7 use starry_client::base::{color::Color, renderer::Renderer}; 35 pub fn new_from_color(width: u32, height: u32, color: Color) -> Arc<Self> { in new_from_color() 76 pub fn set_from_color(&self, color: Color) { in set_from_color() argument
|
/StarryEngine/starry_toolkit/src/traits/ |
H A D | text.rs | 1 use starry_client::base::color::Color; 6 fn set_text_color(&self, color: Color) -> &Self; in set_text_color()
|