Handle.getPixbufSub

Creates a gdk.Pixbuf the same size as the entire SVG loaded into handle, but only renders the sub-element that has the specified id (and all its sub-sub-elements recursively). If id is NULL, this function renders the whole SVG.

If you need to render an image which is only big enough to fit a particular sub-element of the SVG, consider using Handle.renderCairoSub, upon a surface that is just the size returned by Handle.getDimensionsSub. You will need to offset the rendering by the amount returned in Handle.getPositionSub.

class Handle
getPixbufSub
(
string id
)

Parameters

id string

An element's id within the SVG, starting with "##", for example, "#layer1"; or NULL to use the whole SVG.

Return Value

Type: Pixbuf

a pixbuf, or NULL if an error occurs during rendering.

Meta

Since

2.14