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]

[src]

Create a new empty background

[src]

Set the background image.

[src]

Set the background color.

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<Image> for Background
[src]

[src]

Performs the conversion.

impl From<Color> for Background
[src]

[src]

Performs the conversion.

impl Default for Background
[src]

[src]

Returns the "default value" for a type. Read more