IconSet.renderIconSurface
cairo.surface.Surface renderIconSurface(gtk.style_context.StyleContext context, gtk.types.IconSize size, int scale, gdk.window.Window forWindow = null)Renders an icon using [gtk.global.renderIconPixbuf] and converts it to a cairo surface.
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
context | a #GtkStyleContext |
size | icon size (#GtkIconSize). A size of (GtkIconSize)-1 means render at the size of the source and don’t scale. |
scale | the window scale to render for |
forWindow | #GdkWindow to optimize drawing for, or null |
Returns
a #cairo_surface_t to be displayed
Deprecated
Use #GtkIconTheme instead.