Struct cognitive_aesthetics::Background
[−]
[src]
pub struct Background<C> where
C: AestheticsCoordinationTrait, { /* fields omitted */ }
State of the background.
Methods
impl<C> Background<C> where
C: AestheticsCoordinationTrait,
[src]
C: AestheticsCoordinationTrait,
fn new(coordinator: C, config: AestheticsConfig) -> Self
Constructs new Background
.
fn set_background(&mut self)
Reads in background image file and creates surface to be displayed as background.
TODO: Background currently is placed at top left corner. Make it configurable to be centred, stretched, etc...
NOTE: image::open
spawns four threads when opening JPEG images and does not close them.
impl<C> Background<C> where
C: AestheticsCoordinationTrait,
[src]
C: AestheticsCoordinationTrait,
fn on_surface_change(&mut self, sid: SurfaceId)
Handles background surface change request.
fn on_display_created(&mut self)
Handles creation of display.