Function lazybar_core::draw_common

source ยท
pub fn draw_common(
    cr: &Rc<Context>,
    text: &str,
    attrs: &Attrs,
    dependence: Dependence,
    height: i32,
) -> Result<PanelDrawInfo>
Expand description

The end of a typical draw function.

Takes a cairo context, a string to display, and attributes to use, and returns a closure that will do the drawing and a tuple representing the final width and height.

The text will be interpreted as markup. If this is not your intended behavior, use markup_escape_text to display what you want or implement this functionality manually.