Skip to content

Commit bb5f91c

Browse files
committed
Release Version 1.7.5
- Several bug fixes and code improvements
1 parent d359e7f commit bb5f91c

34 files changed

+375
-265
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ paket-files/
257257
Samples/W3cSvgTestSuites/Svg10
258258
Samples/W3cSvgTestSuites/Svg11
259259
Samples/W3cSvgTestSuites/Svg12
260+
Samples/WpfTestOtherSvg
260261

261262
# Third-party library source codes
262263
Libraries/Sources

License.txt

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2010 - 2021, Elinam LLC
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
31+
32+
-------------------------------------------------------------------------------------------------------------------
33+
Brotli License (https://github.com/google/brotli)
34+
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
35+
36+
Permission is hereby granted, free of charge, to any person obtaining a copy
37+
of this software and associated documentation files (the "Software"), to deal
38+
in the Software without restriction, including without limitation the rights
39+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
40+
copies of the Software, and to permit persons to whom the Software is
41+
furnished to do so, subject to the following conditions:
42+
43+
The above copyright notice and this permission notice shall be included in
44+
all copies or substantial portions of the Software.
45+
46+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
49+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
50+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
51+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
52+
THE SOFTWARE.
53+
54+
-------------------------------------------------------------------------------------------------------------------
55+
MinIoC License (https://github.com/microsoft/MinIoC)
56+
MIT License
57+
58+
Copyright (c) Microsoft Corporation. All rights reserved.
59+
60+
Permission is hereby granted, free of charge, to any person obtaining a copy
61+
of this software and associated documentation files (the "Software"), to deal
62+
in the Software without restriction, including without limitation the rights
63+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
64+
copies of the Software, and to permit persons to whom the Software is
65+
furnished to do so, subject to the following conditions:
66+
67+
The above copyright notice and this permission notice shall be included in all
68+
copies or substantial portions of the Software.
69+
70+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
75+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
76+
SOFTWARE

RelaseNotes.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
### Release 1.7.5
2+
* Several bug fixes and code improvements
3+
4+
### Release 1.7.1
5+
* Fixed DPI bug causing the controls to throw exceptions.
6+
7+
### Release 1.7.0
8+
* Updated requiredFeatures support, fixed nested URI and circular references
9+
* Add support for CSS font shorthand properties
10+
* Support for embedded SVG contents in controls
11+
* Fixed issues related to hit-test
12+
* Added error and alert handling events
13+
* Improved DPI support
14+
* Fixed error when font-family name is a color name (by LucaPassarella)
15+
* Considered SvgTransformList and not single transform (by LucaPassarella)
16+
* Adding support for .NET 5.0
17+
* Several bug fixes and code improvements
18+
19+
### Release 1.6.0
20+
* Multi-frameworks support: .NET4.0 ~ .NET4.8, .NETCORE3.1
21+
* More Tiny Specs support: solidColor, viewport-fill
22+
* Private fonts supports and system font caching
23+
* Initial support for web fonts (woff and woff2)
24+
* Replaced the embedded modular DTD files with single DTD to reduce the size
25+
* Fixed radial gradient issues: pservers-grad-21-b.svg, pservers-grad-20-b.svg
26+
* WPF Rendering: Reworked pattern paint rendering
27+
* Added filter effects classes
28+
* Added Scripting interfaces and classes
29+
* Added IoC container, from on Microsoft MinIoC
30+
* Fixed performance degradation issue introduced in previous version.
31+
* Initial support for CSS Custom Properties
32+
* Several bug fixes and code improvements
33+
34+
### Release 1.5.0
35+
* Improved CSS support
36+
* WPF Rendering: Reworked text-path rendering
37+
- Support for SVG Fonts
38+
- Support for letter-spacing, textLength, startOffset etc
39+
- For simplicity, characters are rendered as path geometry
40+
* WPF Rendering: Improved SVG Fonts supports
41+
- Text decorations: Underline, Overline and strike-through features
42+
* Issue #115: WPF Rendering: Thread safety fixes
43+
* Several bug fixes and code improvements
44+
45+
### Release 1.4.0
46+
* Design time update to SvgImage and SvgImageConverter.
47+
* Adding support for href in addition to the xlink:href (as in SVG 2)
48+
* Improvements in the WPF runtime library
49+
- ZoomPanControl is updated to the latest version
50+
- SvgImage renamed to SvgImageNameScope (not SvgImageExtension in converter library)
51+
* GDI+ Rendering: Resumed the developments of this renderer
52+
- Code Refactoring, improvements and bug fixes
53+
- Improvements in the SvgPictureBox control
54+
* WPF Rendering: Initial support for SVG fonts
55+
* New Points and Path Parsers (based on Batik path parsing)
56+
- Introduced new points and paths parser for better error handling
57+
- Removed the fallback for the WPF PathGeometry parser
58+
* Introduced WpfDrawingDocument to manage drawing information
59+
- This will simply the search for ID and provide hit-testing
60+
- This preserves the format of the SVG ID, x:Name must comply to variable naming
61+
* Introduced EmbeddedImageSerializerVisitor to serialize embedded images to file, where required
62+
* Improved color syntax support
63+
- Support for all color syntaxes: rgb, rgba, hsl, hsla
64+
- Fixed the reported issues #99, #112
65+
* Issue #111: Trim for quotes to ResolveUri methods (fixed by @mmatriccino)
66+
* Several bug fixes and code improvements
67+
68+
### Release 1.3.0
69+
* Support for fallback paint server.
70+
* Issue #81: Mouse Click on DOM Element.
71+
* Issue #82: Please add Databinding. Added new image source with binding support.
72+
* Issue #83: Show no Image when Path is not pointing to an existing file.
73+
* Issue #84: Transfrom parsing with floating numbers (submitted by @grayed).
74+
* Issue #87: SvgViewbox doesn't show ToolTip.
75+
* Issue #88: Make SvgDrawingCanvas Drawings public.
76+
* Issue #95: Wrong rect displaying.
77+
* Issue #96: Problem with SVG logo. Rework of the use element WPF rendering.
78+
79+
### Release 1.2.0
80+
* Improvements in marker support, including marker in curves.
81+
* Improvements in color, color-profile, coordinates, transforms and aspect ratios.
82+
* Support for slice alignment.
83+
* Support for SVG element visitor interfaces.
84+
* Removed the default size of 640x480 in WPF rendering.
85+
* Issue #53. Binding support in controls.
86+
* Issue #79. Fixed clipping bug.
87+
* Issue #64. WPF path rendering improvements, gradient stop fix.
88+
89+
### Release 1.1.0
90+
* Moved from the .NET Client Profile to the full .NET Framework.
91+
* Cleanup the .NET framework dependencies.
92+
* Changed the converter assembly name; SharpVectors.Converters.dll to SharpVectors.Converters.Wpf.dll
93+
* Changed the converter assembly name; SharpVectors.Runtime.dll to SharpVectors.Runtime.Wpf.dll
94+
* Resolved various reported parsing and number handling issues.
95+
* Resolved various reported rendering issues, especially opacity and gradient fills.
96+
* Added marker support.

Samples/WpfSvgTestBox/SvgPage.xaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@
138138
</Control.Background>
139139
<!-- This Canvas is the content that is displayed by the ZoomPanControl.
140140
Width and Height determine the size of the content. -->
141-
<svg:SvgDrawingCanvas x:Name="svgDrawing" Background="Transparent">
142-
</svg:SvgDrawingCanvas>
143-
141+
<svg:SvgDrawingCanvas x:Name="svgDrawing" Background="Transparent"/>
142+
144143
</svg:ZoomPanControl>
145144

146145
</ScrollViewer>

Samples/WpfSvgTestBox/SvgPage.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ private bool ConvertDocument(string filePath = null)
349349
return false;
350350
}
351351

352+
//TODO
353+
_fileReader.DrawingSettings.OptimizePath = false;
354+
352355
DrawingGroup drawing = _fileReader.Read(filePath, _directoryInfo);
353356
if (drawing == null)
354357
{

Source/SharpVectorConvertersWpf/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#endif
1717
[assembly: AssemblyCompany("Elinam LLC, Japan")]
1818
[assembly: AssemblyProduct("SharpVectors.Converters.Wpf")]
19-
[assembly: AssemblyCopyright("Copyright © 2010 - 2019 Elinam LLC")]
19+
[assembly: AssemblyCopyright("Copyright © 2010 - 2021 Elinam LLC")]
2020
[assembly: AssemblyTrademark("Open Source, Licensed BSD-3")]
2121
[assembly: AssemblyCulture("")]
2222

@@ -55,9 +55,9 @@
5555
// You can specify all the values or you can default the Build and Revision Numbers
5656
// by using the '*' as shown below:
5757
// [assembly: AssemblyVersion("1.0.*")]
58-
[assembly: AssemblyVersion("1.7.1.0")]
59-
[assembly: AssemblyFileVersion("1.7.1.0")]
60-
[assembly: AssemblyInformationalVersion("1.7.1.0")]
58+
[assembly: AssemblyVersion("1.7.5.0")]
59+
[assembly: AssemblyFileVersion("1.7.5.0")]
60+
[assembly: AssemblyInformationalVersion("1.7.5.0")]
6161

6262
[assembly: XmlnsPrefix("http://sharpvectors.codeplex.com/svgc/", "svgc")]
6363
[assembly: XmlnsDefinition("http://sharpvectors.codeplex.com/svgc/", "SharpVectors.Converters")]

Source/SharpVectorConvertersWpf/XmlXamlWriter.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,48 @@ public void Save(object obj, XmlWriter xmlWriter)
349349

350350
#region Private Methods
351351

352+
//private static string ReducePrecision(string s, int precision = 2)
353+
//{
354+
// string old = s;
355+
// if (old.Length == 0 || old.Length < precision)
356+
// {
357+
// return old;
358+
// }
359+
360+
// int begin = 0;
361+
// int end = 0;
362+
363+
// while (true)
364+
// {
365+
// begin = old.IndexOf('.', begin);
366+
// if (begin == -1) break;
367+
368+
// // get past the period
369+
// begin++;
370+
371+
// for (int i = 0; i < precision; i++)
372+
// {
373+
// if (old[begin] >= '0' && old[begin] <= '9')
374+
// begin++;
375+
// if (begin >= old.Length)
376+
// break;
377+
// }
378+
// if (begin >= old.Length)
379+
// break;
380+
381+
// end = begin;
382+
383+
// while (end < old.Length && old[end] >= '0' && old[end] <= '9') end++;
384+
385+
// old = old.Substring(0, begin) + old.Substring(end, old.Length - end);
386+
387+
// begin++;
388+
// if (begin >= old.Length)
389+
// break;
390+
// }
391+
// return old;
392+
//}
393+
352394
private void WriteObject(object key, object obj, XmlWriter writer, bool isRoot)
353395
{
354396
List<MarkupProperty> propertyElements = new List<MarkupProperty>();
@@ -401,6 +443,7 @@ private void WriteObject(object key, object obj, XmlWriter writer, bool isRoot)
401443
//writer.WriteAttributeString("Figures",
402444
// markupObj.Instance.ToString());
403445
writer.WriteAttributeString("Figures", StringConvert.ToString(markupObj.Instance, _culture));
446+
// writer.WriteAttributeString("Figures", ReducePrecision(StringConvert.ToString(markupObj.Instance, _culture)));
404447
}
405448
else
406449
{

Source/SharpVectorCore/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#endif
1616
[assembly: AssemblyCompany("Elinam LLC, Japan")]
1717
[assembly: AssemblyProduct("SharpVectors.Core")]
18-
[assembly: AssemblyCopyright("Copyright © 2010 - 2018 Elinam LLC")]
18+
[assembly: AssemblyCopyright("Copyright © 2010 - 2021 Elinam LLC")]
1919
[assembly: AssemblyTrademark("Open Source, Licensed BSD-3")]
2020
[assembly: AssemblyCulture("")]
2121

@@ -29,9 +29,9 @@
2929
//
3030
// You can specify all the values or you can default the Revision and Build Numbers
3131
// by using the '*' as shown below:
32-
[assembly: AssemblyVersion("1.7.1.0")]
33-
[assembly: AssemblyFileVersion("1.7.1.0")]
34-
[assembly: AssemblyInformationalVersion("1.7.1.0")]
32+
[assembly: AssemblyVersion("1.7.5.0")]
33+
[assembly: AssemblyFileVersion("1.7.5.0")]
34+
[assembly: AssemblyInformationalVersion("1.7.5.0")]
3535

3636
//
3737
// In order to sign your assembly you must specify a key to use. Refer to the

Source/SharpVectorCss/Css/CssAbsPrimitiveLengthValue.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public sealed class CssAbsPrimitiveLengthValue : CssPrimitiveLengthValue
1717

1818
public CssAbsPrimitiveLengthValue(CssPrimitiveValue cssValue, string propertyName, XmlElement element)
1919
{
20-
_cssValue = cssValue;
20+
_cssValue = cssValue;
21+
_propertyName = propertyName;
22+
_element = element;
2123

2224
if (cssValue.PrimitiveType == CssPrimitiveType.Ident)
2325
{
@@ -80,8 +82,6 @@ public CssAbsPrimitiveLengthValue(CssPrimitiveValue cssValue, string propertyNam
8082
SetFloatValue(cssValue.GetFloatValue(cssValue.PrimitiveType));
8183
SetPrimitiveType(cssValue.PrimitiveType);
8284
}
83-
_propertyName = propertyName;
84-
_element = element;
8585
}
8686

8787
#endregion

Source/SharpVectorCss/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#endif
1616
[assembly: AssemblyCompany("Elinam LLC, Japan")]
1717
[assembly: AssemblyProduct("SharpVectors.Css")]
18-
[assembly: AssemblyCopyright("Copyright © 2010 - 2018 Elinam LLC")]
18+
[assembly: AssemblyCopyright("Copyright © 2010 - 2021 Elinam LLC")]
1919
[assembly: AssemblyTrademark("Open Source, Licensed BSD-3")]
2020
[assembly: AssemblyCulture("")]
2121

@@ -30,9 +30,9 @@
3030
//
3131
// You can specify all the values or you can default the Revision and Build Numbers
3232
// by using the '*' as shown below:
33-
[assembly: AssemblyVersion("1.7.1.0")]
34-
[assembly: AssemblyFileVersion("1.7.1.0")]
35-
[assembly: AssemblyInformationalVersion("1.7.1.0")]
33+
[assembly: AssemblyVersion("1.7.5.0")]
34+
[assembly: AssemblyFileVersion("1.7.5.0")]
35+
[assembly: AssemblyInformationalVersion("1.7.5.0")]
3636

3737
//
3838
// In order to sign your assembly you must specify a key to use. Refer to the

Source/SharpVectorDom/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#endif
1616
[assembly: AssemblyCompany("Elinam LLC, Japan")]
1717
[assembly: AssemblyProduct("SharpVectors.Dom")]
18-
[assembly: AssemblyCopyright("Copyright © 2010 - 2018 Elinam LLC")]
18+
[assembly: AssemblyCopyright("Copyright © 2010 - 2021 Elinam LLC")]
1919
[assembly: AssemblyTrademark("Open Source, Licensed BSD-3")]
2020
[assembly: AssemblyCulture("")]
2121
//[assembly: AllowPartiallyTrustedCallers]
@@ -30,9 +30,9 @@
3030
//
3131
// You can specify all the values or you can default the Revision and Build Numbers
3232
// by using the '*' as shown below:
33-
[assembly: AssemblyVersion("1.7.1.0")]
34-
[assembly: AssemblyFileVersion("1.7.1.0")]
35-
[assembly: AssemblyInformationalVersion("1.7.1.0")]
33+
[assembly: AssemblyVersion("1.7.5.0")]
34+
[assembly: AssemblyFileVersion("1.7.5.0")]
35+
[assembly: AssemblyInformationalVersion("1.7.5.0")]
3636

3737
//
3838
// In order to sign your assembly you must specify a key to use. Refer to the

0 commit comments

Comments
 (0)