Click or drag to resize
AB4D logo

ReaderSvgAddNewCanvasForTransformations Property

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.

Namespace:  Ab2d
Assembly:  Ab2d.ReaderSvg (in Ab2d.ReaderSvg.dll) Version: 7.1.7295.1040
Syntax
C#
public bool AddNewCanvasForTransformations { get; set; }

Property Value

Type: Boolean
Remarks

In Ab2d.ReaderSvg version 2.3 and older transformations were not applied to the element itself. Instead a new Canvas was created with a transformation and the element was set as its child.

For performance reasons it is recommended that this property is false because less Canvases are created.

Examples

For example the following input svg:

<path transform="matrix(-3,0,-1,0,100,0)" d="..."/>
If AddNewCanvasForTransformations is false (default) the following xaml is created from the previous svg element:
XAML
<Path RenderTransform="-3,0,-1,0,100,0" Data="..."/>
If AddNewCanvasForTransformations is true the following xaml is created from the previous svg element (this xaml would be also generated by the version 2.3 or older):
XAML
<Canvas RenderTransform="-3,0,-1,0,100,0">
    <Path Data="..."/>
</Canvas>
See Also