![]() |
![]() |
![]() |
RSVG Reference Manual | ![]() |
---|
Utility/Convenience FunctionsUtility/Convenience Functions — |
GdkPixbuf* rsvg_pixbuf_from_file (const gchar *file_name, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_zoom (const gchar *file_name, double x_zoom, double y_zoom, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_size (const gchar *file_name, gint width, gint height, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_max_size (const gchar *file_name, gint max_width, gint max_height, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_zoom_with_max (const gchar *file_name, double x_zoom, double y_zoom, gint max_width, gint max_height, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_ex (RsvgHandle *handle, const gchar *file_name, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_zoom_ex (RsvgHandle *handle, const gchar *file_name, double x_zoom, double y_zoom, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_size_ex (RsvgHandle *handle, const gchar *file_name, gint width, gint height, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_max_size_ex (RsvgHandle *handle, const gchar *file_name, gint max_width, gint max_height, GError **error); GdkPixbuf* rsvg_pixbuf_from_file_at_zoom_with_max_ex (RsvgHandle *handle, const gchar *file_name, double x_zoom, double y_zoom, gint max_width, gint max_height, GError **error);
GdkPixbuf* rsvg_pixbuf_from_file (const gchar *file_name, GError **error);
Loads a new GdkPixbuf from file_name
and returns it. The caller must
assume the reference to the reurned pixbuf. If an error occurred, error
is
set and NULL
is returned.
file_name : |
A file name |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
GdkPixbuf* rsvg_pixbuf_from_file_at_zoom (const gchar *file_name, double x_zoom, double y_zoom, GError **error);
Loads a new GdkPixbuf from file_name
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 and NULL
is returned.
file_name : |
A file name |
x_zoom : |
The horizontal zoom factor |
y_zoom : |
The vertical zoom factor |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
GdkPixbuf* rsvg_pixbuf_from_file_at_size (const gchar *file_name, gint width, gint height, GError **error);
Loads a new GdkPixbuf from file_name
and returns it. This pixbuf is scaled
from the size indicated to the new size indicated by width
and height
. If
either 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 and NULL
is returned.
file_name : |
A file name |
width : |
The new width, or -1 |
height : |
The new height, or -1 |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
GdkPixbuf* rsvg_pixbuf_from_file_at_max_size (const gchar *file_name, gint max_width, gint max_height, GError **error);
Loads a new GdkPixbuf from file_name
and returns it. This pixbuf is uniformly
scaled so that the it fits into a rectangle of size max_width * max_height. The
caller must assume the reference to the returned pixbuf. If an error occurred,
error
is set and NULL
is returned.
file_name : |
A file name |
max_width : |
The requested max width |
max_height : |
The requested max heigh |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
GdkPixbuf* rsvg_pixbuf_from_file_at_zoom_with_max (const gchar *file_name, double x_zoom, double y_zoom, gint max_width, gint max_height, GError **error);
Loads a new GdkPixbuf from file_name
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 and NULL
is returned.
file_name : |
A file name |
x_zoom : |
The horizontal zoom factor |
y_zoom : |
The vertical zoom factor |
max_width : |
The requested max width |
max_height : |
The requested max heigh |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
GdkPixbuf* rsvg_pixbuf_from_file_ex (RsvgHandle *handle, const gchar *file_name, GError **error);
Loads a new GdkPixbuf from file_name
and returns it. The caller must
assume the reference to the reurned pixbuf. If an error occurred, error
is
set and NULL
is returned. Returned handle is closed by this call and must be
freed by the caller.
handle : |
The RSVG handle you wish to render with (either normal or gzipped) |
file_name : |
A file name |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
Since 2.4
GdkPixbuf* rsvg_pixbuf_from_file_at_zoom_ex (RsvgHandle *handle, const gchar *file_name, double x_zoom, double y_zoom, GError **error);
Loads a new GdkPixbuf from file_name
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 and NULL
is returned. Returned handle is closed by this
call and must be freed by the caller.
handle : |
The RSVG handle you wish to render with (either normal or gzipped) |
file_name : |
A file name |
x_zoom : |
The horizontal zoom factor |
y_zoom : |
The vertical zoom factor |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
Since 2.4
GdkPixbuf* rsvg_pixbuf_from_file_at_size_ex (RsvgHandle *handle, const gchar *file_name, gint width, gint height, GError **error);
Loads a new GdkPixbuf from file_name
and returns it. This pixbuf is scaled
from the size indicated to the new size indicated by width
and height
. If
either 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 and NULL
is returned. Returned handle is closed
by this call and must be freed by the caller.
handle : |
The RSVG handle you wish to render with (either normal or gzipped) |
file_name : |
A file name |
width : |
The new width, or -1 |
height : |
The new height, or -1 |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
Since 2.4
GdkPixbuf* rsvg_pixbuf_from_file_at_max_size_ex (RsvgHandle *handle, const gchar *file_name, gint max_width, gint max_height, GError **error);
Loads a new GdkPixbuf from file_name
and returns it. This pixbuf is uniformly
scaled so that the it fits into a rectangle of size max_width * max_height. The
caller must assume the reference to the returned pixbuf. If an error occurred,
error
is set and NULL
is returned. Returned handle is closed by this call and
must be freed by the caller.
handle : |
The RSVG handle you wish to render with (either normal or gzipped) |
file_name : |
A file name |
max_width : |
The requested max width |
max_height : |
The requested max heigh |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
Since 2.4
GdkPixbuf* rsvg_pixbuf_from_file_at_zoom_with_max_ex (RsvgHandle *handle, const gchar *file_name, double x_zoom, double y_zoom, gint max_width, gint max_height, GError **error);
Loads a new GdkPixbuf from file_name
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 and NULL
is returned.
Returned handle is closed by this call and must be freed by the caller.
handle : |
The RSVG handle you wish to render with (either normal or gzipped) |
file_name : |
A file name |
x_zoom : |
The horizontal zoom factor |
y_zoom : |
The vertical zoom factor |
max_width : |
The requested max width |
max_height : |
The requested max heigh |
error : |
return location for errors |
Returns : | A newly allocated GdkPixbuf, or NULL
|
Since 2.4
<< Utility and Convenience Functions | Index >> |