←Select platform

Bounds Property

Summary

Gets the physical (pixel) bounds and resolution of this SvgDocument.

Syntax

C#
VB
Java
Objective-C
C++
public SvgBounds Bounds { get; } 
Public ReadOnly Property Bounds As Leadtools.Svg.SvgBounds 
- (nullable LTSvgBounds *)bounds:(NSError **)error 
public SvgBounds getBounds() 
public: 
property Leadtools.Svg.SvgBounds Bounds { 
   Leadtools.Svg.SvgBounds get(); 
} 

Property Value

The physical (pixel) bounds and resolution of this SvgDocument.

Remarks

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

Before calling CalculateBounds, the value of Bounds.IsValid will be false and the document does not have its physical (pixel) bounds calculated. The rest of SvgBounds members should not be used.

The CalculateBounds method 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 Bounds will be set as follows:

Member Description
SvgBounds.IsValid

true

SvgBounds.IsTrimmed

The value of 'trimmed' passed to CalculateBounds

SvgBounds.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 value of 0.

SvgBounds.Bounds

The document physical boundaries in pixels.

Use SetBounds to set the physical (pixel) bounds of the document manually.

Use Flat and ToFlat to flatten a document in-place or return a flat copy of an SvgDocument.

Use IsFlat to determine whether this SvgDocument is flat. Use SetFlat to set or clear the internal flattening flag without re-calculating the document's bounds.

Example

For an example, refer to SvgDocument.

Requirements

Target Platforms

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

Leadtools.Svg Assembly