Name
csurface:SetDocumentUnit -- set document unit
Synopsis
csurface:SetDocumentUnit(unit)
Function
Use the specified unit for the width and height of the generated SVG file. See csurface:GetDocumentUnit() 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.

Inputs
unit
SVG unit

Show TOC