#include "l_bitmap.h"
L_LTSVG_API L_INT L_SvgBeginRenderOptimizeDocument(flatDocHandle)
Optimizes the SVG document for rendering.
Handle to the SVG document that should be optimized for rendering.
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.
LEADTOOLS will create internal data structures to speed up rendering. This data can be cached and re-used by using L_SvgBeginRenderOptimizeDocument and L_SvgEndRenderOptimizeDocument
If the L_SvgNodeHandle will be rendered once, it is recommended to leave the optimization as is. However, if the document will be rendeded many times, then it is recommended to cache this data to enhance the speed.
L_SvgBeginRenderOptimizeDocument may use extra system resources stored in the internal data. L_SvgEndRenderOptimizeDocument can be used to manually free this data at any time.
L_SvgBeginRenderOptimizeDocument and L_SvgEndRenderOptimizeDocument use an internal counter to track the state of the optimization. L_SvgBeginRenderOptimizeDocument increments this counter and L_SvgEndRenderOptimizeDocument decrements it, therefore the optimization is only performed when needed and any number of L_SvgBeginRenderOptimizeDocument and L_SvgEndRenderOptimizeDocument calls can be chained together without affecting the document.
This internal data will automatically be freed by L_SvgFreeNode regardless of the value of the counter.
To determine if the document has optimized render data, use L_SvgIsRenderOptimizedDocument.
Required DLLs and Libraries
Win32, x64, Linux.