Struct ytesrev::solid::Solid [−][src]
pub struct Solid { pub color: Color, // some fields omitted }
A solid, fillid with a color
Fields
color: Color
The color
Methods
impl Solid
[src]
impl Solid
pub fn new_sdl2(color: Color) -> Solid
[src]
pub fn new_sdl2(color: Color) -> Solid
Create a Solid from an sdl2 color
pub fn new_rgba(r: u8, g: u8, b: u8, a: u8) -> Solid
[src]
pub fn new_rgba(r: u8, g: u8, b: u8, a: u8) -> Solid
Create a Solid from a rgba values
Trait Implementations
impl Drawable for Solid
[src]
impl Drawable for Solid
fn content(&self) -> Vec<&Drawable>
[src]
fn content(&self) -> Vec<&Drawable>
What this object contains
fn content_mut(&mut self) -> Vec<&mut Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut Drawable>
What this object contains, mutably
fn step(&mut self)
[src]
fn step(&mut self)
When the user presses space, the state of the presentation is advanced. This method is what is called. Read more
fn state(&self) -> State
[src]
fn state(&self) -> State
What state the object is in
fn draw(
&mut self,
canvas: &mut Canvas<Window>,
position: &Position,
_settings: DrawSettings
)
[src]
fn draw(
&mut self,
canvas: &mut Canvas<Window>,
position: &Position,
_settings: DrawSettings
)
Draw everything
fn register(&mut self)
[src]
fn register(&mut self)
Register all content. This is mostly just used by [LatexObj
]s, that need to be registered before loaded. Read more
fn load(&mut self)
[src]
fn load(&mut self)
Load all content
fn update(&mut self, dt: f64)
[src]
fn update(&mut self, dt: f64)
Tick the object