![]() |
![]() |
![]() |
RSVG Libary Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
Using RSVG with GdkPixbufUsing RSVG with GdkPixbuf — How to render SVGs into GdkPixbufs, for easy use in GTK+ applications |
GdkPixbuf * rsvg_handle_get_pixbuf (RsvgHandle *handle
);GdkPixbuf * rsvg_handle_get_pixbuf_sub (RsvgHandle *handle
,const
);char *idGdkPixbuf * rsvg_pixbuf_from_file (const
,gchar *file_name);
GError **errorGdkPixbuf * rsvg_pixbuf_from_file_at_zoom (const
,gchar *file_name,
double x_zoom,
double y_zoom);
GError **errorGdkPixbuf * rsvg_pixbuf_from_file_at_size (const
,gchar *file_name,
gint width,
gint height);
GError **errorGdkPixbuf * rsvg_pixbuf_from_file_at_max_size (const
,gchar *file_name,
gint max_width,
gint max_height);
GError **errorGdkPixbuf * 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 is a library for image loading and manipulation. It is part of the cross-platform GTK+ widget toolkit.
GdkPixbuf * rsvg_handle_get_pixbuf (RsvgHandle *handle
);
Returns the pixbuf loaded by NULL
rsvg_handle_close
has been called.
|
An RsvgHandle |
Returns : |
the pixbuf loaded by NULL |
GdkPixbuf * rsvg_handle_get_pixbuf_sub (RsvgHandle *handle
,const
);char *id
Returns the pixbuf loaded by NULL
rsvg_handle_close
has been called.
|
An RsvgHandle |
|
The id of an element inside the SVG, or NULL |
Returns : |
the pixbuf loaded by NULL |
Since 2.14
GdkPixbuf * rsvg_pixbuf_from_file (const
,gchar *file_name);
GError **error
rsvg_pixbuf_from_file
is deprecated and should not be used in newly-written code. Set up a cairo matrix and use rsvg_handle_new_from_file()
+ rsvg_handle_render_cairo()
instead.
Loads a new file_name
and returns it. The caller must
assume the reference to the reurned pixbuf. If an error occurred, error
is
set and NULL
|
A file name |
|
return location for errors |
Returns : |
A newly allocated NULL |
GdkPixbuf * rsvg_pixbuf_from_file_at_zoom (const
,gchar *file_name,
double x_zoom,
double y_zoom);
GError **error
rsvg_pixbuf_from_file_at_zoom
is deprecated and should not be used in newly-written code. Set up a cairo matrix and use rsvg_handle_new_from_file()
+ rsvg_handle_render_cairo()
instead.
Loads a new 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
|
A file name |
|
The horizontal zoom factor |
|
The vertical zoom factor |
|
return location for errors |
Returns : |
A newly allocated NULL |
GdkPixbuf * rsvg_pixbuf_from_file_at_size (const
,gchar *file_name,
gint width,
gint height);
GError **error
rsvg_pixbuf_from_file_at_size
is deprecated and should not be used in newly-written code. Set up a cairo matrix and use rsvg_handle_new_from_file()
+ rsvg_handle_render_cairo()
instead.
Loads a new 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
|
A file name |
|
The new width, or -1 |
|
The new height, or -1 |
|
return location for errors |
Returns : |
A newly allocated NULL |
GdkPixbuf * rsvg_pixbuf_from_file_at_max_size (const
,gchar *file_name,
gint max_width,
gint max_height);
GError **error
rsvg_pixbuf_from_file_at_max_size
is deprecated and should not be used in newly-written code. Set up a cairo matrix and use rsvg_handle_new_from_file()
+ rsvg_handle_render_cairo()
instead.
Loads a new 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
|
A file name |
|
The requested max width |
|
The requested max heigh |
|
return location for errors |
Returns : |
A newly allocated 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
rsvg_pixbuf_from_file_at_zoom_with_max
is deprecated and should not be used in newly-written code. Set up a cairo matrix and use rsvg_handle_new_from_file()
+ rsvg_handle_render_cairo()
instead.
Loads a new 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
|
A file name |
|
The horizontal zoom factor |
|
The vertical zoom factor |
|
The requested max width |
|
The requested max heigh |
|
return location for errors |
Returns : |
A newly allocated NULL |