pub fn render_icon(
    context: &impl IsA<StyleContext>,
    cr: &Context,
    pixbuf: &Pixbuf,
    x: f64,
    y: f64
)
Expand description

Renders the icon in pixbuf at the specified x and y coordinates.

This function will render the icon in pixbuf at exactly its size, regardless of scaling factors, which may not be appropriate when drawing on displays with high pixel densities.

You probably want to use render_icon_surface() instead, if you already have a Cairo surface.

context

a StyleContext

cr

a cairo::Context

pixbuf

a gdk_pixbuf::Pixbuf containing the icon to draw

x

X position for the pixbuf

y

Y position for the pixbuf