render_icon_surface


Description:

[ Version ( since = "3.10" ) ]
public Surface render_icon_surface (StyleContext context, IconSize size, int scale, Window? for_window)

Renders an icon using render_icon_pixbuf and converts it to a cairo surface.

Note:

Use IconTheme instead.

This function never returns null; if the icon can’t be rendered (perhaps because an image file fails to load), a default "missing image" icon will be returned instead.

Parameters:

this

a IconSet

context

a StyleContext

size

icon size (IconSize). A size of `(GtkIconSize)-1` means render at the size of the source and don’t scale.

scale

the window scale to render for

for_window

Window to optimize drawing for, or null

Returns:

a XlibSurface to be displayed