#include "l_bitmap.h"

L_LTSVG_API L_INT L_SvgGetBounds(flatDocHandle, bounds, structSize)

const L_SvgNodeHandle flatDocHandle;

SVG document handle

L_SvgBounds* bounds;

pointer to a structure

L_UINT structSize;

size of the structure

Gets the physical (pixel) bounds and resolution of the specified SVG document.



flatDocHandle The SVG document handle from which the bounds should be retrieved.
bounds Pointer to a variable that will be updated with the bounds for the specified SVG document.
structSize Size in bytes, of the structure pointed to by bounds, for versioning. Use sizeof(L_SvgBounds).


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


Support for SVG is only available in the Document and Medical Imaging toolkits.

For more information on flat SVG documents and bounds and resolution, refer to SVG Size, Bounds and Flat.

Before calling L_SvgCalculateBounds, the value of L_SvgBounds.IsValid will be FALSE and the document does not have its physical (pixel) bounds calculated. The rest of the L_SvgBounds members should not be used.

This function will calculate the physical (pixel) bounds of the document by internally enumerating all the elements and resolving the transformation. When this method returns, the members of L_SvgBounds will be set as follows:



IsValid TRUE
IsTrimmed The value of trimmed.
Resolution A value such as 96 or 300 DPI calculated automatically from the SVG elements. If this value cannot be calculated, it will be set to the default of 0.
Bounds The document physical boundaries in pixels.

Use L_SvgFlatDocument to flatten the SVG document.

Use L_SvgIsFlatDocument to determine whether the SVG document is flat.

Use L_SvgSetFlatDocument to set or clear the internal flat flag without re-calculating the document bounds.

Required DLLs and Libraries

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Win32, x64, Linux.

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