Flattens the specified SVG document.
#include "l_bitmap.h"
L_LTSVG_API L_INT L_SvgFlatDocument(docHandle, flatDocHandle, options)
The SVG document handle referencing the SVG document to be flattened.
Address of the SVG document handle that will be allocated and filled with the flattened SVG document.
This function will allocate a new SVG handle for the flattened SVG document.
When this memory is no longer needed, you must free it using L_SvgFreeNode.
Pointer to options to be used when flattening the SVG document. Pass NULL to use the default options.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
To use this function, do the following:
Support for SVG is only available in the Document and Medical Imaging toolkits.
This function creates a copy of the source SVG document into the destination flat SVG document.
When the memory allocated by this function for the flat SVG document is no longer needed, you must free it using L_SvgFreeNode.
For more information on flat SVG documents and bounds and resolution, refer to SVG Size, Bounds and Flat.
Use L_SvgIsFlatDocument to check if the SVG document is flat. Use L_SvgSetFlatDocument to set or clear the internal flat flag manually.
Use L_SvgCalculateBounds to calculate the physical (pixel) bounds and resolution of this document and L_SvgGetBounds to obtain these values.
Win32, x64, Linux.
For an example, refer to L_SvgLoadDocument.