geometry: cut down on <> noise with associated types
This commit is contained in:
@@ -13,7 +13,7 @@ pub trait Shader: Send + Debug {
|
||||
}
|
||||
|
||||
pub trait Surfaces<T: Surface>: Debug {
|
||||
fn new_surface(&mut self, area: &Rectangle<u8, Virtual>) -> Result<T, io::Error>;
|
||||
fn new_surface(&mut self, area: &Rectangle<Virtual>) -> Result<T, io::Error>;
|
||||
}
|
||||
|
||||
pub trait Surface: Default + Clone + Debug {
|
||||
@@ -21,8 +21,8 @@ pub trait Surface: Default + Clone + Debug {
|
||||
fn set_shader(&mut self, shader: Box<dyn Shader>);
|
||||
fn clear_shader(&mut self);
|
||||
|
||||
fn rect(&self) -> Rectangle<u8, Virtual>;
|
||||
fn set_rect(&mut self, rect: &Rectangle<u8, Virtual>);
|
||||
fn rect(&self) -> Rectangle<Virtual>;
|
||||
fn set_rect(&mut self, rect: &Rectangle<Virtual>);
|
||||
fn opacity(&self) -> u8;
|
||||
fn set_opacity(&mut self, opacity: u8);
|
||||
}
|
||||
|
Reference in New Issue
Block a user