Commit 9521956d authored by Tebjan Halm's avatar Tebjan Halm Committed by Eric Domke
Browse files

Revert ".Net 3.5 Support and Rendering Improvements (Markers, TSpans, Paths, etc.)"

parent 2261cfdb
...@@ -222,9 +222,9 @@ namespace Svg ...@@ -222,9 +222,9 @@ namespace Svg
{ {
var lastSegment = segments.Last; var lastSegment = segments.Last;
// if the last element is a SvgClosePathSegment the position of the previous move to should be used because the position of SvgClosePathSegment is 0,0 // if the last element is a SvgClosePathSegment the position of the previous element should be used because the position of SvgClosePathSegment is 0,0
if (lastSegment is SvgClosePathSegment) if (lastSegment is SvgClosePathSegment)
lastSegment = segments.OfType<SvgMoveToSegment>().Last(); lastSegment = segments[segments.Count - 2];
if (isRelativeX) if (isRelativeX)
{ {
...@@ -290,7 +290,6 @@ namespace Svg ...@@ -290,7 +290,6 @@ namespace Svg
{ {
if (value is string) if (value is string)
{ {
if (string.IsNullOrEmpty((string)value)) return new SvgPathSegmentList();
return Parse((string)value); return Parse((string)value);
} }
......
using Svg;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Linq;
using System.Diagnostics;
namespace Svg.UnitTests
{
/// <summary>
///This is a test class for ExtensionsTest and is intended
///to contain all ExtensionsTest Unit Tests
///</summary>
[TestClass()]
public class ExtensionsTest
{
private TestContext testContextInstance;
private static SvgDocument _doc;
/// <summary>
///Gets or sets the test context which provides
///information about and functionality for the current test run.
///</summary>
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
#region Additional test attributes
//
//You can use the following additional attributes as you write your tests:
//
//Use ClassInitialize to run code before running the first test in the class
[ClassInitialize()]
public static void MyClassInitialize(TestContext testContext)
{
using (var stream = new MemoryStream(UTF8Encoding.Default.GetBytes(Properties.Resources.SvgPathTest)))
{
_doc = SvgDocument.Open<SvgDocument>(stream, null);
}
}
//
//Use ClassCleanup to run code after all tests in a class have run
[ClassCleanup()]
public static void MyClassCleanup()
{
_doc = null;
}
//
//Use TestInitialize to run code before running each test
//[TestInitialize()]
//public void MyTestInitialize()
//{
//}
//
//Use TestCleanup to run code after each test has run
//[TestCleanup()]
//public void MyTestCleanup()
//{
//}
//
#endregion
[TestMethod]
public void TestDescendants()
{
var result = (from d in _doc.Descendants() select d.GetType().Name).Aggregate((p, c) => p + Environment.NewLine + c);
Assert.AreEqual(Properties.Resources.SvgDescendantTypes, result);
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Svg.UnitTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Svg.UnitTests")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("816daa2c-d023-4642-b433-d06ccf995ea9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Svg.UnitTests.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Svg.UnitTests.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to SvgDefinitionList
///SvgLinearGradientServer
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgLinearGradientServer
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgLinearGradientServer
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgGradientStop
///SvgLinearGradientServer
///SvgLinearGradientServer
///SvgLinearGradientServer
///SvgLinearGradientServer
///SvgFilter
///SvgGaussianBlur
///SvgFilter
///SvgGaussianBlur
///SvgFilt [rest of string was truncated]&quot;;.
/// </summary>
internal static string SvgDescendantTypes {
get {
return ResourceManager.GetString("SvgDescendantTypes", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;
///&lt;!-- Created with Inkscape (http://www.inkscape.org/) --&gt;
///&lt;svg xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:cc=&quot;http://creativecommons.org/ns#&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:svg=&quot;http://www.w3.org/2000/svg&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; xmlns:sodipodi=&quot;http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd&quot; xmlns:inkscape=&quot;http://www.inkscape.org/namespaces/inkscape&quot; widt [rest of string was truncated]&quot;;.
/// </summary>
internal static string SvgPathTest {
get {
return ResourceManager.GetString("SvgPathTest", resourceCulture);
}
}
}
}
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{89940CE3-6AAF-4061-B5F5-01F416B44506}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Svg.UnitTests</RootNamespace>
<AssemblyName>Svg.UnitTests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
<Visible>False</Visible>
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
<Compile Include="ExtensionsTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Svg.csproj">
<Project>{886A98C5-37C0-4E8B-885E-30C1D2F98B47}</Project>
<Name>Svg</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\obj\Debug\Svg.UnitTests.csprojResolveAssemblyReference.cache
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\obj\Debug\Svg.UnitTests.Properties.Resources.resources
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\obj\Debug\Svg.UnitTests.csproj.GenerateResource.Cache
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\bin\Debug\Svg.UnitTests.dll
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\bin\Debug\Svg.UnitTests.pdb
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\bin\Debug\Svg.dll
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\bin\Debug\Svg.pdb
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\obj\Debug\Svg.UnitTests.dll
C:\Users\edomke\Documents\GitHub\SVG\Source\Svg.UnitTests\obj\Debug\Svg.UnitTests.pdb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment