|
LIBRSVG 2.62.3
C library for rendering SVG
|
Intrinsic size and element geometry. More...
Functions | |
| void | rsvg_handle_get_dimensions (RsvgHandle *handle, RsvgDimensionData *dimension_data) |
| rsvg_handle_get_dimensions: | |
| gboolean | rsvg_handle_get_dimensions_sub (RsvgHandle *handle, RsvgDimensionData *dimension_data, const char *id) |
| rsvg_handle_get_dimensions_sub: | |
| gboolean | rsvg_handle_get_position_sub (RsvgHandle *handle, RsvgPositionData *position_data, const char *id) |
| rsvg_handle_get_position_sub: | |
| gboolean | rsvg_handle_has_sub (RsvgHandle *handle, const char *id) |
rsvg_handle_has_sub: @handle: an #RsvgHandle @id: element id starting with # | |
| void | rsvg_handle_get_intrinsic_dimensions (RsvgHandle *handle, gboolean *out_has_width, RsvgLength *out_width, gboolean *out_has_height, RsvgLength *out_height, gboolean *out_has_viewbox, RsvgRectangle *out_viewbox) |
| rsvg_handle_get_intrinsic_dimensions: @handle: an #RsvgHandle @out_has_width: (out)(optional): whether the SVG has a width @out_width: (out)(optional): width as an RsvgLength @out_has_height: (out)(optional): whether the SVG has a height @out_height: (out)(optional): height as an RsvgLength @out_has_viewbox: (out)(optional): whether the SVG has a viewBox @out_viewbox: (out)(optional): viewBox as an #RsvgRectangle | |
| gboolean | rsvg_handle_get_intrinsic_size_in_pixels (RsvgHandle *handle, gdouble *out_width, gdouble *out_height) |
| rsvg_handle_get_intrinsic_size_in_pixels: @handle: an #RsvgHandle @out_width: (out)(optional): width in pixels @out_height: (out)(optional): height in pixels | |
| gboolean | rsvg_handle_get_geometry_for_layer (RsvgHandle *handle, const char *id, const RsvgRectangle *viewport, RsvgRectangle *out_ink_rect, RsvgRectangle *out_logical_rect, GError **error) |
| Geometry of an element (or the whole SVG) as if rendered to @viewport. | |
| gboolean | rsvg_handle_get_geometry_for_element (RsvgHandle *handle, const char *id, RsvgRectangle *out_ink_rect, RsvgRectangle *out_logical_rect, GError **error) |
rsvg_handle_get_geometry_for_element: @handle: an #RsvgHandle @id: (nullable): element id starting with #, or NULL for the whole SVG @out_ink_rect: (out)(optional): ink rectangle @out_logical_rect: (out)(optional): logical rectangle @error: return location for a #GError | |
Intrinsic size and element geometry.
Prefer rsvg_handle_get_intrinsic_dimensions(), rsvg_handle_get_intrinsic_size_in_pixels(), and rsvg_handle_get_geometry_for_layer().
| void rsvg_handle_get_dimensions | ( | RsvgHandle * | handle, |
| RsvgDimensionData * | dimension_data | ||
| ) |
#include <rsvg.h>
rsvg_handle_get_dimensions:
| gboolean rsvg_handle_get_dimensions_sub | ( | RsvgHandle * | handle, |
| RsvgDimensionData * | dimension_data, | ||
| const char * | id | ||
| ) |
#include <rsvg.h>
rsvg_handle_get_dimensions_sub:
| gboolean rsvg_handle_get_geometry_for_element | ( | RsvgHandle * | handle, |
| const char * | id, | ||
| RsvgRectangle * | out_ink_rect, | ||
| RsvgRectangle * | out_logical_rect, | ||
| GError ** | error | ||
| ) |
#include <rsvg-cairo.h>
rsvg_handle_get_geometry_for_element: @handle: an #RsvgHandle @id: (nullable): element id starting with #, or NULL for the whole SVG @out_ink_rect: (out)(optional): ink rectangle @out_logical_rect: (out)(optional): logical rectangle @error: return location for a #GError
Geometry of an element in SVG user units (no viewport fit).
Returns: TRUE on success, FALSE on error.
| gboolean rsvg_handle_get_geometry_for_layer | ( | RsvgHandle * | handle, |
| const char * | id, | ||
| const RsvgRectangle * | viewport, | ||
| RsvgRectangle * | out_ink_rect, | ||
| RsvgRectangle * | out_logical_rect, | ||
| GError ** | error | ||
| ) |
#include <rsvg-cairo.h>
Geometry of an element (or the whole SVG) as if rendered to @viewport.
@handle: an #RsvgHandle @id: (nullable): element id starting with #, or NULL for the whole SVG @viewport: viewport the whole SVG would be fitted to @out_ink_rect: (out)(optional): ink rectangle @out_logical_rect: (out)(optional): logical rectangle @error: return location for a #GError
Returns: TRUE on success, FALSE on error.
| void rsvg_handle_get_intrinsic_dimensions | ( | RsvgHandle * | handle, |
| gboolean * | out_has_width, | ||
| RsvgLength * | out_width, | ||
| gboolean * | out_has_height, | ||
| RsvgLength * | out_height, | ||
| gboolean * | out_has_viewbox, | ||
| RsvgRectangle * | out_viewbox | ||
| ) |
#include <rsvg.h>
rsvg_handle_get_intrinsic_dimensions: @handle: an #RsvgHandle @out_has_width: (out)(optional): whether the SVG has a width @out_width: (out)(optional): width as an RsvgLength @out_has_height: (out)(optional): whether the SVG has a height @out_height: (out)(optional): height as an RsvgLength @out_has_viewbox: (out)(optional): whether the SVG has a viewBox @out_viewbox: (out)(optional): viewBox as an #RsvgRectangle
Unconverted width/height/viewBox from the SVG root.
| gboolean rsvg_handle_get_intrinsic_size_in_pixels | ( | RsvgHandle * | handle, |
| gdouble * | out_width, | ||
| gdouble * | out_height | ||
| ) |
#include <rsvg.h>
rsvg_handle_get_intrinsic_size_in_pixels: @handle: an #RsvgHandle @out_width: (out)(optional): width in pixels @out_height: (out)(optional): height in pixels
Convert intrinsic width and height to pixels using the handle DPI.
Returns: TRUE if both dimensions could be resolved to pixels.
| gboolean rsvg_handle_get_position_sub | ( | RsvgHandle * | handle, |
| RsvgPositionData * | position_data, | ||
| const char * | id | ||
| ) |
#include <rsvg.h>
rsvg_handle_get_position_sub:
| gboolean rsvg_handle_has_sub | ( | RsvgHandle * | handle, |
| const char * | id | ||
| ) |
#include <rsvg.h>
rsvg_handle_has_sub: @handle: an #RsvgHandle @id: element id starting with #
Returns: TRUE if @id exists in the document.