ReaderSvg Properties |
The ReaderSvg type exposes the following members.
Name | Description | |
---|---|---|
AddHiddenElements |
Gets or sets a Boolean that specifies if hidden elements are read. Default value is true.
| |
AddNewCanvasForTransformations |
If true (default = false) transformations on elements are not set on the element itself but are set to a new canvas and the element is added as its parent.
This property is added for backward compatibility with versions 2.3 and older.
| |
AutoSize |
When AutoSize is false the size of read svg objects is determined by the width and height defined in the svg header.
For example when svg header define the size as Letter, than the read svg objects will retain the position within the letter area.
When AutoSize is set to true (by default), the size defined in svg header is ignored. Instead the size of the actual svg content is calculated
so that the read objects do not have any empty area around them. The calculated or read size of svg elements can be read from SvgBounds property.
| |
BitmapImages |
Gets list of all bitmap images that are defined in svg file and cannot be converted to vector elements.
| |
ConvertTransformationsToMatrixTransform |
Gets or sets a Boolean that specifies if all transformations are converted to MatrixTransform.
Default values is false that preserves the type of transformation defined in svg file.
| |
Description |
Description defined in svg file
| |
FlattenHierarchies |
Gets or sets a Boolean that specifies if all child groups (Canvases or DrawingGroup) are removed and all elements are placed under the root group.
The group transformations are added to child objects so that the rendered drawing looks the same.
The exception to the removed groups are the groups that define clipping.
| |
HasCustomProperties |
Gets a Boolean that specifies if the read svg files has some custom properties defined.
| |
Height |
Gets or sets the Height of the returned Viewbox element
| |
HeightInUnits |
Gets a string that represents height of svg element in specified units (for example "2cm" or "2in"). If the read sgv element does not specify units, than this value is null.
| |
InnerCanvas |
Gets the inner canvas without the Viewbox control. See also SvgBounds.
| |
InnerHeight | Obsolete.
Gets Height of all read svg elements
| |
InnerWidth | Obsolete.
Gets the Width of all read svg elements
| |
Instance |
Gets static instance of Ab2d.ReaderSvg so you do not need to create your own instance of it.
| |
IsCorrectingNamesForWpf |
Gets or sets a Boolean that specifies if the names are corrected so that they can be used in XAML.
The following rule is applied in this case: name must start with a letter or underscore and can contain only letters, digits, or underscores.
If true, then invalid characters are replaced with underscore. If false, then the NamedObjects dictionary contains unchanged names, but the GetXaml method still corrects the names.
Default value is true (for backwards compatibility).
| |
LastReadImage |
Gets the lastly read svg as WPF's Image element (used when ReadGeometry is used, when using Read method see LastReadViewbox)
| |
LastReadViewbox |
Gets the lastly read svg as WPF's Viewbox element (used when Read is used, when using ReadGeometry method see LastReadImage)
| |
LicenseInfo |
License information
| |
MakeNamesUnique |
Gets or sets a Boolean that specifies if ReaderSvg adds index text to the names of objects that were already used to make them unique.
For example if svg object has a name "SvgObject" and if the second svg object has the same name, the second svg object will be named "SvgObject2".
Default value is true.
| |
NamedObjects |
Dictionary with elements ids as keys and its appropriate objects as values
Ids (keys) can be defined in a drawing application
| |
NamedObjectsSource |
Gets or sets one of the ReaderSvgNamedObjectsSourceType as the source to get the object's name. Default value is NamedObjectsSourceType.Auto.
| |
OptimizeObjectGroups |
Gets or sets a Boolean that specifies if groups (Canvas or DrawingGroup) are optimized in such a way that they groups that contain only one other group (Canvas or DrawingGroup) are removed.
Default value is false which preserves the groups as they are defined in the original svg file.
| |
OptimizeStyleProcessing |
Gets or sets a Boolean that specifies if ReaderSvg is using an optimized style processing that improves speed of reading svg file (default value is true).
| |
OverrideMiterLimit |
Gets or sets a value that is used instead of the miter limit specified in the svg file.
If value is 0, than the miter limit from svg file is used. Default value is 0.
| |
ReadForeignObjects |
Gets or sets a boolean that specifies if foreignObject elements in svg files are read (currently only Visio metafiles are supported). Default value is true.
| |
ReadPathAsPathGeometry |
If false (default) the path is read as StreamGeometry (better performance). If true the path is read as PathGeometry (worse performance but path can be modified).
| |
SetNameProperty |
Gets or sets a Boolean that determines if the object's Name property is set to the name defined in svg file (default value is true).
| |
SetSvgNameToParentTransformCanvas |
Gets or sets a boolean that specifies if object name is set to the Canvas that is created to contain object's transformation when the object also defines the Canvas.Left and Canvas.Top properties. Default value is false.
| |
ShowDemoTextInEvaluation | Obsolete.
ShowDemoTextInEvaluation is not used any more.
| |
SvgBounds |
Gets the bounds of the svg elements.
Note: Usually svg elements does not start at (0,0) but are places in a virtual letter. To work only with svg elements so they can be sized according to the host element (for example StackPanel, Page, etc.) two Canvases and a Viewbox is used. But with SvgBounds property it is possible to get the original bounds of the svg elements. If AutoSize is set to false, the SvgBounds are get from the root svg element.
Also this property makes InnerWeight and InnerHeight obsolete.
| |
SvgCreator |
Gets an application that was used to create this svg file.
| |
SwitchElementProcessingType |
Specifies which children of the svg switch element will be imported and shown. Default value is ShowFirstCollapseOthers (imports all switch children but shows only the first one; others are Collapsed).
| |
Title |
Title defined in svg file
| |
TransformCanvasNameFormatString |
Gets or sets a string that specifies how the Transform Canvas that is created to contain object's transformation is named.
Default value is "{0}_transform".
| |
TransformShapes |
Gets or sets a Boolean that specifies if all shape objects (Rectangles, Ellipses, Path, Polygons, etc.) that have simple transformation (only translate or scale) or canvas position are transformed with changing their data
with the specified transformation. This can remove RenderTransform, Canvas.Left and Canvas.Top from most of the shapes (exception are shapes that render transform).
| |
UseOldSizeMeasurement |
If true than size measurement from ReaderSvg v1.2 is used - if your application depends on previous sizes of read elements than use this property.
Note: Size measurement is used so svg elements can be used inside other controls - so its size is adjusted regarding to the desired size - set with Width and Height properties or by the parent element.
This property will exit only in ReaderSvg v1.3
| |
UseOnlyInstalledFontFamilies |
When UseOnlyInstalledFontFamilies is false (by default), then FontFamily is created also with font names that are not installed on the system (this preserves the original font family name when exported to XAML).
When UseOnlyInstalledFontFamilies is true and font family name in svg file is not installed on the system, then Arial font family is used.
| |
UseSimpleText |
If true text is always rendered as TextBlock - also if text is using custom strokes and fill patters.
If false than in case of custom strokes and fill patterns text is converted into Path elements and the appropriate effects are applied to it.
Default value is false;
| |
Width |
Gets or sets the Width of the returned Viewbox element
| |
WidthInUnits |
Gets a string that represents width of svg element in specified units (for example "2cm" or "2in"). If the read sgv element does not specify units, than this value is null.
|