Handle.setSizeCallback

Sets the sizing function for the handle, which can be used to override the size that librsvg computes for SVG images. The size_func is called from the following functions:

Librsvg computes the size of the SVG being rendered, and passes it to the size_func, which may then modify these values to set the final size of the generated image.

More...
class Handle
void
setSizeCallback

Parameters

sizeFunc rsvg.types.SizeFunc

A sizing function, or NULL

Detailed Description

Deprecated: Use rsvg.handle.Handle.renderDocument instead. This function was deprecated because when the size_func is used, it makes it unclear when the librsvg functions which call the size_func will use the size computed originally, or the callback-specified size, or whether it refers to the whole SVG or to just a sub-element of it. It is easier, and unambiguous, to use code similar to the example above.