Function iced_native::widget::text::draw

source ·
pub fn draw<Renderer>(
    renderer: &mut Renderer,
    style: &Style,
    layout: Layout<'_>,
    content: &str,
    size: Option<f32>,
    font: Renderer::Font,
    appearance: Appearance,
    horizontal_alignment: Horizontal,
    vertical_alignment: Vertical
)where
    Renderer: Renderer,
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.