ferroui-base 0.2.0

The base library of FerroUI: the property system, layout, input, styling, media, text, animation, data binding and the compositor
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::platform::IDrawingContextImpl;

/// What a visual renders its own content with.
pub struct ServerVisualRenderContext<'a> {
    canvas: &'a mut dyn IDrawingContextImpl,
}

impl<'a> ServerVisualRenderContext<'a> {
    pub fn new(canvas: &'a mut dyn IDrawingContextImpl) -> Self {
        Self { canvas }
    }

    pub fn canvas(&mut self) -> &mut dyn IDrawingContextImpl {
        self.canvas
    }
}