iced::advanced::widget::text

Function draw

Source
pub fn draw<Renderer>(
    renderer: &mut Renderer,
    style: &Style,
    layout: Layout<'_>,
    paragraph: &<Renderer as Renderer>::Paragraph,
    appearance: Style,
    viewport: &Rectangle,
)
where Renderer: Renderer,
Available on crate feature advanced only.
Expand description

Draws text using the same logic as the Text widget.

Specifically:

  • If no size is provided, the default text size of the Renderer will be used.
  • If no color is provided, the renderer::Style::text_color will be used.
  • The alignment attributes do not affect the position of the bounds of the Layout.