Commit c8578b3d authored by Dom Lachowicz's avatar Dom Lachowicz

update documentation - should be near 100% symbol coverage

parent 19af9e32
2006-01-28 Dom Lachowicz <cinamod@hotmail.com>
* Update documentation. Should be near 100% symbol coverage.
2006-01-19 Rob Staudinger <robert.staudinger@gmail.com>
* add gtk-doc.make for doc build
......
......@@ -5,7 +5,7 @@
<!ENTITY hash "#">
<!ENTITY % local.notation.class "| PNG">
<!ENTITY RSVG SYSTEM "xml/rsvg.xml">
<!ENTITY SVGZ SYSTEM "xml/rsvg-gz.xml">
<!ENTITY Cairo SYSTEM "xml/rsvg-cairo.xml">
<!ENTITY Utilities SYSTEM "xml/rsvg-file-util.xml">
<!ENTITY ObjectIndex SYSTEM "xml/object_index.sgml">
<!ENTITY TreeIndex SYSTEM "xml/tree_index.sgml">
......@@ -40,7 +40,7 @@ string utilities, file utilities, a main loop abstraction, and so on.
<varlistentry>
<term>Pango</term>
<listitem><para>
A general-purpose text library. http://www.pango.org
A general-purpose text library. http://www.pango.org/
</para></listitem>
</varlistentry>
......@@ -51,32 +51,38 @@ A general-purpose image library.
</para></listitem>
</varlistentry>
<varlistentry>
<term>Cairo</term>
<listitem><para>
Cairo is a 2D graphics library with support for multiple output devices. Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available. http://www.cairographics.org/
</para></listitem>
</varlistentry>
</variablelist>
</para>
</partintro>
</part>
<reference>
<part>
<title>
Using RSVG
</title>
&RSVG;
</reference>
</part>
<reference>
<part>
<title>
Handling Gzipped SVGs (SVGZ)
Using RSVG with Cairo
</title>
&SVGZ;
</reference>
&Cairo;
</part>
<reference>
<part>
<title>
Utility and Convenience Functions
</title>
&Utilities;
</reference>
</part>
<index>
......
<SECTION>
<FILE>rsvg</FILE>
<TITLE>Core API</TITLE>
RsvgError
rsvg_error_quark
RsvgSizeFunc
rsvg_init
rsvg_term
rsvg_set_default_dpi
rsvg_set_default_dpi_x_y
rsvg_handle_new
rsvg_handle_free
rsvg_handle_set_dpi
rsvg_handle_set_size_callback
rsvg_handle_set_dpi_x_y
rsvg_handle_write
rsvg_handle_close
RsvgSizeFunc
rsvg_handle_set_size_callback
rsvg_handle_get_pixbuf
rsvg_handle_get_pixbuf_sub
rsvg_handle_get_base_uri
rsvg_handle_set_base_uri
rsvg_handle_get_title
rsvg_handle_get_desc
rsvg_handle_free
<SUBSECTION Private>
RsvgMaskUnits
rsvg_art_get_image_of_node
rsvg_new_marker
RsvgNodeGroup
rsvg_handle_new_from_data
rsvg_art_push_discrete_layer
rsvg_new_filter_primitive_light_source
RsvgClipPath
rsvg_node_draw
rsvg_new_defs
rsvg_node_group_pack
rsvg_new_symbol
rsvg_filter_render
RsvgNodeUse
rsvg_art_svp_render_path
RsvgFilter
rsvg_new_switch
rsvg_pixbuf_new_from_href
rsvg_render_markers
rsvg_handle_get_metadata
rsvg_handle_set_base_uri
rsvg_handle_get_base_uri
rsvg_new_filter_primitive_specular_lighting
rsvg_term
rsvg_pop_def_group
rsvg_art_render_path
rsvg_new_filter_primitive_blend
rsvg_art_needs_discrete_layer
rsvg_mask_parse
rsvg_new_node_component_transfer_function
rsvg_new_filter_primitive_colour_matrix
rsvg_new_filter_primitive_offset
rsvg_new_filter
rsvg_new_filter_primitive_merge_node
rsvg_new_filter_primitive_convolve_matrix
RsvgMask
rsvg_art_render_new
rsvg_handle_get_dimensions
RsvgArtRender
rsvg_marker_render
rsvg_new_group
rsvg_art_render_paint_server
rsvg_new_filter_primitive_flood
rsvg_init
rsvg_art_clip_path_merge
rsvg_new_mask
rsvg_art_add_clipping_rect
RSVG_TYPE_ERROR
rsvg_error_get_type
rsvg_art_affine_image
rsvg_new_filter_primitive_gaussian_blur
rsvg_new_use
RsvgDimensionData
RsvgFilterUnits
rsvg_marker_parse
rsvg_new_filter_primitive_image
rsvg_filter_parse
rsvg_new_filter_primitive_diffuse_lighting
rsvg_new_filter_primitive_component_transfer
RsvgNodeSymbol
RsvgNodeImage
rsvg_art_render_image
rsvg_new_image
rsvg_new_filter_primitive_tile
rsvg_art_clip_path_render
rsvg_filter_adobe_blend
rsvg_new_filter_primitive_erode
RsvgArtSVPRender
rsvg_art_rect_clip_path
rsvg_handle_new_from_file
rsvg_new_filter_primitive_merge
rsvg_art_mask_render
rsvg_new_svg
rsvg_new_clip_path
RsvgError
rsvg_new_filter_primitive_displacement_map
rsvg_art_pop_discrete_layer
RSVG_ERROR
rsvg_new_filter_primitive_composite
rsvg_new_filter_primitive_turbulence
RsvgNodeSvg
RsvgHandle
RsvgMarker
rsvg_get_file_path
rsvg_clip_path_parse
rsvg_art_svp_render_new
rsvg_preserve_aspect_ratio
rsvg_art_clip_image
rsvg_alpha_blt
</SECTION>
<SECTION>
<FILE>rsvg-cairo</FILE>
<TITLE>Rendering SVG files with cairo</TITLE>
rsvg_cairo_render
<SUBSECTION Private>
rsvg_cairo_render_rsvg_handle
rsvg_cairo_get_image_of_node
rsvg_cairo_render_image
rsvg_cairo_add_clipping_rect
RsvgCairoRender
rsvg_cairo_pop_discrete_layer
rsvg_cairo_render_path
rsvg_cairo_push_discrete_layer
rsvg_cairo_render_new
</SECTION>
<SECTION>
<FILE>rsvg-gz</FILE>
<TITLE>Creating a SVGZ reader</TITLE>
rsvg_handle_new_gz
rsvg_cairo_render_sub
</SECTION>
<SECTION>
<FILE>rsvg-file-util</FILE>
<TITLE>Convenience Functions</TITLE>
rsvg_handle_new_from_data
rsvg_handle_new_from_file
rsvg_pixbuf_from_file
rsvg_pixbuf_from_file_at_zoom
rsvg_pixbuf_from_file_at_size
rsvg_pixbuf_from_file_at_max_size
rsvg_pixbuf_from_file_at_zoom_with_max
rsvg_pixbuf_from_file_ex
rsvg_pixbuf_from_file_at_zoom_ex
rsvg_pixbuf_from_file_at_size_ex
rsvg_pixbuf_from_file_at_max_size_ex
rsvg_pixbuf_from_file_at_zoom_with_max_ex
</SECTION>
......@@ -14,6 +14,30 @@ Utility/Convenience Functions
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### FUNCTION rsvg_handle_new_from_data ##### -->
<para>
</para>
@data:
@data_len:
@error:
@Returns:
<!-- ##### FUNCTION rsvg_handle_new_from_file ##### -->
<para>
</para>
@file_name:
@error:
@Returns:
<!-- ##### FUNCTION rsvg_pixbuf_from_file ##### -->
<para>
......
<!-- ##### SECTION Title ##### -->
Creating a SVGZ reader
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/rsvg-gz.sgml:Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/rsvg-gz.sgml:See_Also ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/rsvg-gz.sgml:Short_Description ##### -->
<!-- ##### SECTION ./tmpl/rsvg-gz.sgml:Stability_Level ##### -->
<!-- ##### SECTION ./tmpl/rsvg-gz.sgml:Title ##### -->
Creating a SVGZ reader
<!-- ##### MACRO RSVG_ERROR ##### -->
<para>
</para>
<!-- ##### FUNCTION rsvg_handle_new_gz ##### -->
<para>
......
......@@ -14,6 +14,16 @@ Core API
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### ENUM RsvgError ##### -->
<para>
</para>
@RSVG_ERROR_FAILED:
<!-- ##### FUNCTION rsvg_error_quark ##### -->
<para>
......@@ -22,14 +32,18 @@ Core API
@Returns:
<!-- ##### USER_FUNCTION RsvgSizeFunc ##### -->
<!-- ##### FUNCTION rsvg_init ##### -->
<para>
</para>
<!-- ##### FUNCTION rsvg_term ##### -->
<para>
</para>
@width:
@height:
@user_data:
<!-- ##### FUNCTION rsvg_set_default_dpi ##### -->
......@@ -37,10 +51,19 @@ Core API
</para>
@dpi:
<!-- # Unused Parameters # -->
@dpi_x:
@dpi_y:
<!-- ##### FUNCTION rsvg_set_default_dpi_x_y ##### -->
<para>
</para>
@dpi_x:
@dpi_y:
<!-- # Unused Parameters # -->
@dpi:
<!-- ##### FUNCTION rsvg_handle_new ##### -->
......@@ -51,27 +74,34 @@ Core API
@Returns:
<!-- ##### FUNCTION rsvg_handle_free ##### -->
<para>
</para>
@handle:
<!-- ##### FUNCTION rsvg_handle_set_dpi ##### -->
<para>
</para>
@handle:
@dpi:
<!-- # Unused Parameters # -->
@dpi_x:
@dpi_y:
<!-- # Unused Parameters # -->
@dpi:
<!-- ##### FUNCTION rsvg_handle_set_size_callback ##### -->
<!-- ##### FUNCTION rsvg_handle_set_dpi_x_y ##### -->
<para>
</para>
@handle:
@size_func:
@user_data:
@user_data_destroy:
@dpi_x:
@dpi_y:
<!-- ##### FUNCTION rsvg_handle_write ##### -->
......@@ -96,6 +126,27 @@ Core API
@Returns:
<!-- ##### USER_FUNCTION RsvgSizeFunc ##### -->
<para>
</para>
@width:
@height:
@user_data:
<!-- ##### FUNCTION rsvg_handle_set_size_callback ##### -->
<para>
</para>
@handle:
@size_func:
@user_data:
@user_data_destroy:
<!-- ##### FUNCTION rsvg_handle_get_pixbuf ##### -->
<para>
......@@ -105,6 +156,34 @@ Core API
@Returns:
<!-- ##### FUNCTION rsvg_handle_get_pixbuf_sub ##### -->
<para>
</para>
@handle:
@id:
@Returns:
<!-- ##### FUNCTION rsvg_handle_get_base_uri ##### -->
<para>
</para>
@handle:
@Returns:
<!-- ##### FUNCTION rsvg_handle_set_base_uri ##### -->
<para>
</para>
@handle:
@base_uri:
<!-- ##### FUNCTION rsvg_handle_get_title ##### -->
<para>
......@@ -123,11 +202,12 @@ Core API
@Returns:
<!-- ##### FUNCTION rsvg_handle_free ##### -->
<!-- ##### FUNCTION rsvg_handle_get_dimensions ##### -->
<para>
</para>
@handle:
@dimension_data:
......@@ -737,10 +737,11 @@ rsvg_get_base_uri_from_filename(const gchar * file_name)
}
/**
* Set the base URI for this SVG
*
* rsvg_handle_set_base_uri
* @handle: A #RsvgHandle
* @base_uri:
* @base_uri: The base uri
*
* Set the base URI for this SVG
*
* Since: 2.9 (really present in 2.8 as well)
*/
......@@ -758,9 +759,11 @@ void rsvg_handle_set_base_uri (RsvgHandle *handle,
}
/**
* Gets the base uri for this RsvgHandle.
* rsvg_handle_get_base_uri:
* @handle: A #RsvgHandle
*
* Gets the base uri for this #RsvgHandle.
*
* Returns: the base uri, possibly null
* Since: 2.9 (really present in 2.8 as well)
*/
......@@ -998,24 +1001,6 @@ rsvg_handle_new (void)
return handle;
}
RsvgHandle * rsvg_handle_new_gz (void);
/**
* rsvg_handle_new_gz:
* DEPRECATED; only here for API/ABI compatibility. Please use rsvg_handle_new() instead.
*
* Returns: A new #RsvgHandle capable of loading gzipped SVG data, or %NULL if that is not possible
*/
RsvgHandle *
rsvg_handle_new_gz (void)
{
#ifdef HAVE_SVGZ
return rsvg_handle_new ();
#else
return NULL;
#endif
}
typedef struct {
RsvgRender super;
RsvgBbox bbox;
......@@ -1142,14 +1127,16 @@ _rsvg_find_bbox (RsvgHandle *handle)
}
/**
* rsvg_handle_get_dimensions:
* @handle: A RsvgHandle
* @output: A place to store the SVG's size
* rsvg_handle_get_dimensions
* @handle: A #RsvgHandle
* @dimension_data: A place to store the SVG's size
*
* Get the SVG's size. Do not call from within the size_func callback, because an infinite loop will occur.
*
* Get the SVG's size
* Since: 2.14
*/
void
rsvg_handle_get_dimensions(RsvgHandle * handle, RsvgDimensionData * output)
rsvg_handle_get_dimensions(RsvgHandle * handle, RsvgDimensionData * dimension_data)
{
RsvgNodeSvg * sself;
RsvgBbox bbox;
......@@ -1159,10 +1146,8 @@ rsvg_handle_get_dimensions(RsvgHandle * handle, RsvgDimensionData * output)
g_return_if_fail(handle);
sself = (RsvgNodeSvg *)handle->treebase;
if(!sself) {
memset(output, 0, sizeof(RsvgDimensionData));
if(!sself)
return;
}
bbox.x = bbox.y = 0;
bbox.w = bbox.h = 1;
......@@ -1185,9 +1170,8 @@ rsvg_handle_get_dimensions(RsvgHandle * handle, RsvgDimensionData * output)
output->em = output->width;
output->ex = output->height;
if (handle->size_func) {
if (handle->size_func)
(* handle->size_func) (&output->width, &output->height, handle->user_data);
}
}
/**
......@@ -1249,13 +1233,13 @@ rsvg_handle_set_dpi (RsvgHandle * handle, double dpi)
}
/**
* rsvg_handle_set_dpi
* rsvg_handle_set_dpi_x_y
* @handle: An #RsvgHandle
* @dpi_x: Dots Per Inch (aka Pixels Per Inch)
* @dpi_y: Dots Per Inch (aka Pixels Per Inch)
*
* Sets the DPI for the outgoing pixbuf. Common values are
* 75, 90, and 300 DPI. Passing a number <= 0 to #dpi will
* 75, 90, and 300 DPI. Passing a number <= 0 to #dpi_x or #dpi_y will
* reset the DPI to whatever the default value happens to be.
*
* Since: 2.8
......
......@@ -120,8 +120,7 @@ rsvg_cairo_new_drawing_ctx (cairo_t *cr, RsvgHandle *handle)
}
/**
* rsvg_cairo_render_sub:
*
* rsvg_cairo_render_sub
* @cr: A Cairo renderer
* @handle: A RsvgHandle
* @id: An element's id within the SVG, or %NULL to render the whole SVG
......@@ -160,8 +159,7 @@ rsvg_cairo_render_sub (cairo_t *cr, RsvgHandle *handle, const char * id)
}
/**
* rsvg_cairo_render:
*
* rsvg_cairo_render
* @cr: A Cairo renderer
* @handle: A RsvgHandle
*
......
......@@ -181,7 +181,7 @@ main (int argc, const char **argv)
}
else if (n_args > 1 && (!format || !strcmp (format, "png")))
{
g_print (_("Multiple SVG files are only allowed for PDF and PS output.\n"));
g_print (_("Multiple SVG files are only allowed for PDF, PS and SVG output.\n"));
exit (1);
}
......@@ -254,17 +254,17 @@ main (int argc, const char **argv)
dimensions.width, dimensions.height);
#ifdef CAIRO_HAS_PDF_SURFACE
else if (!strcmp (format, "pdf"))
surface = cairo_pdf_surface_create_for_stream (rsvg_cairo_write_func, output_file,
surface = cairo_pdf_surface_create_for_stream (rsvg_cairo_write_func, output_file,
dimensions.width, dimensions.height);
#endif
#ifdef CAIRO_HAS_PS_SURFACE
else if (!strcmp (format, "ps"))
surface = cairo_ps_surface_create_for_stream (rsvg_cairo_write_func, output_file,
surface = cairo_ps_surface_create_for_stream (rsvg_cairo_write_func, output_file,
dimensions.width, dimensions.height);
#endif
#ifdef CAIRO_HAS_SVG_SURFACE
else if (!strcmp (format, "svg"))
surface = cairo_svg_surface_create_for_stream (rsvg_cairo_write_func, output_file,
surface = cairo_svg_surface_create_for_stream (rsvg_cairo_write_func, output_file,
dimensions.width, dimensions.height);
#endif
else
......
......@@ -61,6 +61,8 @@ rsvg_pixmap_destroy (gchar *pixels, gpointer data)
* @rsvg_handle_close has been called.
*
* Returns: the pixbuf loaded by #handle, or %NULL.
*
* Since: 2.14
**/
GdkPixbuf *
rsvg_handle_get_pixbuf_sub (RsvgHandle *handle, const char * id)
......
......@@ -29,6 +29,9 @@
G_BEGIN_DECLS
/**
* An enumeration representing possible error domains
*/
typedef enum {
RSVG_ERROR_FAILED
} RsvgError;
......@@ -36,9 +39,16 @@ typedef enum {
#define RSVG_ERROR (rsvg_error_quark ())
GQuark rsvg_error_quark (void) G_GNUC_CONST;
/**
* The RsvgHandle is an object representing the parsed form of a SVG
*/
typedef struct RsvgHandle RsvgHandle;
typedef struct RsvgDimensionData RsvgDimensionData;
/**
* RsvgDimensionData
*/
struct RsvgDimensionData {
int width;
int height;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment