Calculates the physical (pixel) bounds and resolution of the specified SVG document.
#include "l_bitmap.h"
L_LTSVG_API L_INT L_SvgCalculateBounds(flatDocHandle, trimmed)
The SVG document handle for which the bounds should be calculated.
TRUE to crop the result bounds using the actual object; otherwise, FALSE.
Value | Meaning |
---|---|
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.
This function will calculate the physical (pixel) bounds of the document by internally enumerating all the elements and resolving the transformation.
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:
Member | Value |
---|---|
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.
Win32, x64, Linux.
For an example, refer to L_SvgLoadDocument.