Callbacks

SizeFunc (*user_data)

Details

Rsvg.SizeFunc(*user_data)
Parameters:

user_data (object or None) – user data

Returns:

width:

the width of the SVG

height:

the height of the SVG

Return type:

(width: int, height: int)

Function to let a user of the library specify the SVG’s dimensions

See the documentation for [method`Rsvg`.Handle.set_size_callback] for an example, and for the reasons for deprecation.

Deprecated since version 2.14.: Use [method`Rsvg`.Handle.render_document] instead, which lets you specify a viewport size in which to render the SVG document.