set_size_callback
Description:
public void set_size_callback (owned SizeFunc? size_func)
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 [method@Rsvg.Handle.render_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:
* [method@Rsvg.Handle.get_dimensions] * [method@Rsvg.Handle.get_dimensions_sub] * [method@Rsvg.Handle.get_position_sub] * [ method@Rsvg.Handle.render_cairo] * [method@Rsvg.Handle.render_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.
Parameters:
this |
An [class@Rsvg.Handle] |
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 |