Warning: set_size_callback is deprecated since 2.14..
Sets the sizing function for the this, which can be used to override the size that librsvg computes for SVG images.
Use [[email protected]_document] 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.
The size_func
is called from the following functions:
* [[email protected]_dimensions] * [[email protected]_dimensions_sub] * [[email protected]_position_sub] * [ [email protected]_cairo] * [[email protected]_cairo_sub]
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.
this |
An [[email protected]] |
size_func |
A sizing function, or `NULL` |
user_data |
User data to pass to |
user_data_destroy |
Function to be called to destroy the data passed in |