svgSurfaceSetDocumentUnit

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
svgSurfaceSetDocumentUnit

Parameters

surface cairo.surface.Surface

a SVG #cairo_surface_t

unit cairo.types.SvgUnit

SVG unit