L_SvgFlatDocument

Summary

Flattens the specified SVG document.

Syntax

#include "l_bitmap.h"

L_LTSVG_API L_INT L_SvgFlatDocument(docHandle, flatDocHandle, options)

Parameters

const L_SvgNodeHandle docHandle

The SVG document handle referencing the SVG document to be flattened.

L_SvgNodeHandle* flatDocHandle

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.

const L_SvgFlatOptions* options

Pointer to options to be used when flattening the SVG document. Pass NULL to use the default options.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

To use this function, do the following:

  1. Declare a variable of type L_SvgNodeHandle. You can then pass its address in this function, which will allocate the memory and flatten the SVG document specified in docHandle.
  2. Call this function to flatten the SVG document specified in docHandle into the handle specified in flatDocHandle.
  3. When the memory allocated by this function is no longer needed, you must free it using L_SvgFreeNode.

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.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

For an example, refer to L_SvgLoadDocument.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS SVG C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.