←Select platform

BeginRenderOptimize Method

Summary

Optimizes the document for rendering.

Syntax

C#
VB
Java
Objective-C
C++
public void BeginRenderOptimize() 

Public Sub BeginRenderOptimize()  

- (BOOL)beginRenderOptimize:(NSError **)error 

public void beginRenderOptimize() 

public: 
void BeginRenderOptimize();  

Remarks

For more information, refer to SVG Rendering.

SvgDocument will create internal data structures to speed up rendering. This data can be cached and re-used by using SvgDocument.BeginRenderOptimize and SvgDocument.EndRenderOptimize.

If the SvgDocument will be rendered once, it is nest to leave the optimization as is. However, if the document will be rendered many times (for example, if it is being viewed in an Leadtools.Controls.ImageViewer control, then it is best to cache this data to enhance speed. This can easily be achieved by using BeginRenderOptimize before setting the document in the viewer.

BeginRenderOptimize can use extra system resources stored in the internal data. Use EndRenderOptimize to manually free this data at any time.

BeginRenderOptimize and EndRenderOptimize use an internal counter to track the state of the optimization. BeginRenderOptimize increments this counter and EndRenderOptimize decrements it: therefore, the optimization is only performed when needed and any number of BeginRenderOptimize and EndRenderOptimize operations can be chained together without affecting the document.

This internal data will be freed automatically when the document is disposed of, regardless of the value of the counter.

To determine whether the document has optimized rendering data, use SvgDocument.IsRenderOptimized.

Example

For an example, refer to Render.

Requirements

Target Platforms

Help Version 20.0.2018.6.21
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Svg Assembly