third_party/cairo/src/cairo-svg-surface.c
void
cairo_svg_surface_set_document_unit (cairo_surface_t	*abstract_surface,
				     cairo_svg_unit_t	 unit)
{
    cairo_svg_surface_t *surface;

    if (! _extract_svg_surface (abstract_surface, &surface))
	return;

    if (unit <= CAIRO_SVG_UNIT_PERCENT)
	surface->document->unit = unit;
}
/**
 * cairo_svg_surface_set_document_unit:
 * @surface: a SVG #cairo_surface_t
 * @unit: SVG unit
 *
 * Use the specified unit for the width and height of the generated SVG file.
 * See #cairo_svg_unit_t for a list of available unit values that can be used
 * here.
 *
 * This function can be called at any time before generating the SVG file.
 *
 * However to minimize the risk of ambiguities it's recommended to call it
 * before any drawing operations have been performed on the given surface, to
 * make it clearer what the unit used in the drawing operations is.
 *
 * The simplest way to do this is to call this function immediately after
 * creating the SVG surface.
 *
 * Note if this function is never called, the default unit for SVG documents
 * generated by cairo will be user unit.
 *
 * Since: 1.16
 **/
@surface: a SVG #cairo_surface_t
@unit: SVG unit

Use the specified unit for the width and height of the generated SVG file.
See #cairo_svg_unit_t for a list of available unit values that can be used
here.

This function can be called at any time before generating the SVG file.

However to minimize the risk of ambiguities it's recommended to call it
before any drawing operations have been performed on the given surface, to
make it clearer what the unit used in the drawing operations is.

The simplest way to do this is to call this function immediately after
creating the SVG surface.

Note if this function is never called, the default unit for SVG documents
generated by cairo will be user unit.


@surface : a SVG #cairo_surface_t @unit : SVG unit Use the specified unit for the width and height of the generated SVG file . See #cairo_svg_unit_t for a list of available unit values that can be used here . This function can be called at any time before generating the SVG file . However to minimize the risk of ambiguities it ' s recommended to call it before any drawing operations have been performed on the given surface to make it clearer what the unit used in the drawing operations is . The simplest way to do this is to call this function immediately after creating the SVG surface . Note if this function is never called the default unit for SVG documents generated by cairo will be user unit .
void
cairo_svg_surface_set_document_unit (cairo_surface_t	*abstract_surface,
				     cairo_svg_unit_t	 unit)
{
    cairo_svg_surface_t *surface;
    if (! _extract_svg_surface (abstract_surface, &surface))
	return;
    if (unit <= CAIRO_SVG_UNIT_PERCENT)
	surface->document->unit = unit;
}
void cairo_svg_surface_set_document_unit ( cairo_surface_t * abstract_surface , cairo_svg_unit_t unit ) { cairo_svg_surface_t * surface ; if ( ! _extract_svg_surface ( abstract_surface , & surface ) ) return ; if ( unit <= CAIRO_SVG_UNIT_PERCENT ) surface -> document -> unit = unit ; }
cairo_svg_surface_set_document_unit:
 @surface: a SVG #cairo_surface_t
 @unit: SVG unit
cairo_svg_surface_set_document_unit : @surface : a SVG #cairo_surface_t @unit : SVG unit