Struct leechbar::Background
[−]
[src]
pub struct Background { /* fields omitted */ }
Background of a component.
This is used to configure image- and color-based component backgrounds.
Examples
use leechbar::{Alignment, Background, Color}; let bg = Background::new() .color(Color::new(255, 0, 255, 255)) .alignment(Alignment::CENTER);
Methods
impl Background
[src]
fn new() -> Self
[src]
Create a new empty background
fn image<T: Into<Image>>(self, image: T) -> Self
[src]
Set the background image.
fn color(self, color: Color) -> Self
[src]
Set the background color.
fn alignment(self, alignment: Alignment) -> Self
[src]
Set the alignment of the background image.
This does nothing for a new_color
background.
Default: Alignment::CENTER
Trait Implementations
impl Clone for Background
[src]
fn clone(&self) -> Background
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<Image> for Background
[src]
fn from(image: Image) -> Background
[src]
Performs the conversion.
impl From<Color> for Background
[src]
fn from(color: Color) -> Background
[src]
Performs the conversion.