Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Rsvg.cleanup()¶
This function does nothing.
New in version 2.36.
Deprecated since version 2.46: No-op. This function should not be called from normal programs.
- Rsvg.init()¶
This function does nothing.
New in version 2.9.
Deprecated since version 2.36: There is no need to initialize librsvg.
- Rsvg.pixbuf_from_file(filename)¶
-
Loads a new
GdkPixbuf
from filename and returns it. The caller must assume the reference to the reurned pixbuf. If an error occurred, error is set andNULL
is returned.Deprecated since version ???: Use [ctor`Rsvg`.Handle.new_from_file] and [method`Rsvg`.Handle.render_document] instead.
- Rsvg.pixbuf_from_file_at_max_size(filename, max_width, max_height)¶
- Parameters:
- Raises:
- Returns:
A pixbuf, or
None
on error.- Return type:
Loads a new
GdkPixbuf
from filename and returns it. This pixbuf is uniformly scaled so that the it fits into a rectangle of sizemax_width * max_height
. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set andNULL
is returned.Deprecated since version ???: Use [ctor`Rsvg`.Handle.new_from_file] and [method`Rsvg`.Handle.render_document] instead.
- Rsvg.pixbuf_from_file_at_size(filename, width, height)¶
- Parameters:
- Raises:
- Returns:
A pixbuf, or
None
on error.- Return type:
Loads a new
GdkPixbuf
from filename and returns it. This pixbuf is scaled from the size indicated to the new size indicated by width and height. If both of these are -1, then the default size of the image being loaded is used. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set andNULL
is returned.Deprecated since version ???: Use [ctor`Rsvg`.Handle.new_from_file] and [method`Rsvg`.Handle.render_document] instead.
- Rsvg.pixbuf_from_file_at_zoom(filename, x_zoom, y_zoom)¶
- Parameters:
- Raises:
- Returns:
A pixbuf, or
None
on error.- Return type:
Loads a new
GdkPixbuf
from filename and returns it. This pixbuf is scaled from the size indicated by the file by a factor of x_zoom and y_zoom. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set andNULL
is returned.Deprecated since version ???: Use [ctor`Rsvg`.Handle.new_from_file] and [method`Rsvg`.Handle.render_document] instead.
- Rsvg.pixbuf_from_file_at_zoom_with_max(filename, x_zoom, y_zoom, max_width, max_height)¶
- Parameters:
- Raises:
- Returns:
A pixbuf, or
None
on error.- Return type:
Loads a new
GdkPixbuf
from filename and returns it. This pixbuf is scaled from the size indicated by the file by a factor of x_zoom and y_zoom. If the resulting pixbuf would be larger than max_width/max_heigh it is uniformly scaled down to fit in that rectangle. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set andNULL
is returned.Deprecated since version ???: Use [ctor`Rsvg`.Handle.new_from_file] and [method`Rsvg`.Handle.render_document] instead.
- Rsvg.set_default_dpi(dpi)¶
- Parameters:
dpi (
float
) – Dots Per Inch (aka Pixels Per Inch)
Do not use this function. Create an [class`Rsvg`.Handle] and call [method`Rsvg`.Handle.set_dpi] on it instead.
New in version 2.8.
Deprecated since version 2.42.3: This function used to set a global default DPI. However, it only worked if it was called before any [class`Rsvg`.Handle] objects had been created; it would not work after that. To avoid global mutable state, please use [method`Rsvg`.Handle.set_dpi] instead.
- Rsvg.set_default_dpi_x_y(dpi_x, dpi_y)¶
- Parameters:
Do not use this function. Create an [class`Rsvg`.Handle] and call [method`Rsvg`.Handle.set_dpi_x_y] on it instead.
New in version 2.8.
Deprecated since version 2.42.3: This function used to set a global default DPI. However, it only worked if it was called before any [class`Rsvg`.Handle] objects had been created; it would not work after that. To avoid global mutable state, please use [method`Rsvg`.Handle.set_dpi] instead.
- Rsvg.term()¶
This function does nothing.
New in version 2.9.
Deprecated since version 2.36: There is no need to de-initialize librsvg.