Skip to main content

render_svg_centered

Function render_svg_centered 

Source
pub fn render_svg_centered(
    ui: &mut Ui,
    icon: &Icon,
    center: Pos2,
    size: f32,
    is_hovered: bool,
    is_active: bool,
)
Expand description

Render SVG icon at a centered position with specified size.

Convenience wrapper that creates a centered rect from a position.

ยงArguments

  • ui - The egui UI context
  • icon - The embedded Icon to render
  • center - Center position for the icon
  • size - Icon size (square)
  • is_hovered - Whether the icon is being hovered
  • is_active - Whether the icon is in active/selected state