diff --git a/src/Svg.Controls.Avalonia/Svg.Controls.Avalonia.csproj b/src/Svg.Controls.Avalonia/Svg.Controls.Avalonia.csproj
index 3f4e8680ac..ff2f8f95c6 100644
--- a/src/Svg.Controls.Avalonia/Svg.Controls.Avalonia.csproj
+++ b/src/Svg.Controls.Avalonia/Svg.Controls.Avalonia.csproj
@@ -18,6 +18,19 @@
svg;vector graphics;rendering;2d;graphics;geometry;shapes;control;avalonia;avaloniaui
+
+
+ true
+ false
+ true
+
+
+
+
+ true
+ true
+
+
diff --git a/src/Svg.Controls.Skia.Avalonia/Svg.Controls.Skia.Avalonia.csproj b/src/Svg.Controls.Skia.Avalonia/Svg.Controls.Skia.Avalonia.csproj
index 330ff13f5b..4a6f48d9fe 100644
--- a/src/Svg.Controls.Skia.Avalonia/Svg.Controls.Skia.Avalonia.csproj
+++ b/src/Svg.Controls.Skia.Avalonia/Svg.Controls.Skia.Avalonia.csproj
@@ -18,6 +18,19 @@
svg;vector graphics;rendering;2d;graphics;geometry;shapes;skiasharp;skia;control;avalonia;avaloniaui
+
+
+ true
+ false
+ true
+
+
+
+
+ true
+ true
+
+
diff --git a/src/Svg.Editor.Core/Svg.Editor.Core.csproj b/src/Svg.Editor.Core/Svg.Editor.Core.csproj
index d8183b91fc..37523e6fd3 100644
--- a/src/Svg.Editor.Core/Svg.Editor.Core.csproj
+++ b/src/Svg.Editor.Core/Svg.Editor.Core.csproj
@@ -17,6 +17,19 @@
svg;editor;state;session;avalonia;skia
+
+
+ true
+ false
+ true
+
+
+
+
+ true
+ true
+
+
diff --git a/src/Svg.Model/Services/SvgGeometryService.cs b/src/Svg.Model/Services/SvgGeometryService.cs
index 544001e5f1..e62299e259 100644
--- a/src/Svg.Model/Services/SvgGeometryService.cs
+++ b/src/Svg.Model/Services/SvgGeometryService.cs
@@ -194,20 +194,18 @@ private static SvgUnit GetComputedUnit(
try
{
- if (TypeDescriptor.GetConverter(typeof(SvgUnit)).ConvertFromInvariantString(rawValue) is SvgUnit unit)
- {
- isAuto = false;
- isAuthorSpecified = true;
- return unit;
- }
+ var unit = SvgUnitConverter.Parse(rawValue.AsSpan().Trim());
+
+ isAuto = false;
+ isAuthorSpecified = true;
+ return unit;
}
catch
{
+ isAuto = false;
+ isAuthorSpecified = element.ContainsAttribute(propertyName);
+ return fallback;
}
-
- isAuto = false;
- isAuthorSpecified = element.ContainsAttribute(propertyName);
- return fallback;
}
private static SKPath? CreateRectanglePath(SvgRectangle svgRectangle, SvgFillRule fillRule, SKRect viewport)
diff --git a/src/Svg.Model/Services/TransformsService.cs b/src/Svg.Model/Services/TransformsService.cs
index b8da2622ee..1266c77708 100644
--- a/src/Svg.Model/Services/TransformsService.cs
+++ b/src/Svg.Model/Services/TransformsService.cs
@@ -343,26 +343,27 @@ private static bool TryResolveTransformOriginComponent(
try
{
- if (TypeDescriptor.GetConverter(typeof(SvgUnit)).ConvertFromInvariantString(token) is SvgUnit unit)
- {
- value = unit.ToDeviceValue(
- isHorizontal ? UnitRenderingType.HorizontalOffset : UnitRenderingType.VerticalOffset,
- svgElement,
- referenceBox);
- if (unit.Type != SvgUnitType.Percentage)
- {
- value += isHorizontal ? referenceBox.Left : referenceBox.Top;
- }
+ var unit = SvgUnitConverter.Parse(token.AsSpan().Trim());
- return true;
+ value = unit.ToDeviceValue(
+ isHorizontal
+ ? UnitRenderingType.HorizontalOffset
+ : UnitRenderingType.VerticalOffset,
+ svgElement,
+ referenceBox);
+
+ if (unit.Type != SvgUnitType.Percentage)
+ {
+ value += isHorizontal ? referenceBox.Left : referenceBox.Top;
}
+
+ return true;
}
catch
{
+ value = 0f;
+ return false;
}
-
- value = 0f;
- return false;
}
private static bool TryGetTransformOriginKeywordUnit(string token, bool isHorizontal, out SvgUnit unit)
diff --git a/src/Svg.Model/Svg.Model.csproj b/src/Svg.Model/Svg.Model.csproj
index 7e51c14355..383d69596a 100644
--- a/src/Svg.Model/Svg.Model.csproj
+++ b/src/Svg.Model/Svg.Model.csproj
@@ -16,6 +16,19 @@
svg;vector graphics;rendering;2d;graphics;geometry;shapes;skiasharp;skia;model
+
+
+ true
+ false
+ true
+
+
+
+
+ true
+ true
+
+