├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── builddocs.yml │ └── runtests.yml ├── .gitignore ├── CONTRIBUTING.md ├── Docs ├── .gitignore ├── Readme.md ├── api │ ├── .gitignore │ └── index.md ├── articles │ ├── Faq.md │ ├── GettingStarted.md │ ├── Introduction.md │ ├── License.md │ ├── ReleaseNotes.md │ ├── Samples.md │ └── toc.yml ├── docfx.json ├── filterConfig.yml ├── images │ └── svg.png ├── index.md ├── namespaces │ ├── Svg.DataTypes.md │ ├── Svg.Exceptions.md │ ├── Svg.ExtensionMethods.md │ ├── Svg.FilterEffects.md │ ├── Svg.Pathing.md │ ├── Svg.Transforms.md │ └── Svg.md ├── template │ └── public │ │ ├── main.css │ │ └── main.js └── toc.yml ├── Generators ├── AvailableElementsGenerator.cs ├── Element.cs ├── MemberType.cs ├── Property.cs ├── PropertyEqualityComparer.cs ├── Svg.Generators.csproj └── SyntaxReceiver.cs ├── README.md ├── Samples ├── .gitignore ├── Entities │ ├── Entities.csproj │ ├── Program.cs │ └── sample.svg ├── SVGBuilder │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SVGBuilder.csproj │ ├── SvgBuilder.Designer.cs │ ├── SvgBuilder.cs │ └── SvgBuilder.resx ├── SVGViewer │ ├── DebugRenderer.cs │ ├── NoImage.png │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SVGViewer.csproj │ ├── SvgViewer.Designer.cs │ ├── SvgViewer.cs │ └── SvgViewer.resx ├── SvgConsole │ ├── Program.cs │ ├── README.md │ └── SvgConsole.csproj └── SvgRuntimeUpdates │ ├── Program.cs │ ├── SvgRuntimeUpdates.csproj │ └── sample.svg ├── Source ├── .editorconfig ├── Basic Shapes │ ├── DOM.cd │ ├── SvgCircle.Drawing.cs │ ├── SvgCircle.cs │ ├── SvgEllipse.Drawing.cs │ ├── SvgEllipse.cs │ ├── SvgLine.Drawing.cs │ ├── SvgLine.cs │ ├── SvgMarkerElement.Drawing.cs │ ├── SvgMarkerElement.cs │ ├── SvgPathBasedElement.Drawing.cs │ ├── SvgPathBasedElement.cs │ ├── SvgPolygon.Drawing.cs │ ├── SvgPolygon.cs │ ├── SvgPolyline.Drawing.cs │ ├── SvgPolyline.cs │ ├── SvgRectangle.Drawing.cs │ ├── SvgRectangle.cs │ ├── SvgVisibility.cs │ ├── SvgVisualElement.Drawing.cs │ ├── SvgVisualElement.Style.cs │ └── SvgVisualElement.cs ├── Clipping and Masking │ ├── ISvgClipable.cs │ ├── SvgClipPath.Drawing.cs │ ├── SvgClipPath.cs │ ├── SvgClipRule.cs │ └── SvgMask.cs ├── Css │ ├── ExCssQuery.cs │ ├── ExSvgElementOps.cs │ └── IExCssSelectorOps.cs ├── DataTypes │ ├── EnumConverters.cs │ ├── ISvgSupportsCoordinateUnits.cs │ ├── ISvgViewPort.cs │ ├── SvgAspectRatio.cs │ ├── SvgAspectRatioConverter.cs │ ├── SvgColourInterpolation.cs │ ├── SvgCoordinateUnits.cs │ ├── SvgElementStyle.cs │ ├── SvgFontStretch.cs │ ├── SvgFontStyle.cs │ ├── SvgFontVariant.cs │ ├── SvgFontWeight.cs │ ├── SvgMarkerUnits.cs │ ├── SvgNumberCollection.cs │ ├── SvgOrient.cs │ ├── SvgOrientConverter.cs │ ├── SvgOverflow.cs │ ├── SvgPoint.Drawing.cs │ ├── SvgPoint.cs │ ├── SvgPointCollection.cs │ ├── SvgTextDecoration.cs │ ├── SvgTextLengthAdjust.cs │ ├── SvgTextPathMethod.cs │ ├── SvgTextPathSpacing.cs │ ├── SvgTextTransformation.cs │ ├── SvgUnit.Drawing.cs │ ├── SvgUnit.cs │ ├── SvgUnitCollection.cs │ ├── SvgUnitConverter.cs │ ├── SvgViewBox.Drawing.cs │ ├── SvgViewBox.cs │ └── XmlSpaceHandling.cs ├── Document Structure │ ├── SvgDefinitionList.Drawing.cs │ ├── SvgDefinitionList.cs │ ├── SvgDescription.cs │ ├── SvgFragment.Drawing.cs │ ├── SvgFragment.cs │ ├── SvgGroup.Drawing.cs │ ├── SvgGroup.cs │ ├── SvgImage.Drawing.cs │ ├── SvgImage.cs │ ├── SvgSwitch.Drawing.cs │ ├── SvgSwitch.cs │ ├── SvgSymbol.Drawing.cs │ ├── SvgSymbol.cs │ ├── SvgTitle.cs │ ├── SvgUse.Drawing.cs │ └── SvgUse.cs ├── Exceptions │ ├── SvgException.cs │ ├── SvgGdiPlusCannotBeLoadedException.cs │ └── SvgMemoryException.cs ├── Extensibility │ ├── SvgForeignObject.Drawing.cs │ └── SvgForeignObject.cs ├── ExtensionMethods │ └── UriExtensions.cs ├── Extensions.cs ├── ExternalType.cs ├── Filter Effects │ ├── ISvgFilterable.cs │ ├── ImageBuffer.cs │ ├── SvgFilter.Drawing.cs │ ├── SvgFilter.cs │ ├── SvgFilterPrimitive.cs │ ├── feBlend │ │ ├── SvgBlend.Drawing.cs │ │ ├── SvgBlend.cs │ │ └── SvgBlendMode.cs │ ├── feColourMatrix │ │ ├── SvgColourMatrix.Drawing.cs │ │ ├── SvgColourMatrix.cs │ │ └── SvgColourMatrixType.cs │ ├── feComponentTransfer │ │ ├── SvgComponentTransfer.Drawing.cs │ │ ├── SvgComponentTransfer.cs │ │ ├── SvgComponentTransferFunction.cs │ │ └── SvgComponentTransferType.cs │ ├── feComposite │ │ ├── SvgComposite.Drawing.cs │ │ ├── SvgComposite.cs │ │ └── SvgCompositeOperator.cs │ ├── feConvolveMatrix │ │ ├── SvgConvolveMatrix.Drawing.cs │ │ ├── SvgConvolveMatrix.cs │ │ └── SvgEdgeMode.cs │ ├── feDiffuseLighting │ │ ├── SvgDiffuseLighting.Drawing.cs │ │ └── SvgDiffuseLighting.cs │ ├── feDisplacementMap │ │ ├── SvgChannelSelector.cs │ │ ├── SvgDisplacementMap.Drawing.cs │ │ └── SvgDisplacementMap.cs │ ├── feDistantLight │ │ └── SvgDistantLight.cs │ ├── feFlood │ │ ├── SvgFlood.Drawing.cs │ │ └── SvgFlood.cs │ ├── feFuncA │ │ └── SvgFuncA.cs │ ├── feFuncB │ │ └── SvgFuncB.cs │ ├── feFuncG │ │ └── SvgFuncG.cs │ ├── feFuncR │ │ └── SvgFuncR.cs │ ├── feGaussianBlur │ │ ├── RawBitmap.cs │ │ ├── SvgGaussianBlur.Drawing.cs │ │ └── SvgGaussianBlur.cs │ ├── feImage │ │ ├── SvgImage.Drawing.cs │ │ └── SvgImage.cs │ ├── feMerge │ │ ├── SvgMerge.Drawing.cs │ │ ├── SvgMerge.cs │ │ └── SvgMergeNode.cs │ ├── feMorphology │ │ ├── SvgMorphology.Drawing.cs │ │ ├── SvgMorphology.cs │ │ └── SvgMorphologyOperator.cs │ ├── feOffset │ │ ├── SvgOffset.Drawing.cs │ │ └── SvgOffset.cs │ ├── fePointLight │ │ └── SvgPointLight.cs │ ├── feSpecularLighting │ │ ├── SvgSpecularLighting.Drawing.cs │ │ └── SvgSpecularLighting.cs │ ├── feSpotLight │ │ └── SvgSpotLight.cs │ ├── feTile │ │ ├── SvgTile.Drawing.cs │ │ └── SvgTile.cs │ └── feTurbulence │ │ ├── SvgStitchType.cs │ │ ├── SvgTurbulence.Drawing.cs │ │ ├── SvgTurbulence.cs │ │ └── SvgTurbulenceType.cs ├── Generated │ └── Readme.md ├── Helpers │ ├── StringParser.cs │ └── StringSplitEnumerator.cs ├── Linking │ └── SvgAnchor.cs ├── Metadata │ ├── SvgDocumentMetadata.Drawing.cs │ └── SvgDocumentMetadata.cs ├── NonSvgElement.cs ├── Painting │ ├── GenericBoundable.cs │ ├── ISvgBoundable.cs │ ├── ISvgStylable.cs │ ├── SvgColourConverter.cs │ ├── SvgColourServer.Drawing.cs │ ├── SvgColourServer.cs │ ├── SvgDeferredPaintServer.Drawing.cs │ ├── SvgDeferredPaintServer.cs │ ├── SvgDeferredPaintServerFactory.cs │ ├── SvgFallbackPaintServer.Drawing.cs │ ├── SvgFallbackPaintServer.cs │ ├── SvgFillRule.cs │ ├── SvgGradientServer.Drawing.cs │ ├── SvgGradientServer.cs │ ├── SvgGradientSpreadMethod.cs │ ├── SvgGradientStop.cs │ ├── SvgLinearGradientServer.Drawing.cs │ ├── SvgLinearGradientServer.cs │ ├── SvgMarker.Drawing.cs │ ├── SvgMarker.cs │ ├── SvgPaintServer.Drawing.cs │ ├── SvgPaintServer.cs │ ├── SvgPaintServerFactory.cs │ ├── SvgPatternServer.Drawing.cs │ ├── SvgPatternServer.cs │ ├── SvgRadialGradientServer.Drawing.cs │ ├── SvgRadialGradientServer.cs │ ├── SvgStrokeLineCap.cs │ └── SvgStrokeLineJoin.cs ├── Paths │ ├── CoordinateParser.cs │ ├── SvgArcSegment.Drawing.cs │ ├── SvgArcSegment.cs │ ├── SvgClosePathSegment.Drawing.cs │ ├── SvgClosePathSegment.cs │ ├── SvgCubicCurveSegment.Drawing.cs │ ├── SvgCubicCurveSegment.cs │ ├── SvgLineSegment.Drawing.cs │ ├── SvgLineSegment.cs │ ├── SvgMoveToSegment.Drawing.cs │ ├── SvgMoveToSegment.cs │ ├── SvgPath.Drawing.cs │ ├── SvgPath.cs │ ├── SvgPathBuilder.cs │ ├── SvgPathSegment.Drawing.cs │ ├── SvgPathSegment.cs │ ├── SvgPathSegmentList.cs │ ├── SvgQuadraticCurveSegment.Drawing.cs │ └── SvgQuadraticCurveSegment.cs ├── Properties │ └── AssemblyInfo.cs ├── Rendering │ ├── IGraphicsProvider.cs │ ├── ISvgRenderer.cs │ ├── SvgRenderer.cs │ └── SvgRendering.cs ├── Resources │ └── svg11.dtd ├── Scripting │ └── SvgScript.cs ├── Svg.csproj ├── Svg.sln ├── SvgAttributeAttribute.cs ├── SvgAttributeCollection.cs ├── SvgContentNode.cs ├── SvgDocument.Drawing.cs ├── SvgDocument.Win32.cs ├── SvgDocument.cs ├── SvgDtdResolver.cs ├── SvgElement.Drawing.cs ├── SvgElement.cs ├── SvgElementAttribute.cs ├── SvgElementCollection.cs ├── SvgElementFactory.cs ├── SvgElementIdManager.cs ├── SvgElementStyle.Drawing.cs ├── SvgElementStyle.cs ├── SvgExtentions.cs ├── SvgFontManager.cs ├── SvgModel.cs ├── SvgNamespaces.cs ├── SvgNodeReader.cs ├── SvgOptions.cs ├── SvgTextReader.cs ├── SvgUnknownElement.cs ├── System │ └── Drawing │ │ └── ColorConverter.cs ├── Text │ ├── GdiFontDefn.cs │ ├── IFontDefn.cs │ ├── PathStatistics.cs │ ├── SvgFont.Drawing.cs │ ├── SvgFont.cs │ ├── SvgFontDefn.cs │ ├── SvgFontFace.cs │ ├── SvgFontFaceSrc.cs │ ├── SvgFontFaceUri.cs │ ├── SvgGlyph.Drawing.cs │ ├── SvgGlyph.cs │ ├── SvgKern.cs │ ├── SvgMissingGlyph.cs │ ├── SvgText.cs │ ├── SvgTextAnchor.cs │ ├── SvgTextBase.Drawing.cs │ ├── SvgTextBase.cs │ ├── SvgTextPath.Drawing.cs │ ├── SvgTextPath.cs │ ├── SvgTextRef.Drawing.cs │ ├── SvgTextRef.cs │ └── SvgTextSpan.cs ├── Transforms │ ├── ISvgTransformable.cs │ ├── SvgMatrix.Drawing.cs │ ├── SvgMatrix.cs │ ├── SvgRotate.Drawing.cs │ ├── SvgRotate.cs │ ├── SvgScale.Drawing.cs │ ├── SvgScale.cs │ ├── SvgShear.Drawing.cs │ ├── SvgShear.cs │ ├── SvgSkew.Drawing.cs │ ├── SvgSkew.cs │ ├── SvgTransform.Drawing.cs │ ├── SvgTransform.cs │ ├── SvgTransformCollection.Drawing.cs │ ├── SvgTransformCollection.cs │ ├── SvgTransformConverter.cs │ ├── SvgTranslate.Drawing.cs │ └── SvgTranslate.cs ├── Web │ └── SvgHandler.cs ├── svg-logo-v.png ├── svgkey.snk └── version.json ├── Tests ├── Issues │ ├── PassingTests.txt │ ├── RunTest-3.4.6.xml │ ├── images │ │ ├── 20x20.png │ │ └── 800x800_rect.svg │ ├── png │ │ ├── __AJ_Digital_Camera.png │ │ ├── __Telefunken_FuBK_test_pattern.png │ │ ├── __issue-015-01.png │ │ ├── __issue-016-01.png │ │ ├── __issue-034-02.png │ │ ├── __issue-036-01.png │ │ ├── __issue-064-01.png │ │ ├── __issue-064-02.png │ │ ├── __issue-074-01.png │ │ ├── __issue-082-01.png │ │ ├── __issue-083-01.png │ │ ├── __issue-084-01.png │ │ ├── __issue-084-02.png │ │ ├── __issue-109-01.png │ │ ├── __issue-1101-01.png │ │ ├── __issue-114-01.png │ │ ├── __issue-116-01.png │ │ ├── __issue-123-01.png │ │ ├── __issue-127-01.png │ │ ├── __issue-129-01.png │ │ ├── __issue-131-01.png │ │ ├── __issue-134-01.png │ │ ├── __issue-143-01.png │ │ ├── __issue-166-01.png │ │ ├── __issue-191-01.png │ │ ├── __issue-202-01.png │ │ ├── __issue-214-01.png │ │ ├── __issue-215-01.png │ │ ├── __issue-223-01.png │ │ ├── __issue-223-02.png │ │ ├── __issue-224-01.png │ │ ├── __issue-227-01.png │ │ ├── __issue-227-02.png │ │ ├── __issue-239-01.png │ │ ├── __issue-242-01.png │ │ ├── __issue-244-01.png │ │ ├── __issue-247-01.png │ │ ├── __issue-247-02.png │ │ ├── __issue-252-01.png │ │ ├── __issue-263-01.png │ │ ├── __issue-279-01.png │ │ ├── __issue-280-01.png │ │ ├── __issue-280-02.png │ │ ├── __issue-315-01.png │ │ ├── __issue-318-01.png │ │ ├── __issue-323-01.png │ │ ├── __issue-323-02.png │ │ ├── __issue-323-03.png │ │ ├── __issue-329-01.png │ │ ├── __issue-338-01_stroke_width.png │ │ ├── __issue-342-01.png │ │ ├── __issue-345-01.png │ │ ├── __issue-345-02.png │ │ ├── __issue-354-01.png │ │ ├── __issue-362-01.png │ │ ├── __issue-363-01.png │ │ ├── __issue-385-01_Test_text-anchor-middle.PNG │ │ ├── __issue-391-01.png │ │ ├── __issue-398-01.png │ │ ├── __issue-419-01.png │ │ ├── __issue-436-01.png │ │ ├── __issue-437-01.png │ │ ├── __issue-437-02.png │ │ ├── __issue-437-03.png │ │ ├── __issue-460-01.png │ │ ├── __issue-479-01.png │ │ ├── __issue-488-01.png │ │ ├── __issue-508-01.png │ │ ├── __issue-541-01.png │ │ ├── __issue-554-01.png │ │ ├── __issue-554-02.png │ │ ├── __issue-578-01.png │ │ ├── __issue-592-01.png │ │ ├── __issue-592-02.png │ │ ├── __issue-622-01.png │ │ ├── __issue-626-01.png │ │ ├── __issue-634-01.png │ │ ├── __issue-664-01.png │ │ ├── __issue-675-01.png │ │ ├── __issue-732-01.png │ │ ├── __issue-744-01.png │ │ ├── __issue-747-01.png │ │ ├── __issue-755-01.png │ │ ├── __issue-758-01.png │ │ ├── __issue-769-01.png │ │ ├── __issue-785-01.png │ │ ├── __issue-789-01.png │ │ ├── __issue-789-02.png │ │ ├── __issue-789-03.png │ │ ├── __issue-830-01.png │ │ ├── __issue-863-01.png │ │ ├── __issue-886-01.png │ │ ├── __issue-888-01.png │ │ ├── __issue-917-01.png │ │ ├── __issue-917-02.png │ │ ├── __issue-941-01.png │ │ ├── __issue-960-01.png │ │ ├── __issue-966-01.png │ │ ├── __issue-966-02.png │ │ ├── __issue-989-01.png │ │ ├── __pull_request-1045-01.png │ │ ├── __pull_request-373-01.png │ │ ├── __pull_request-374-01.png │ │ ├── __pull_request-414-01.png │ │ ├── __pull_request-433-01.png │ │ ├── __pull_request-444-01.png │ │ ├── __pull_request-462-01.png │ │ ├── __pull_request-471-01.png │ │ ├── __pull_request-492-01.png │ │ ├── __pull_request-500-01.png │ │ ├── __pull_request-500-02.png │ │ ├── __pull_request-504-01.png │ │ ├── __pull_request-537-01.png │ │ ├── __pull_request-537-02.png │ │ ├── __pull_request-551-01.png │ │ ├── __pull_request-564-01.png │ │ ├── __pull_request-564-02.png │ │ ├── __pull_request-575-01.png │ │ ├── __pull_request-640-01.png │ │ ├── __pull_request-640-02.png │ │ ├── __pull_request-642-01.png │ │ ├── __pull_request-656-01.png │ │ ├── __pull_request-656-02.png │ │ ├── __pull_request-658-01.png │ │ ├── __pull_request-659-01.png │ │ ├── __pull_request-686-01.png │ │ ├── __pull_request-690-01.png │ │ ├── __pull_request-706-01.png │ │ ├── __pull_request-727-01.png │ │ ├── __pull_request-873-01.png │ │ ├── __pull_request-873-02.png │ │ ├── __pull_request-925-01.png │ │ ├── __pull_request-925-02.png │ │ ├── __pull_request-925-03.png │ │ ├── __pull_request-925-04.png │ │ ├── __pull_request-925-05.png │ │ ├── __pull_request-961-01.png │ │ ├── __pull_request-963-01.png │ │ ├── __text-fonts-06-t.png │ │ ├── __tiger.png │ │ └── __title.png │ └── svg │ │ ├── __AJ_Digital_Camera.svg │ │ ├── __Telefunken_FuBK_test_pattern.svg │ │ ├── __issue-015-01.svg │ │ ├── __issue-016-01.svg │ │ ├── __issue-034-02.svg │ │ ├── __issue-036-01.svg │ │ ├── __issue-064-01.svg │ │ ├── __issue-064-02.svg │ │ ├── __issue-074-01.svg │ │ ├── __issue-082-01.svg │ │ ├── __issue-083-01.svg │ │ ├── __issue-084-01.svg │ │ ├── __issue-084-02.svg │ │ ├── __issue-109-01.svg │ │ ├── __issue-1101-01.svg │ │ ├── __issue-114-01.svg │ │ ├── __issue-116-01.svg │ │ ├── __issue-123-01.svg │ │ ├── __issue-127-01.svg │ │ ├── __issue-129-01.svg │ │ ├── __issue-131-01.svg │ │ ├── __issue-134-01.svg │ │ ├── __issue-143-01.svg │ │ ├── __issue-166-01.svg │ │ ├── __issue-191-01.svg │ │ ├── __issue-202-01.svg │ │ ├── __issue-214-01.svg │ │ ├── __issue-215-01.svg │ │ ├── __issue-223-01.svg │ │ ├── __issue-223-02.svg │ │ ├── __issue-224-01.svg │ │ ├── __issue-227-01.svg │ │ ├── __issue-227-02.svg │ │ ├── __issue-239-01.svg │ │ ├── __issue-242-01.svg │ │ ├── __issue-244-01.svg │ │ ├── __issue-247-01.svg │ │ ├── __issue-247-02.svg │ │ ├── __issue-252-01.svg │ │ ├── __issue-263-01.svg │ │ ├── __issue-279-01.svg │ │ ├── __issue-280-01.svg │ │ ├── __issue-280-02.svg │ │ ├── __issue-315-01.svg │ │ ├── __issue-318-01.svg │ │ ├── __issue-323-01.svg │ │ ├── __issue-323-02.svg │ │ ├── __issue-323-03.svg │ │ ├── __issue-329-01.svg │ │ ├── __issue-338-01_stroke_width.svg │ │ ├── __issue-342-01.svg │ │ ├── __issue-345-01.svg │ │ ├── __issue-345-02.svg │ │ ├── __issue-354-01.svg │ │ ├── __issue-362-01.svg │ │ ├── __issue-363-01.svg │ │ ├── __issue-385-01_Test_text-anchor-middle.svg │ │ ├── __issue-391-01.svg │ │ ├── __issue-398-01.svg │ │ ├── __issue-419-01.svg │ │ ├── __issue-436-01.svg │ │ ├── __issue-437-01.svg │ │ ├── __issue-437-02.svg │ │ ├── __issue-437-03.svg │ │ ├── __issue-460-01.svg │ │ ├── __issue-479-01.svg │ │ ├── __issue-488-01.svg │ │ ├── __issue-508-01.svg │ │ ├── __issue-541-01.svg │ │ ├── __issue-554-01.svg │ │ ├── __issue-554-02.svg │ │ ├── __issue-578-01.svg │ │ ├── __issue-592-01.svg │ │ ├── __issue-592-02.svg │ │ ├── __issue-622-01.svg │ │ ├── __issue-626-01.svg │ │ ├── __issue-634-01.svg │ │ ├── __issue-664-01.svg │ │ ├── __issue-675-01.svg │ │ ├── __issue-732-01.svg │ │ ├── __issue-744-01.svg │ │ ├── __issue-747-01.svg │ │ ├── __issue-755-01.svg │ │ ├── __issue-758-01.svg │ │ ├── __issue-769-01.svg │ │ ├── __issue-785-01.svg │ │ ├── __issue-789-01.svg │ │ ├── __issue-789-02.svg │ │ ├── __issue-789-03.svg │ │ ├── __issue-830-01.svg │ │ ├── __issue-863-01.svg │ │ ├── __issue-886-01.svg │ │ ├── __issue-888-01.svg │ │ ├── __issue-917-01.svg │ │ ├── __issue-917-02.svg │ │ ├── __issue-941-01.svg │ │ ├── __issue-960-01.svg │ │ ├── __issue-966-01.svg │ │ ├── __issue-966-02.svg │ │ ├── __issue-989-01.svg │ │ ├── __pull_request-1045-01.svg │ │ ├── __pull_request-373-01.svg │ │ ├── __pull_request-374-01.svg │ │ ├── __pull_request-414-01.svg │ │ ├── __pull_request-433-01.svg │ │ ├── __pull_request-444-01.svg │ │ ├── __pull_request-462-01.svg │ │ ├── __pull_request-471-01.svg │ │ ├── __pull_request-492-01.svg │ │ ├── __pull_request-500-01.svg │ │ ├── __pull_request-500-02.svg │ │ ├── __pull_request-504-01.svg │ │ ├── __pull_request-537-01.svg │ │ ├── __pull_request-537-02.svg │ │ ├── __pull_request-551-01.svg │ │ ├── __pull_request-564-01.svg │ │ ├── __pull_request-564-02.svg │ │ ├── __pull_request-575-01.svg │ │ ├── __pull_request-640-01.svg │ │ ├── __pull_request-640-02.svg │ │ ├── __pull_request-642-01.svg │ │ ├── __pull_request-656-01.svg │ │ ├── __pull_request-656-02.svg │ │ ├── __pull_request-658-01.svg │ │ ├── __pull_request-659-01.svg │ │ ├── __pull_request-686-01.svg │ │ ├── __pull_request-690-01.svg │ │ ├── __pull_request-706-01.svg │ │ ├── __pull_request-727-01.svg │ │ ├── __pull_request-873-01.svg │ │ ├── __pull_request-873-02.svg │ │ ├── __pull_request-925-01.svg │ │ ├── __pull_request-925-02.svg │ │ ├── __pull_request-925-03.svg │ │ ├── __pull_request-925-04.svg │ │ ├── __pull_request-925-05.svg │ │ ├── __pull_request-961-01.svg │ │ ├── __pull_request-963-01.svg │ │ ├── __text-fonts-06-t.svg │ │ ├── __tiger.svg │ │ └── __title.svg ├── Svg.Benchmark.sln ├── Svg.Benchmark │ ├── CoordinateParserBenchmarks.cs │ ├── CssQueryPerformanceBenchmark.cs │ ├── Program.cs │ ├── README.md │ ├── Svg.Benchmark.csproj │ ├── SvgDocumentBenchmarks.cs │ ├── SvgNumberCollectionConverterBenchmarks.cs │ ├── SvgPathBuilderBenchmarks.cs │ ├── SvgTransformConverterBenchmarks.cs │ ├── SvgUnitCollectionConverterBenchmarks.cs │ ├── SvgUnitConverterBenchmarks.cs │ └── ToStringBenchmarks.cs ├── Svg.Custom │ └── Svg.Custom.csproj ├── Svg.Tests.Common │ ├── Css │ │ ├── CssQuery.cs │ │ └── SvgElementOps.cs │ ├── ExtensionMethods.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Svg.Tests.Common.csproj │ ├── TestsUtils.cs │ └── svgkey.snk ├── Svg.UnitTests.sln ├── Svg.UnitTests │ ├── AllTests.csv │ ├── BoundsTests.cs │ ├── CssQueryTest.cs │ ├── DpiTest.cs │ ├── EntitiesTests.cs │ ├── EnumConvertersTests.cs │ ├── ExCssSelectorTests.cs │ ├── GdiPlusTests.cs │ ├── ImageComparisonTest.cs │ ├── LargeEmbeddedImageTest.cs │ ├── LexerIssueTests.cs │ ├── MarkerEndTest.cs │ ├── MetafileRenderingTest.cs │ ├── MultiThreadingTest.cs │ ├── NodeReaderTests.cs │ ├── PassingTests.csv │ ├── PercentageSizeTests.cs │ ├── PerformanceTest.cs │ ├── PrivateFontsTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── Issue1176_Switch │ │ │ ├── Blue.png │ │ │ ├── Green.png │ │ │ ├── Red.png │ │ │ ├── SwitchTest.svg │ │ │ └── Yellow.png │ │ ├── Issue204_PrivateFont │ │ │ ├── BrushScriptMT2.ttf │ │ │ └── Text.svg │ │ ├── Issue210_Metafile │ │ │ └── 3DSceneSnapshotBIG.svg │ │ ├── Issue212_MakerEnd │ │ │ └── OperatingPlan.svg │ │ ├── Issue225_LargeUri │ │ │ └── Speedometer.svg │ │ ├── Issue281_Bounds │ │ │ └── BoundsTest.svg │ │ ├── Issue399_LexerIssue │ │ │ ├── EmptyDTag.svg │ │ │ └── LexerTestTemplate.svg │ │ ├── Issue508_DashArray │ │ │ └── DashArray.svg │ │ ├── Issue518_Entities │ │ │ └── Entities.svg │ │ ├── Issue_Multirender │ │ │ └── TestFile.svg │ │ ├── Issue_TextElement │ │ │ └── Text.svg │ │ ├── Issue_Threading │ │ │ └── TestFile.svg │ │ ├── ScriptTag │ │ │ └── TestFile.svg │ │ └── hotfix-image-data-uri │ │ │ └── Speedometer.svg │ ├── SmallEmbeddingImageTest.cs │ ├── StyleTest.cs │ ├── Svg.UnitTests.csproj │ ├── SvgAttributeCollectionTests.cs │ ├── SvgDocumentsTests.cs │ ├── SvgElementDeepCopyTest.cs │ ├── SvgJavascriptTests.cs │ ├── SvgMultiRenderTests.cs │ ├── SvgNumberCollectionTests.cs │ ├── SvgPointCollectionTests.cs │ ├── SvgTestHelper.cs │ ├── SvgTextTests.cs │ ├── SvgUnitConverterTests.cs │ ├── SvgVisualElementTests.cs │ ├── SwitchTest.cs │ ├── XxeVulnerabilityTests.cs │ ├── public.pk │ └── svgkey.snk ├── SvgW3CTestRunner │ ├── App.ico │ ├── BitmapExtensions.cs │ ├── BitmapUtils.cs │ ├── ListSearchDialog.Designer.cs │ ├── ListSearchDialog.cs │ ├── ListSearchDialog.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── RunTests.cs │ ├── RunTestsDialog.Designer.cs │ ├── RunTestsDialog.cs │ ├── RunTestsDialog.resx │ ├── SvgW3CTestRunner.csproj │ ├── View.Designer.cs │ ├── View.cs │ └── View.resx └── W3CTestSuite │ ├── PassingTests.txt │ └── RunTest-3.4.6.xml └── license.txt /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | #### Description 4 | 5 | 6 | #### Example data 7 | 8 | 9 | #### Used Versions 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 5 | #### Reference Issue 6 | 7 | 8 | 9 | #### What does this implement/fix? Explain your changes. 10 | 13 | 14 | #### Any other comments? 15 | 17 | 18 | 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | -------------------------------------------------------------------------------- /Docs/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /Docs/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /Docs/api/index.md: -------------------------------------------------------------------------------- 1 | # API Reference 2 | 3 | ## [](#namespaces)Namespaces 4 | 5 | #### [Svg](xref:Svg) 6 | [!include[](../namespaces/Svg.md)] 7 | 8 | #### [Svg.DataTypes](xref:Svg.DataTypes) 9 | [!include[](../namespaces/Svg.DataTypes.md)] 10 | 11 | #### [Svg.Exceptions](xref:Svg.Exceptions) 12 | [!include[](../namespaces/Svg.Exceptions.md)] 13 | 14 | #### [Svg.ExtensionMethods](xref:Svg.ExtensionMethods) 15 | [!include[](../namespaces/Svg.ExtensionMethods.md)] 16 | 17 | #### [Svg.FilterEffects](xref:Svg.FilterEffects) 18 | [!include[](../namespaces/Svg.FilterEffects.md)] 19 | 20 | #### [Svg.Pathing](xref:Svg.Pathing) 21 | [!include[](../namespaces/Svg.Pathing.md)] 22 | 23 | #### [Svg.Transforms](xref:Svg.Transforms) 24 | [!include[](../namespaces/Svg.Transforms.md)] 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Docs/articles/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Introduction 2 | href: Introduction.md 3 | - name: Getting Started 4 | href: GettingStarted.md 5 | - name: Q&A 6 | href: Faq.md 7 | - name: Release Notes 8 | href: ReleaseNotes.md 9 | - name: Sample Code 10 | href: Samples.md 11 | - name: License 12 | href: License.md 13 | -------------------------------------------------------------------------------- /Docs/filterConfig.yml: -------------------------------------------------------------------------------- 1 | apiRules: 2 | - exclude: 3 | uidRegex: ^Svg\.Document_Structure$ 4 | type: Namespace 5 | -------------------------------------------------------------------------------- /Docs/images/svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Docs/images/svg.png -------------------------------------------------------------------------------- /Docs/index.md: -------------------------------------------------------------------------------- 1 | W3C SVG Logo 2 | 3 | # SVG.NET Documentation 4 | 5 | Welcome to the documentation for the SVG.NET library! 6 | 7 | ### Usage documentation 8 | - [Getting Started](articles/GettingStarted.md) 9 | - [Q&A](articles/Faq.md) 10 | - [Generated API documentation](api/index.md) 11 | - [Sample Code](articles/Samples.md) 12 | 13 | ### Project documentation 14 | - [Release Notes](articles/ReleaseNotes.md) 15 | - [Contributing Guide](https://github.com/svg-net/SVG/blob/master/CONTRIBUTING.md) 16 | 17 | _Note that this documentation is work in progress. 18 | You are always welcome to help improving it!_ -------------------------------------------------------------------------------- /Docs/namespaces/Svg.DataTypes.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Svg.DataTypes 3 | summary: *content 4 | --- 5 | The **Svg.DataTypes** namespace contains classes defining the basic data types used by this SVG for .NET library. 6 | -------------------------------------------------------------------------------- /Docs/namespaces/Svg.Exceptions.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Svg.Exceptions 3 | summary: *content 4 | --- 5 | The **Svg.Exceptions** namespace contains .NET exception classes defined by this SVG for .NET library. 6 | -------------------------------------------------------------------------------- /Docs/namespaces/Svg.ExtensionMethods.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Svg.ExtensionMethods 3 | summary: *content 4 | --- 5 | The **Svg.ExtensionMethods** namespace contains .NET extension classes defined by this SVG for .NET library. 6 | -------------------------------------------------------------------------------- /Docs/namespaces/Svg.FilterEffects.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Svg.FilterEffects 3 | summary: *content 4 | --- 5 | The **Svg.FilterEffects** namespace contains classes implementing the SVG filter effects. 6 | -------------------------------------------------------------------------------- /Docs/namespaces/Svg.Pathing.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Svg.Pathing 3 | summary: *content 4 | --- 5 | The **Svg.Pathing** namespace contains classes implementing the SVG path. 6 | -------------------------------------------------------------------------------- /Docs/namespaces/Svg.Transforms.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Svg.Transforms 3 | summary: *content 4 | --- 5 | The **Svg.Transforms** namespace contains classes defining SVG matrix transformation classes. 6 | -------------------------------------------------------------------------------- /Docs/namespaces/Svg.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Svg 3 | summary: *content 4 | --- 5 | The **Svg** namespace contains the main classes and interfaces implementing the SVG specifications. 6 | The classes are based on the W3C SVG interfaces, but not strictly implementing the W3C SVG interfaces. 7 | -------------------------------------------------------------------------------- /Docs/template/public/main.css: -------------------------------------------------------------------------------- 1 | /* Checkout https://getbootstrap.com/docs/5.3/customize/color/ for more customization options */ 2 | .navbar-brand #logo { 3 | width: 36px; 4 | height: 36px; 5 | margin-right:10px; 6 | } 7 | /* 8 | #navbar ul.navbar-nav { 9 | margin-top: -3px; 10 | } 11 | */ -------------------------------------------------------------------------------- /Docs/template/public/main.js: -------------------------------------------------------------------------------- 1 | export default { 2 | iconLinks: [ 3 | { 4 | icon: 'github', 5 | href: 'https://github.com/svg-net/SVG', 6 | title: 'GitHub: SVG-NET' 7 | }, 8 | { 9 | icon: 'filetype-svg', 10 | href: 'https://developer.mozilla.org/en-US/docs/Web/SVG', 11 | title: 'SVG: Scalable Vector Graphics' 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /Docs/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Articles 2 | href: articles/ 3 | - name: API Reference 4 | href: api/ 5 | topicHref: api/index.md -------------------------------------------------------------------------------- /Generators/MemberType.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.Generators 2 | { 3 | /// 4 | /// Symbol member type. 5 | /// 6 | enum MemberType 7 | { 8 | /// 9 | /// Property symbol. 10 | /// 11 | Property, 12 | /// 13 | /// Event symbol. 14 | /// 15 | Event 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Generators/PropertyEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Microsoft.CodeAnalysis; 3 | 4 | namespace Svg.Generators 5 | { 6 | /// 7 | /// Custom equality comparer using for cmparison. 8 | /// 9 | class PropertyEqualityComparer : IEqualityComparer 10 | { 11 | /// 12 | public bool Equals(Property p1, Property p2) 13 | { 14 | return SymbolEqualityComparer.Default.Equals(p1.Symbol, p2.Symbol); 15 | } 16 | 17 | /// 18 | public int GetHashCode(Property p) 19 | { 20 | #pragma warning disable RS1024 21 | return p.Symbol.GetHashCode(); 22 | #pragma warning restore RS1024 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Generators/Svg.Generators.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | Library 6 | False 7 | latest 8 | enable 9 | latest 10 | true 11 | Debug;Release 12 | 13 | 14 | 15 | 16 | 17 | 18 | $(NoWarn);CS1591;CS0618 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Generators/SyntaxReceiver.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Microsoft.CodeAnalysis; 3 | using Microsoft.CodeAnalysis.CSharp.Syntax; 4 | 5 | namespace Svg.Generators 6 | { 7 | /// 8 | /// The SyntaxReceiver is used to filter compiled code. This enable quick and easy way to filter compiled code. 9 | /// 10 | class SyntaxReceiver : ISyntaxReceiver 11 | { 12 | /// 13 | /// Gets the list of all candidate class. 14 | /// 15 | public List CandidateClasses { get; } = new(); 16 | 17 | /// 18 | public void OnVisitSyntaxNode(SyntaxNode syntaxNode) 19 | { 20 | if (syntaxNode is ClassDeclarationSyntax classDeclarationSyntax) 21 | { 22 | CandidateClasses.Add(classDeclarationSyntax); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Samples/.gitignore: -------------------------------------------------------------------------------- 1 | sample.png 2 | -------------------------------------------------------------------------------- /Samples/Entities/Entities.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp3.1;net462 6 | Debug;Release 7 | 8 | 9 | 10 | $(NoWarn);NETSDK1138 11 | 12 | 13 | $(NoWarn);CS1591;CS0618;NETSDK1138 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Samples/Entities/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Svg; 4 | using System.IO; 5 | 6 | namespace Entities 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"../../../sample.svg"); 13 | 14 | var sampleDoc = SvgDocument.Open(filePath, new Dictionary 15 | { 16 | {"entity1", "fill:red" }, 17 | {"entity2", "fill:yellow" } 18 | }); 19 | 20 | sampleDoc.Draw().Save(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"../../../sample.png")); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/Entities/sample.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Samples/SVGBuilder/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace SVGBuilder 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new SvgBuilder()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Samples/SVGBuilder/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Samples/SVGViewer/NoImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Samples/SVGViewer/NoImage.png -------------------------------------------------------------------------------- /Samples/SVGViewer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace SVGViewer 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new SVGViewer()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Samples/SVGViewer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Samples/SVGViewer/SVGViewer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net8.0-windows;net6.0-windows;net462 6 | true 7 | false 8 | true 9 | Debug;Release 10 | 11 | 12 | 13 | $(NoWarn);NETSDK1138 14 | 15 | 16 | $(NoWarn);CS1591;CS0618;NETSDK1138 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Samples/SvgRuntimeUpdates/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.IO; 4 | using Svg; 5 | 6 | namespace SvgRuntimeUpdates 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | var sampleDoc = SvgDocument.Open(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"../../../sample.svg")); 13 | sampleDoc.GetElementById("Commonwealth_Star").Fill = new SvgColourServer(Color.Black); 14 | sampleDoc.Draw().Save(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"../../../sample.png")); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Samples/SvgRuntimeUpdates/SvgRuntimeUpdates.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp3.1;net462 6 | Debug;Release 7 | 8 | 9 | 10 | $(NoWarn);NETSDK1138 11 | 12 | 13 | $(NoWarn);CS1591;CS0618;NETSDK1138 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Source/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | 6 | [*.cs] 7 | charset = utf-8-bom 8 | end_of_line = crlf 9 | indent_size = 4 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.{xml,svg}] 14 | charset = utf-8 15 | end_of_line = crlf 16 | indent_size = 2 17 | insert_final_newline = true 18 | trim_trailing_whitespace = true 19 | -------------------------------------------------------------------------------- /Source/Basic Shapes/SvgPathBasedElement.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | using System.Drawing.Drawing2D; 4 | 5 | namespace Svg 6 | { 7 | public abstract partial class SvgPathBasedElement : SvgVisualElement 8 | { 9 | public override RectangleF Bounds 10 | { 11 | get 12 | { 13 | var path = Path(null); 14 | if (path == null) 15 | return new RectangleF(); 16 | if (Transforms == null || Transforms.Count == 0) 17 | return path.GetBounds(); 18 | 19 | using (path = (GraphicsPath)path.Clone()) 20 | using (var matrix = Transforms.GetMatrix()) 21 | { 22 | path.Transform(matrix); 23 | return path.GetBounds(); 24 | } 25 | } 26 | } 27 | } 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /Source/Basic Shapes/SvgPathBasedElement.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// Represents an element that is using a GraphicsPath as rendering base. 5 | /// 6 | public abstract partial class SvgPathBasedElement : SvgVisualElement 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Source/Basic Shapes/SvgPolygon.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// SvgPolygon defines a closed shape consisting of a set of connected straight line segments. 5 | /// 6 | [SvgElement("polygon")] 7 | public partial class SvgPolygon : SvgMarkerElement 8 | { 9 | /// 10 | /// The points that make up the SvgPolygon 11 | /// 12 | [SvgAttribute("points")] 13 | public SvgPointCollection Points 14 | { 15 | get { return GetAttribute("points", false); } 16 | set { Attributes["points"] = value; IsPathDirty = true; } 17 | } 18 | 19 | public override SvgElement DeepCopy() 20 | { 21 | return DeepCopy(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Source/Basic Shapes/SvgPolyline.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// SvgPolyline defines a set of connected straight line segments. Typically, defines open shapes. 5 | /// 6 | [SvgElement("polyline")] 7 | public partial class SvgPolyline : SvgPolygon 8 | { 9 | public override SvgElement DeepCopy() 10 | { 11 | return DeepCopy(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/Basic Shapes/SvgVisibility.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | public enum SvgVisibility 4 | { 5 | Visible, 6 | Hidden, 7 | Inherit 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Source/Basic Shapes/SvgVisualElement.Style.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Svg 4 | { 5 | public abstract partial class SvgVisualElement 6 | { 7 | public virtual bool Visible 8 | { 9 | get { return string.Equals(Visibility.Trim(), "visible", StringComparison.OrdinalIgnoreCase); } 10 | } 11 | 12 | // Displayable - false if attribute display="none", true otherwise 13 | protected virtual bool Displayable 14 | { 15 | get { return !string.Equals(Display.Trim(), "none", StringComparison.OrdinalIgnoreCase); } 16 | } 17 | 18 | /// 19 | /// Gets or sets the fill of this element. 20 | /// 21 | [SvgAttribute("enable-background")] 22 | public virtual string EnableBackground 23 | { 24 | get { return GetAttribute("enable-background", false, "accumulate"); } 25 | set { Attributes["enable-background"] = value; } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Source/DataTypes/ISvgSupportsCoordinateUnits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Svg 4 | { 5 | [Obsolete("ISvgSupportsCoordinateUnits will be removed.")] 6 | internal interface ISvgSupportsCoordinateUnits 7 | { 8 | SvgCoordinateUnits GetUnits(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Source/DataTypes/ISvgViewPort.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Svg 7 | { 8 | /// 9 | /// Provides properties and methods to be implemented by view port elements. 10 | /// 11 | public interface ISvgViewPort 12 | { 13 | /// 14 | /// Gets or sets the viewport of the element. 15 | /// 16 | SvgViewBox ViewBox { get; set; } 17 | SvgAspectRatio AspectRatio { get; set; } 18 | SvgOverflow Overflow { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgCoordinateUnits.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg 4 | { 5 | /// 6 | /// Defines the various coordinate units certain SVG elements may use. 7 | /// 8 | [TypeConverter(typeof(SvgCoordinateUnitsConverter))] 9 | public enum SvgCoordinateUnits 10 | { 11 | /// 12 | /// Indicates that the coordinate system of the owner element is to be used. 13 | /// 14 | ObjectBoundingBox, 15 | 16 | /// 17 | /// Indicates that the coordinate system of the entire document is to be used. 18 | /// 19 | UserSpaceOnUse 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgElementStyle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Svg 7 | { 8 | public class SvgElementStyle 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Source/DataTypes/SvgFontStretch.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg 4 | { 5 | /// The desired amount of condensing or expansion in the glyphs used to render the text. 6 | [TypeConverter(typeof(SvgFontStretchConverter))] 7 | public enum SvgFontStretch 8 | { 9 | Normal, 10 | Wider, 11 | Narrower, 12 | UltraCondensed, 13 | ExtraCondensed, 14 | Condensed, 15 | SemiCondensed, 16 | SemiExpanded, 17 | Expanded, 18 | ExtraExpanded, 19 | UltraExpanded, 20 | Inherit 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgFontVariant.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg 4 | { 5 | [TypeConverter(typeof(SvgFontVariantConverter))] 6 | public enum SvgFontVariant 7 | { 8 | Normal, 9 | SmallCaps, 10 | Inherit 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgMarkerUnits.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.DataTypes 4 | { 5 | /// Defines the coordinate system for attributes ‘markerWidth’, ‘markerHeight’ and the contents of the ‘marker’. 6 | [TypeConverter(typeof(SvgMarkerUnitsConverter))] 7 | public enum SvgMarkerUnits 8 | { 9 | /// If markerUnits="strokeWidth", ‘markerWidth’, ‘markerHeight’ and the contents of the ‘marker’ represent values in a coordinate system which has a single unit equal the size in user units of the current stroke width (see the ‘stroke-width’ property) in place for the graphic object referencing the marker. 10 | StrokeWidth, 11 | 12 | /// If markerUnits="userSpaceOnUse", ‘markerWidth’, ‘markerHeight’ and the contents of the ‘marker’ represent values in the current user coordinate system in place for the graphic object referencing the marker (i.e., the user coordinate system for the element referencing the ‘marker’ element via a ‘marker’, ‘marker-start’, ‘marker-mid’ or ‘marker-end’ property). 13 | UserSpaceOnUse 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgOrient.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Source/DataTypes/SvgOrient.cs -------------------------------------------------------------------------------- /Source/DataTypes/SvgPoint.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | 4 | namespace Svg 5 | { 6 | public partial struct SvgPoint 7 | { 8 | public PointF ToDeviceValue(ISvgRenderer renderer, SvgElement owner) 9 | { 10 | return SvgUnit.GetDevicePoint(this.X, this.Y, renderer, owner); 11 | } 12 | } 13 | } 14 | #endif 15 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgTextDecoration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.ComponentModel; 6 | 7 | namespace Svg 8 | { 9 | /// This property describes decorations that are added to the text of an element. Conforming SVG Viewers are not required to support the blink value. 10 | [TypeConverter(typeof(SvgTextDecorationConverter))] 11 | [Flags] 12 | public enum SvgTextDecoration 13 | { 14 | /// The value is inherited from the parent element. 15 | Inherit = 0, 16 | 17 | /// The text is not decorated 18 | None = 1, 19 | 20 | /// The text is underlined. 21 | Underline = 2, 22 | 23 | /// The text is overlined. 24 | Overline = 4, 25 | 26 | /// The text is struck through. 27 | LineThrough = 8, 28 | 29 | /// The text will blink. 30 | Blink = 16 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgTextPathSpacing.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Svg 8 | { 9 | /// Indicates how the user agent should determine the spacing between glyphs that are to be rendered along a path. 10 | [TypeConverter(typeof(SvgTextPathSpacingConverter))] 11 | public enum SvgTextPathSpacing 12 | { 13 | /// Indicates that the glyphs should be rendered exactly according to the spacing rules as specified in Text on a path layout rules. 14 | Exact, 15 | 16 | /// Indicates that the user agent should use text-on-a-path layout algorithms to adjust the spacing between glyphs in order to achieve visually appealing results. 17 | Auto 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Source/DataTypes/SvgTextTransformation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.ComponentModel; 6 | 7 | namespace Svg 8 | { 9 | /// This property describes transformations that are added to the text of an element. 10 | [TypeConverter(typeof(SvgTextTransformationConverter))] 11 | [Flags] 12 | public enum SvgTextTransformation 13 | { 14 | /// The value is inherited from the parent element. 15 | Inherit = 0, 16 | 17 | /// The text is not transformed. 18 | None = 1, 19 | 20 | /// First letter of each word of the text is converted to uppercase. 21 | Capitalize = 2, 22 | 23 | /// The text is converted to uppercase. 24 | Uppercase = 4, 25 | 26 | /// The text is converted to lowercase. 27 | Lowercase = 8 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Source/DataTypes/XmlSpaceHandling.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Svg 8 | { 9 | [TypeConverter(typeof(XmlSpaceHandlingConverter))] 10 | public enum XmlSpaceHandling 11 | { 12 | Default, 13 | Inherit, 14 | Preserve 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Source/Document Structure/SvgDefinitionList.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg 3 | { 4 | public partial class SvgDefinitionList : SvgElement 5 | { 6 | /// 7 | /// Renders the and contents to the specified object. 8 | /// 9 | /// The object to render to. 10 | protected override void Render(ISvgRenderer renderer) 11 | { 12 | // Do nothing. Children should NOT be rendered. 13 | } 14 | } 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /Source/Document Structure/SvgDefinitionList.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// Represents a list of re-usable SVG components. 5 | /// 6 | [SvgElement("defs")] 7 | public partial class SvgDefinitionList : SvgElement 8 | { 9 | public override SvgElement DeepCopy() 10 | { 11 | return DeepCopy(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/Document Structure/SvgDescription.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg 4 | { 5 | [DefaultProperty("Text")] 6 | [SvgElement("desc")] 7 | public partial class SvgDescription : SvgElement, ISvgDescriptiveElement 8 | { 9 | public override string ToString() 10 | { 11 | return this.Content; 12 | } 13 | 14 | public override SvgElement DeepCopy() 15 | { 16 | return DeepCopy(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Source/Document Structure/SvgGroup.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// An element used to group SVG shapes. 5 | /// 6 | [SvgElement("g")] 7 | public partial class SvgGroup : SvgMarkerElement 8 | { 9 | protected override bool Renderable { get { return false; } } 10 | 11 | public override SvgElement DeepCopy() 12 | { 13 | return DeepCopy(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Source/Document Structure/SvgSwitch.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// The 'switch' element evaluates the 'requiredFeatures', 'requiredExtensions' and 'systemLanguage' attributes on its direct child elements in order, and then processes and renders the first child for which these attributes evaluate to true 5 | /// 6 | [SvgElement("switch")] 7 | public partial class SvgSwitch : SvgVisualElement 8 | { 9 | 10 | public override SvgElement DeepCopy() 11 | { 12 | return DeepCopy(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Source/Document Structure/SvgTitle.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | [SvgElement("title")] 4 | public partial class SvgTitle : SvgElement, ISvgDescriptiveElement 5 | { 6 | public override string ToString() 7 | { 8 | return this.Content; 9 | } 10 | 11 | public override SvgElement DeepCopy() 12 | { 13 | return DeepCopy(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Source/Exceptions/SvgGdiPlusCannotBeLoadedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | #if !NET8_0_OR_GREATER 3 | using System.Runtime.Serialization; 4 | #endif 5 | 6 | namespace Svg 7 | { 8 | [Serializable] 9 | public class SvgGdiPlusCannotBeLoadedException : Exception 10 | { 11 | const string gdiErrorMsg = "Cannot initialize gdi+ libraries. This is likely to be caused by running on a non-Windows OS without proper gdi+ replacement. Please refer to the documentation for more details."; 12 | 13 | public SvgGdiPlusCannotBeLoadedException() : base(gdiErrorMsg) { } 14 | public SvgGdiPlusCannotBeLoadedException(string message) : base(message) { } 15 | public SvgGdiPlusCannotBeLoadedException(Exception inner) : base(gdiErrorMsg, inner) {} 16 | public SvgGdiPlusCannotBeLoadedException(string message, Exception inner) : base(message, inner) { } 17 | 18 | #if !NET8_0_OR_GREATER 19 | protected SvgGdiPlusCannotBeLoadedException(SerializationInfo info, StreamingContext context) 20 | : base(info, context) { } 21 | #endif 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Source/Exceptions/SvgMemoryException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | #if !NET8_0_OR_GREATER 3 | using System.Runtime.Serialization; 4 | #endif 5 | 6 | namespace Svg.Exceptions 7 | { 8 | [Serializable] 9 | public class SvgMemoryException : Exception 10 | { 11 | public SvgMemoryException() { } 12 | public SvgMemoryException(string message) : base(message) { } 13 | public SvgMemoryException(string message, Exception inner) : base(message, inner) { } 14 | 15 | #if !NET8_0_OR_GREATER 16 | protected SvgMemoryException(SerializationInfo info, StreamingContext context) 17 | : base(info, context) { } 18 | #endif 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Source/Extensibility/SvgForeignObject.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// The 'foreignObject' element allows for inclusion of a foreign namespace which has its graphical content drawn by a different user agent 5 | /// 6 | [SvgElement("foreignObject")] 7 | public partial class SvgForeignObject : SvgVisualElement 8 | { 9 | protected override bool Renderable { get { return false; } } 10 | 11 | public override SvgElement DeepCopy() 12 | { 13 | return DeepCopy(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Source/ExtensionMethods/UriExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Svg.ExtensionMethods 4 | { 5 | public static class UriExtensions 6 | { 7 | public static Uri ReplaceWithNullIfNone(this Uri uri) 8 | { 9 | return string.Equals(uri?.ToString().Trim(), "none", StringComparison.OrdinalIgnoreCase) ? null : uri; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/ExternalType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Svg 4 | { 5 | [Flags] 6 | public enum ExternalType 7 | { 8 | None = 0x0, 9 | Local = 0x1, 10 | Remote = 0x2, 11 | } 12 | 13 | public static class ExternalTypeExtensions 14 | { 15 | public static bool AllowsResolving(this ExternalType externalType, Uri uri) 16 | { 17 | return uri.IsAbsoluteUri && 18 | (externalType.HasFlag(ExternalType.Local) && uri.IsFile || 19 | externalType.HasFlag(ExternalType.Remote) && !uri.IsFile); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Source/Filter Effects/ISvgFilterable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Svg.FilterEffects 6 | { 7 | public interface ISvgFilterable 8 | { 9 | SvgFilter Filter { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feBlend/SvgBlend.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgBlend : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feBlend filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feBlend/SvgBlend.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feBlend")] 4 | public partial class SvgBlend : SvgFilterPrimitive 5 | { 6 | [SvgAttribute("mode")] 7 | public SvgBlendMode Mode 8 | { 9 | get { return GetAttribute("mode", false, SvgBlendMode.Normal); } 10 | set { Attributes["mode"] = value; } 11 | } 12 | 13 | [SvgAttribute("in2")] 14 | public string Input2 15 | { 16 | get { return GetAttribute("in2", false); } 17 | set { Attributes["in2"] = value; } 18 | } 19 | 20 | public override SvgElement DeepCopy() 21 | { 22 | return DeepCopy(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Source/Filter Effects/feBlend/SvgBlendMode.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgBlendModeConverter))] 6 | public enum SvgBlendMode 7 | { 8 | Normal, 9 | Multiply, 10 | Screen, 11 | Overlay, 12 | Darken, 13 | Lighten, 14 | ColorDodge, 15 | ColorBurn, 16 | HardLight, 17 | SoftLight, 18 | Difference, 19 | Exclusion, 20 | Hue, 21 | Saturation, 22 | Color, 23 | Luminosity 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Source/Filter Effects/feColourMatrix/SvgColourMatrixType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Svg.FilterEffects 8 | { 9 | [TypeConverter(typeof(SvgColourMatrixTypeConverter))] 10 | public enum SvgColourMatrixType 11 | { 12 | Matrix, 13 | Saturate, 14 | HueRotate, 15 | LuminanceToAlpha 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Source/Filter Effects/feComponentTransfer/SvgComponentTransfer.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgComponentTransfer : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feComponentTransfer filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feComponentTransfer/SvgComponentTransfer.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feComponentTransfer")] 4 | public partial class SvgComponentTransfer : SvgFilterPrimitive 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feComponentTransfer/SvgComponentTransferType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgComponentTransferTypeConverter))] 6 | public enum SvgComponentTransferType 7 | { 8 | Identity, 9 | Table, 10 | Discrete, 11 | Linear, 12 | Gamma 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/Filter Effects/feComposite/SvgComposite.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgComposite : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feComposite filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feComposite/SvgCompositeOperator.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgCompositeOperatorConverter))] 6 | public enum SvgCompositeOperator 7 | { 8 | Over, 9 | In, 10 | Out, 11 | Atop, 12 | Xor, 13 | Arithmetic 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Source/Filter Effects/feConvolveMatrix/SvgConvolveMatrix.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgConvolveMatrix : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feConvolveMatrix filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feConvolveMatrix/SvgEdgeMode.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgEdgeModeConverter))] 6 | public enum SvgEdgeMode 7 | { 8 | Duplicate, 9 | Wrap, 10 | None 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/Filter Effects/feDiffuseLighting/SvgDiffuseLighting.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgDiffuseLighting : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feDiffuseLighting filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feDisplacementMap/SvgChannelSelector.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgChannelSelectorConverter))] 6 | public enum SvgChannelSelector 7 | { 8 | R, 9 | G, 10 | B, 11 | A 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feDisplacementMap/SvgDisplacementMap.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgDisplacementMap : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feDisplacementMap filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feDistantLight/SvgDistantLight.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feDistantLight")] 4 | public partial class SvgDistantLight : SvgElement 5 | { 6 | [SvgAttribute("azimuth")] 7 | public float Azimuth 8 | { 9 | get { return GetAttribute("azimuth", false, 0f); } 10 | set { Attributes["azimuth"] = value; } 11 | } 12 | 13 | [SvgAttribute("elevation")] 14 | public float Elevation 15 | { 16 | get { return GetAttribute("elevation", false, 0f); } 17 | set { Attributes["elevation"] = value; } 18 | } 19 | 20 | public override SvgElement DeepCopy() 21 | { 22 | return DeepCopy(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Source/Filter Effects/feFlood/SvgFlood.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgFlood : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feFlood filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feFlood/SvgFlood.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feFlood")] 4 | public partial class SvgFlood : SvgFilterPrimitive 5 | { 6 | [SvgAttribute("flood-color")] 7 | public virtual SvgPaintServer FloodColor 8 | { 9 | get { return GetAttribute("flood-color", true, SvgPaintServer.NotSet); } 10 | set { Attributes["flood-color"] = value; } 11 | } 12 | 13 | [SvgAttribute("flood-opacity")] 14 | public virtual float FloodOpacity 15 | { 16 | get { return GetAttribute("flood-opacity", true, 1f); } 17 | set { Attributes["flood-opacity"] = FixOpacityValue(value); } 18 | } 19 | 20 | public override SvgElement DeepCopy() 21 | { 22 | return DeepCopy(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Source/Filter Effects/feFuncA/SvgFuncA.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feFuncA")] 4 | public partial class SvgFuncA : SvgComponentTransferFunction 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feFuncB/SvgFuncB.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feFuncB")] 4 | public partial class SvgFuncB : SvgComponentTransferFunction 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feFuncG/SvgFuncG.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feFuncG")] 4 | public partial class SvgFuncG : SvgComponentTransferFunction 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feFuncR/SvgFuncR.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feFuncR")] 4 | public partial class SvgFuncR : SvgComponentTransferFunction 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feGaussianBlur/SvgGaussianBlur.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | public enum BlurType 4 | { 5 | Both, 6 | HorizontalOnly, 7 | VerticalOnly, 8 | } 9 | 10 | [SvgElement("feGaussianBlur")] 11 | public partial class SvgGaussianBlur : SvgFilterPrimitive 12 | { 13 | /// 14 | /// Gets or sets the radius of the blur (only allows for one value - not the two specified in the SVG Spec) 15 | /// 16 | [SvgAttribute("stdDeviation")] 17 | public SvgNumberCollection StdDeviation 18 | { 19 | get { return GetAttribute("stdDeviation", false, new SvgNumberCollection() { 0f }); } 20 | set { Attributes["stdDeviation"] = value; } 21 | } 22 | 23 | public override SvgElement DeepCopy() 24 | { 25 | return DeepCopy(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Source/Filter Effects/feImage/SvgImage.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgImage : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feImage filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feImage/SvgImage.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feImage")] 4 | public partial class SvgImage : SvgFilterPrimitive 5 | { 6 | [SvgAttribute("href", SvgAttributeAttribute.XLinkNamespace)] 7 | public virtual string Href 8 | { 9 | get { return GetAttribute("href", false); } 10 | set { Attributes["href"] = value; } 11 | } 12 | 13 | [SvgAttribute("preserveAspectRatio")] 14 | public SvgAspectRatio AspectRatio 15 | { 16 | get { return GetAttribute("preserveAspectRatio", false, new SvgAspectRatio(SvgPreserveAspectRatio.xMidYMid)); } 17 | set { Attributes["preserveAspectRatio"] = value; } 18 | } 19 | 20 | public override SvgElement DeepCopy() 21 | { 22 | return DeepCopy(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Source/Filter Effects/feMerge/SvgMerge.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | using System.Linq; 4 | 5 | namespace Svg.FilterEffects 6 | { 7 | public partial class SvgMerge : SvgFilterPrimitive 8 | { 9 | public override void Process(ImageBuffer buffer) 10 | { 11 | var children = this.Children.OfType().ToList(); 12 | var inputImage = buffer[children.First().Input]; 13 | var result = new Bitmap(inputImage.Width, inputImage.Height); 14 | using (var g = Graphics.FromImage(result)) 15 | { 16 | foreach (var child in children) 17 | { 18 | g.DrawImage(buffer[child.Input], new Rectangle(0, 0, inputImage.Width, inputImage.Height), 19 | 0, 0, inputImage.Width, inputImage.Height, GraphicsUnit.Pixel); 20 | } 21 | g.Flush(); 22 | } 23 | buffer[this.Result] = result; 24 | } 25 | } 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /Source/Filter Effects/feMerge/SvgMerge.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feMerge")] 4 | public partial class SvgMerge : SvgFilterPrimitive 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feMerge/SvgMergeNode.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feMergeNode")] 4 | public partial class SvgMergeNode : SvgElement 5 | { 6 | [SvgAttribute("in")] 7 | public string Input 8 | { 9 | get { return GetAttribute("in", false); } 10 | set { Attributes["in"] = value; } 11 | } 12 | 13 | public override SvgElement DeepCopy() 14 | { 15 | return DeepCopy(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Source/Filter Effects/feMorphology/SvgMorphology.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgMorphology : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feMorphology filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feMorphology/SvgMorphology.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feMorphology")] 4 | public partial class SvgMorphology : SvgFilterPrimitive 5 | { 6 | [SvgAttribute("operator")] 7 | public SvgMorphologyOperator Operator 8 | { 9 | get { return GetAttribute("operator", false, SvgMorphologyOperator.Erode); } 10 | set { Attributes["operator"] = value; } 11 | } 12 | 13 | [SvgAttribute("radius")] 14 | public SvgNumberCollection Radius 15 | { 16 | get { return GetAttribute("radius", false, new SvgNumberCollection() { 0f, 0f }); } 17 | set { Attributes["radius"] = value; } 18 | } 19 | 20 | public override SvgElement DeepCopy() 21 | { 22 | return DeepCopy(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Source/Filter Effects/feMorphology/SvgMorphologyOperator.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgMorphologyOperatorConverter))] 6 | public enum SvgMorphologyOperator 7 | { 8 | Erode, 9 | Dilate 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feOffset/SvgOffset.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | 4 | namespace Svg.FilterEffects 5 | { 6 | public partial class SvgOffset : SvgFilterPrimitive 7 | { 8 | public override void Process(ImageBuffer buffer) 9 | { 10 | var inputImage = buffer[this.Input]; 11 | var result = new Bitmap(inputImage.Width, inputImage.Height); 12 | 13 | var pts = new PointF[] { new PointF(this.Dx.ToDeviceValue(null, UnitRenderingType.Horizontal, null), 14 | this.Dy.ToDeviceValue(null, UnitRenderingType.Vertical, null)) }; 15 | using (var transform = buffer.Transform) 16 | transform.TransformVectors(pts); 17 | 18 | using (var g = Graphics.FromImage(result)) 19 | { 20 | g.DrawImage(inputImage, new Rectangle((int)pts[0].X, (int)pts[0].Y, 21 | inputImage.Width, inputImage.Height), 22 | 0, 0, inputImage.Width, inputImage.Height, GraphicsUnit.Pixel); 23 | g.Flush(); 24 | } 25 | buffer[this.Result] = result; 26 | } 27 | } 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /Source/Filter Effects/fePointLight/SvgPointLight.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("fePointLight")] 4 | public partial class SvgPointLight : SvgElement 5 | { 6 | [SvgAttribute("x")] 7 | public float X 8 | { 9 | get { return GetAttribute("x", false, 0f); } 10 | set { Attributes["x"] = value; } 11 | } 12 | 13 | [SvgAttribute("y")] 14 | public float Y 15 | { 16 | get { return GetAttribute("y", false, 0f); } 17 | set { Attributes["y"] = value; } 18 | } 19 | 20 | [SvgAttribute("z")] 21 | public float Z 22 | { 23 | get { return GetAttribute("z", false, 0f); } 24 | set { Attributes["z"] = value; } 25 | } 26 | 27 | public override SvgElement DeepCopy() 28 | { 29 | return DeepCopy(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/Filter Effects/feSpecularLighting/SvgSpecularLighting.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgSpecularLighting : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feSpecularLighting filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feTile/SvgTile.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgTile : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feTile filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feTile/SvgTile.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.FilterEffects 2 | { 3 | [SvgElement("feTile")] 4 | public partial class SvgTile : SvgFilterPrimitive 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feTurbulence/SvgStitchType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgStitchTypeConverter))] 6 | public enum SvgStitchType 7 | { 8 | Stitch, 9 | NoStitch 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Filter Effects/feTurbulence/SvgTurbulence.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg.FilterEffects 3 | { 4 | public partial class SvgTurbulence : SvgFilterPrimitive 5 | { 6 | public override void Process(ImageBuffer buffer) 7 | { 8 | // TODO: Implement feTurbulence filter Process(). 9 | buffer[Result] = buffer[Input]; 10 | } 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/Filter Effects/feTurbulence/SvgTurbulenceType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Svg.FilterEffects 4 | { 5 | [TypeConverter(typeof(SvgTurbulenceTypeConverter))] 6 | public enum SvgTurbulenceType 7 | { 8 | FractalNoise, 9 | Turbulence 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Generated/Readme.md: -------------------------------------------------------------------------------- 1 | ### Geneated 2 | A directory of the generated source codes. 3 | - The generated files are excluded from the repository. 4 | - These files will not be directly included in the project. 5 | - To view the generated files, turn "Show All Files" on in the VS. -------------------------------------------------------------------------------- /Source/Metadata/SvgDocumentMetadata.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg 3 | { 4 | public partial class SvgDocumentMetadata : SvgElement 5 | { 6 | /// 7 | /// Renders the and contents to the specified object. 8 | /// 9 | /// The object to render to. 10 | protected override void Render(ISvgRenderer renderer) 11 | { 12 | // Do nothing. Children should NOT be rendered. 13 | } 14 | } 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /Source/Metadata/SvgDocumentMetadata.cs: -------------------------------------------------------------------------------- 1 | using System.Xml; 2 | 3 | namespace Svg 4 | { 5 | /// 6 | /// Represents a list of re-usable SVG components. 7 | /// 8 | [SvgElement("metadata")] 9 | public partial class SvgDocumentMetadata : SvgElement 10 | { 11 | /// 12 | /// Initializes a new instance of the class. 13 | /// 14 | public SvgDocumentMetadata() 15 | { 16 | Content = string.Empty; 17 | } 18 | 19 | protected override void WriteChildren(XmlWriter writer) 20 | { 21 | writer.WriteRaw(this.Content); // write out metadata as is 22 | } 23 | 24 | public override SvgElement DeepCopy() 25 | { 26 | return DeepCopy(); 27 | } 28 | 29 | public override void InitialiseFromXML(XmlReader reader, SvgDocument document) 30 | { 31 | base.InitialiseFromXML(reader, document); 32 | 33 | // read in the metadata just as a string ready to be written straight back out again 34 | Content = reader.ReadInnerXml(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Source/NonSvgElement.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | public partial class NonSvgElement : SvgElement 4 | { 5 | public NonSvgElement() 6 | { 7 | } 8 | 9 | public NonSvgElement(string elementName, string elementNamespace) 10 | { 11 | ElementName = elementName; 12 | ElementNamespace = elementNamespace; 13 | } 14 | 15 | public override SvgElement DeepCopy() 16 | { 17 | return DeepCopy(); 18 | } 19 | 20 | /// 21 | /// Publish the element name to be able to differentiate non-svg elements. 22 | /// 23 | public string Name 24 | { 25 | get { return ElementName; } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Source/Painting/GenericBoundable.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | 3 | namespace Svg 4 | { 5 | internal class GenericBoundable : ISvgBoundable 6 | { 7 | private RectangleF _rect; 8 | 9 | public GenericBoundable(RectangleF rect) 10 | { 11 | _rect = rect; 12 | } 13 | public GenericBoundable(float x, float y, float width, float height) 14 | { 15 | _rect = new RectangleF(x, y, width, height); 16 | } 17 | 18 | public PointF Location 19 | { 20 | get { return _rect.Location; } 21 | } 22 | 23 | public SizeF Size 24 | { 25 | get { return _rect.Size; } 26 | } 27 | 28 | public RectangleF Bounds 29 | { 30 | get { return _rect; } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Source/Painting/ISvgBoundable.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | 3 | namespace Svg 4 | { 5 | public interface ISvgBoundable 6 | { 7 | #if !NO_SDC 8 | PointF Location 9 | { 10 | get; 11 | } 12 | 13 | SizeF Size 14 | { 15 | get; 16 | } 17 | 18 | RectangleF Bounds 19 | { 20 | get; 21 | } 22 | #endif 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Source/Painting/ISvgStylable.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | #endif 4 | 5 | namespace Svg 6 | { 7 | /// 8 | /// Defines the methods and properties required for an SVG element to be styled. 9 | /// 10 | public interface ISvgStylable 11 | { 12 | SvgPaintServer Fill { get; set; } 13 | SvgPaintServer Stroke { get; set; } 14 | SvgFillRule FillRule { get; set; } 15 | float Opacity { get; set; } 16 | float FillOpacity { get; set; } 17 | float StrokeOpacity { get; set; } 18 | SvgUnit StrokeWidth { get; set; } 19 | SvgStrokeLineCap StrokeLineCap { get; set; } 20 | SvgStrokeLineJoin StrokeLineJoin { get; set; } 21 | float StrokeMiterLimit { get; set; } 22 | SvgUnitCollection StrokeDashArray { get; set; } 23 | SvgUnit StrokeDashOffset { get; set; } 24 | #if !NO_SDC 25 | GraphicsPath Path(ISvgRenderer renderer); 26 | #endif 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Source/Painting/SvgColourServer.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System; 3 | using System.Drawing; 4 | 5 | namespace Svg 6 | { 7 | public partial class SvgColourServer : SvgPaintServer 8 | { 9 | public override Brush GetBrush(SvgVisualElement styleOwner, ISvgRenderer renderer, float opacity, bool forStroke = false) 10 | { 11 | // is none? 12 | if (this == None) return new SolidBrush(System.Drawing.Color.Transparent); 13 | 14 | // default fill color is black, default stroke color is none 15 | if (this == NotSet && forStroke) return new SolidBrush(System.Drawing.Color.Transparent); 16 | 17 | int alpha = (int)Math.Round((opacity * (this.Colour.A / 255.0)) * 255); 18 | Color colour = System.Drawing.Color.FromArgb(alpha, this.Colour); 19 | 20 | return new SolidBrush(colour); 21 | } 22 | } 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/Painting/SvgDeferredPaintServer.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | 4 | namespace Svg 5 | { 6 | public partial class SvgDeferredPaintServer : SvgPaintServer 7 | { 8 | public override Brush GetBrush(SvgVisualElement styleOwner, ISvgRenderer renderer, float opacity, bool forStroke = false) 9 | { 10 | EnsureServer(styleOwner); 11 | return _concreteServer?.GetBrush(styleOwner, renderer, opacity, forStroke) ?? _fallbackServer?.GetBrush(styleOwner, renderer, opacity, forStroke) ?? NotSet?.GetBrush(styleOwner, renderer, opacity, forStroke); 12 | } 13 | } 14 | } 15 | #endif 16 | -------------------------------------------------------------------------------- /Source/Painting/SvgDeferredPaintServerFactory.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Globalization; 3 | 4 | namespace Svg 5 | { 6 | /// 7 | /// Factory class for <IRI>. 8 | /// 9 | internal class SvgDeferredPaintServerFactory : SvgPaintServerFactory 10 | { 11 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) 12 | { 13 | if (value is string) 14 | { 15 | var s = ((string)value).Trim(); 16 | if (!string.IsNullOrEmpty(s)) 17 | return new SvgDeferredPaintServer(s); 18 | } 19 | return base.ConvertFrom(context, culture, value); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Source/Painting/SvgFallbackPaintServer.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Linq; 3 | using System.Drawing; 4 | 5 | namespace Svg 6 | { 7 | public partial class SvgFallbackPaintServer : SvgPaintServer 8 | { 9 | public override Brush GetBrush(SvgVisualElement styleOwner, ISvgRenderer renderer, float opacity, bool forStroke = false) 10 | { 11 | try 12 | { 13 | _primary.GetCallback = () => _fallbacks.FirstOrDefault(); 14 | return _primary.GetBrush(styleOwner, renderer, opacity, forStroke); 15 | } 16 | finally 17 | { 18 | _primary.GetCallback = null; 19 | } 20 | } 21 | } 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /Source/Painting/SvgFillRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.ComponentModel; 5 | 6 | namespace Svg 7 | { 8 | [TypeConverter(typeof(SvgFillRuleConverter))] 9 | public enum SvgFillRule 10 | { 11 | NonZero, 12 | EvenOdd, 13 | Inherit 14 | } 15 | } -------------------------------------------------------------------------------- /Source/Painting/SvgPaintServer.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | 4 | namespace Svg 5 | { 6 | public abstract partial class SvgPaintServer : SvgElement 7 | { 8 | /// 9 | /// Renders the and contents to the specified object. 10 | /// 11 | /// The object to render to. 12 | protected override void Render(ISvgRenderer renderer) 13 | { 14 | // Never render paint servers or their children 15 | } 16 | 17 | /// 18 | /// Gets a representing the current paint server. 19 | /// 20 | /// The owner . 21 | /// The renderer object. 22 | /// The opacity of the brush. 23 | /// Not used. 24 | public abstract Brush GetBrush(SvgVisualElement styleOwner, ISvgRenderer renderer, float opacity, bool forStroke = false); 25 | } 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /Source/Painting/SvgStrokeLineCap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.ComponentModel; 5 | 6 | namespace Svg 7 | { 8 | /// Specifies the shape to be used at the end of open subpaths when they are stroked. 9 | [TypeConverter(typeof(SvgStrokeLineCapConverter))] 10 | public enum SvgStrokeLineCap 11 | { 12 | /// The value is inherited from the parent element. 13 | Inherit, 14 | 15 | /// The ends of the subpaths are square but do not extend past the end of the subpath. 16 | Butt, 17 | 18 | /// The ends of the subpaths are rounded. 19 | Round, 20 | 21 | /// The ends of the subpaths are square. 22 | Square 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Source/Paths/SvgClosePathSegment.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.Pathing 2 | { 3 | public sealed partial class SvgClosePathSegment : SvgPathSegment 4 | { 5 | public SvgClosePathSegment(bool isRelative) 6 | : base(isRelative) 7 | { 8 | } 9 | 10 | public override string ToString() 11 | { 12 | return IsRelative ? "z" : "Z"; 13 | } 14 | 15 | [System.Obsolete("Use new constructor.")] 16 | public SvgClosePathSegment() 17 | : this(true) 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Source/Paths/SvgLineSegment.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | using System.Drawing.Drawing2D; 4 | 5 | namespace Svg.Pathing 6 | { 7 | public sealed partial class SvgLineSegment : SvgPathSegment 8 | { 9 | public override PointF AddToPath(GraphicsPath graphicsPath, PointF start, SvgPathSegmentList parent) 10 | { 11 | var end = ToAbsolute(End, IsRelative, start); 12 | graphicsPath.AddLine(start, end); 13 | return end; 14 | } 15 | 16 | [System.Obsolete("Use new AddToPath.")] 17 | public override void AddToPath(GraphicsPath graphicsPath) 18 | { 19 | AddToPath(graphicsPath, Start, null); 20 | } 21 | 22 | } 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/Paths/SvgLineSegment.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | 3 | namespace Svg.Pathing 4 | { 5 | public sealed partial class SvgLineSegment : SvgPathSegment 6 | { 7 | public SvgLineSegment(bool isRelative, PointF end) 8 | : base(isRelative, end) 9 | { 10 | } 11 | 12 | public override string ToString() 13 | { 14 | if (float.IsNaN(End.Y)) 15 | return (IsRelative ? "h" : "H") + End.X.ToSvgString(); 16 | else if (float.IsNaN(End.X)) 17 | return (IsRelative ? "v" : "V") + End.Y.ToSvgString(); 18 | else 19 | return (IsRelative ? "l" : "L") + End.ToSvgString(); 20 | } 21 | 22 | [System.Obsolete("Use new constructor.")] 23 | public SvgLineSegment(PointF start, PointF end) 24 | : this(false, end) 25 | { 26 | Start = start; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Source/Paths/SvgMoveToSegment.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | using System.Drawing.Drawing2D; 4 | 5 | namespace Svg.Pathing 6 | { 7 | public sealed partial class SvgMoveToSegment : SvgPathSegment 8 | { 9 | public override PointF AddToPath(GraphicsPath graphicsPath, PointF start, SvgPathSegmentList parent) 10 | { 11 | graphicsPath.StartFigure(); 12 | return ToAbsolute(End, IsRelative, start); 13 | } 14 | 15 | [System.Obsolete("Use new AddToPath.")] 16 | public override void AddToPath(GraphicsPath graphicsPath) 17 | { 18 | AddToPath(graphicsPath, Start, null); 19 | } 20 | } 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/Paths/SvgMoveToSegment.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | 3 | namespace Svg.Pathing 4 | { 5 | public sealed partial class SvgMoveToSegment : SvgPathSegment 6 | { 7 | public SvgMoveToSegment(bool isRelative, PointF moveTo) 8 | : base(isRelative, moveTo) 9 | { 10 | } 11 | 12 | public override string ToString() 13 | { 14 | return (IsRelative ? "m" : "M") + End.ToSvgString(); 15 | } 16 | 17 | [System.Obsolete("Use new constructor.")] 18 | public SvgMoveToSegment(PointF moveTo) 19 | : this(false, moveTo) 20 | { 21 | Start = moveTo; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Source/Paths/SvgPathSegment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | 4 | namespace Svg.Pathing 5 | { 6 | public abstract partial class SvgPathSegment 7 | { 8 | protected static readonly PointF NaN = new PointF(float.NaN, float.NaN); 9 | 10 | public bool IsRelative { get; set; } 11 | 12 | public PointF End { get; set; } 13 | 14 | protected SvgPathSegment(bool isRelative) 15 | { 16 | IsRelative = isRelative; 17 | } 18 | 19 | protected SvgPathSegment(bool isRelative, PointF end) 20 | : this(isRelative) 21 | { 22 | End = end; 23 | } 24 | 25 | public SvgPathSegment Clone() 26 | { 27 | return MemberwiseClone() as SvgPathSegment; 28 | } 29 | 30 | [Obsolete("Will be removed.")] 31 | public PointF Start { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Source/Rendering/IGraphicsProvider.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | 4 | namespace Svg 5 | { 6 | public interface IGraphicsProvider 7 | { 8 | Graphics GetGraphics(); 9 | } 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /Source/SvgContentNode.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | public class SvgContentNode : ISvgNode 4 | { 5 | public string Content { get; set; } 6 | 7 | /// 8 | /// Create a deep copy of this . 9 | /// 10 | /// A deep copy of this 11 | public ISvgNode DeepCopy() 12 | { 13 | // Since strings are immutable in C#, we can just use the same reference here. 14 | return new SvgContentNode { Content = this.Content }; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Source/SvgDocument.Win32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace Svg 5 | { 6 | public partial class SvgDocument 7 | { 8 | [DllImport("gdi32.dll")] 9 | private static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 10 | 11 | [DllImport("user32.dll")] 12 | private static extern IntPtr GetDC(IntPtr hWnd); 13 | 14 | [DllImport("user32.dll")] 15 | private static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 16 | 17 | private static int GetWin32SystemDpi() 18 | { 19 | // NOTE: starting with Windows 8.1, the DPI is no longer system-wide but screen-specific 20 | IntPtr hDC = GetDC(IntPtr.Zero); 21 | const int LOGPIXELSY = 90; 22 | int result = GetDeviceCaps(hDC, LOGPIXELSY); 23 | ReleaseDC(IntPtr.Zero, hDC); 24 | return result; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Source/SvgElementAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Svg 7 | { 8 | /// 9 | /// Specifies the SVG name of an . 10 | /// 11 | [AttributeUsage(AttributeTargets.Class)] 12 | public sealed class SvgElementAttribute : Attribute 13 | { 14 | /// 15 | /// Gets the name of the SVG element. 16 | /// 17 | public string ElementName { get; private set; } 18 | 19 | /// 20 | /// Initializes a new instance of the class with the specified element name; 21 | /// 22 | /// The name of the SVG element. 23 | public SvgElementAttribute(string elementName) 24 | { 25 | this.ElementName = elementName; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/SvgNamespaces.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | public static class SvgNamespaces 4 | { 5 | public const string SvgNamespace = "http://www.w3.org/2000/svg"; 6 | 7 | public const string XLinkPrefix = "xlink"; 8 | public const string XLinkNamespace = "http://www.w3.org/1999/xlink"; 9 | 10 | public const string XmlPrefix = "xml"; 11 | public const string XmlNamespace = "http://www.w3.org/XML/1998/namespace"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Source/SvgUnknownElement.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | public partial class SvgUnknownElement : SvgElement 4 | { 5 | public SvgUnknownElement() 6 | { 7 | } 8 | 9 | public SvgUnknownElement(string elementName) 10 | { 11 | ElementName = elementName; 12 | } 13 | 14 | public override SvgElement DeepCopy() 15 | { 16 | return DeepCopy(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Source/Text/IFontDefn.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Drawing; 7 | using System.Drawing.Drawing2D; 8 | 9 | namespace Svg 10 | { 11 | public interface IFontDefn : IDisposable 12 | { 13 | float Size { get; } 14 | float SizeInPoints { get; } 15 | void AddStringToPath(ISvgRenderer renderer, GraphicsPath path, string text, PointF location); 16 | float Ascent(ISvgRenderer renderer); 17 | IList MeasureCharacters(ISvgRenderer renderer, string text); 18 | SizeF MeasureString(ISvgRenderer renderer, string text); 19 | 20 | } 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/Text/SvgFont.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | namespace Svg 3 | { 4 | public partial class SvgFont : SvgElement 5 | { 6 | protected override void Render(ISvgRenderer renderer) 7 | { 8 | } 9 | } 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /Source/Text/SvgFontFaceSrc.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | [SvgElement("font-face-src")] 4 | public partial class SvgFontFaceSrc : SvgElement 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return base.DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Text/SvgFontFaceUri.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Svg 4 | { 5 | [SvgElement("font-face-uri")] 6 | public partial class SvgFontFaceUri : SvgElement 7 | { 8 | [SvgAttribute("href", SvgAttributeAttribute.XLinkNamespace)] 9 | public virtual Uri ReferencedElement 10 | { 11 | get { return GetAttribute("href", false); } 12 | set { Attributes["href"] = value; } 13 | } 14 | 15 | public override SvgElement DeepCopy() 16 | { 17 | return DeepCopy(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Source/Text/SvgGlyph.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing; 3 | using System.Drawing.Drawing2D; 4 | using Svg.Pathing; 5 | 6 | namespace Svg 7 | { 8 | public partial class SvgGlyph : SvgPathBasedElement 9 | { 10 | private GraphicsPath _path; 11 | 12 | /// 13 | /// Gets the for this element. 14 | /// 15 | public override GraphicsPath Path(ISvgRenderer renderer) 16 | { 17 | if (_path == null || IsPathDirty) 18 | { 19 | _path = new GraphicsPath(); 20 | 21 | if (PathData != null) 22 | { 23 | var start = PointF.Empty; 24 | foreach (var segment in PathData) 25 | start = segment.AddToPath(_path, start, PathData); 26 | } 27 | 28 | IsPathDirty = false; 29 | } 30 | return _path; 31 | } 32 | } 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /Source/Text/SvgMissingGlyph.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | [SvgElement("missing-glyph")] 4 | public partial class SvgMissingGlyph : SvgGlyph 5 | { 6 | [SvgAttribute("glyph-name")] 7 | public override string GlyphName 8 | { 9 | get { return GetAttribute("glyph-name", true, "__MISSING_GLYPH__"); } 10 | set { Attributes["glyph-name"] = value; } 11 | } 12 | 13 | public override SvgElement DeepCopy() 14 | { 15 | return DeepCopy(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Source/Text/SvgText.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | /// 4 | /// The element defines a graphics element consisting of text. 5 | /// 6 | [SvgElement("text")] 7 | public partial class SvgText : SvgTextBase 8 | { 9 | /// 10 | /// Initializes the class. 11 | /// 12 | public SvgText() 13 | { 14 | } 15 | 16 | /// 17 | /// Initializes a new instance of the class. 18 | /// 19 | /// The text. 20 | public SvgText(string text) 21 | { 22 | Text = text; 23 | } 24 | 25 | public override SvgElement DeepCopy() 26 | { 27 | return DeepCopy(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/Text/SvgTextAnchor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.ComponentModel; 6 | 7 | namespace Svg 8 | { 9 | /// 10 | /// Text anchor is used to align (start-, middle- or end-alignment) a string of text relative to a given point. 11 | /// 12 | [TypeConverter(typeof(SvgTextAnchorConverter))] 13 | public enum SvgTextAnchor 14 | { 15 | /// The value is inherited from the parent element. 16 | Inherit, 17 | /// 18 | /// The rendered characters are aligned such that the start of the text string is at the initial current text position. 19 | /// 20 | Start, 21 | /// 22 | /// The rendered characters are aligned such that the middle of the text string is at the current text position. 23 | /// 24 | Middle, 25 | /// 26 | /// The rendered characters are aligned such that the end of the text string is at the initial current text position. 27 | /// 28 | End 29 | } 30 | } -------------------------------------------------------------------------------- /Source/Text/SvgTextPath.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | 4 | namespace Svg 5 | { 6 | public partial class SvgTextPath : SvgTextBase 7 | { 8 | protected override GraphicsPath GetBaselinePath(ISvgRenderer renderer) 9 | { 10 | var path = this.OwnerDocument.IdManager.GetElementById(this.ReferencedPath) as SvgVisualElement; 11 | if (path == null) return null; 12 | var pathData = (GraphicsPath)path.Path(renderer).Clone(); 13 | if (path.Transforms != null && path.Transforms.Count > 0) 14 | using (var matrix = path.Transforms.GetMatrix()) 15 | pathData.Transform(matrix); 16 | return pathData; 17 | } 18 | 19 | protected override float GetAuthorPathLength() 20 | { 21 | var path = this.OwnerDocument.IdManager.GetElementById(this.ReferencedPath) as SvgPath; 22 | if (path == null) return 0; 23 | return path.PathLength; 24 | } 25 | } 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /Source/Text/SvgTextRef.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Svg 6 | { 7 | public partial class SvgTextRef : SvgTextBase 8 | { 9 | internal override IEnumerable GetContentNodes() 10 | { 11 | var refText = this.OwnerDocument.IdManager.GetElementById(this.ReferencedElement) as SvgTextBase; 12 | IEnumerable contentNodes = null; 13 | 14 | if (refText == null) 15 | { 16 | contentNodes = base.GetContentNodes(); 17 | } 18 | else 19 | { 20 | contentNodes = refText.GetContentNodes(); 21 | } 22 | 23 | contentNodes = contentNodes.Where(o => !(o is ISvgDescriptiveElement)); 24 | 25 | return contentNodes; 26 | } 27 | } 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /Source/Text/SvgTextRef.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Svg 4 | { 5 | [SvgElement("tref")] 6 | public partial class SvgTextRef : SvgTextBase 7 | { 8 | [SvgAttribute("href", SvgAttributeAttribute.XLinkNamespace)] 9 | public virtual Uri ReferencedElement 10 | { 11 | get { return GetAttribute("href", false); } 12 | set { Attributes["href"] = value; } 13 | } 14 | 15 | public override SvgElement DeepCopy() 16 | { 17 | return DeepCopy(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Source/Text/SvgTextSpan.cs: -------------------------------------------------------------------------------- 1 | namespace Svg 2 | { 3 | [SvgElement("tspan")] 4 | public partial class SvgTextSpan : SvgTextBase 5 | { 6 | public override SvgElement DeepCopy() 7 | { 8 | return DeepCopy(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/Transforms/ISvgTransformable.cs: -------------------------------------------------------------------------------- 1 | using Svg.Transforms; 2 | 3 | namespace Svg 4 | { 5 | /// 6 | /// Represents and element that may be transformed. 7 | /// 8 | public interface ISvgTransformable 9 | { 10 | /// 11 | /// Gets or sets an of element transforms. 12 | /// 13 | SvgTransformCollection Transforms { get; set; } 14 | #if !NO_SDC 15 | /// 16 | /// Applies the required transforms to . 17 | /// 18 | /// The to be transformed. 19 | void PushTransforms(ISvgRenderer renderer); 20 | /// 21 | /// Removes any previously applied transforms from the specified . 22 | /// 23 | /// The that should have transforms removed. 24 | void PopTransforms(ISvgRenderer renderer); 25 | #endif 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Source/Transforms/SvgMatrix.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | 4 | namespace Svg.Transforms 5 | { 6 | public sealed partial class SvgMatrix : SvgTransform 7 | { 8 | public override Matrix Matrix 9 | { 10 | get 11 | { 12 | return new Matrix( 13 | Points[0], 14 | Points[1], 15 | Points[2], 16 | Points[3], 17 | Points[4], 18 | Points[5] 19 | ); 20 | } 21 | } 22 | } 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/Transforms/SvgMatrix.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Svg.Transforms 4 | { 5 | /// 6 | /// The class which applies custom transform to this Matrix (Required for projects created by the Inkscape). 7 | /// 8 | public sealed partial class SvgMatrix : SvgTransform 9 | { 10 | public List Points { get; set; } 11 | 12 | public override string WriteToString() 13 | { 14 | return $"matrix({Points[0].ToSvgString()}, {Points[1].ToSvgString()}, {Points[2].ToSvgString()}, {Points[3].ToSvgString()}, {Points[4].ToSvgString()}, {Points[5].ToSvgString()})"; 15 | } 16 | 17 | public SvgMatrix(List m) 18 | { 19 | Points = m; 20 | } 21 | 22 | public override object Clone() 23 | { 24 | return new SvgMatrix(Points); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Source/Transforms/SvgRotate.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | 4 | namespace Svg.Transforms 5 | { 6 | public sealed partial class SvgRotate : SvgTransform 7 | { 8 | public override Matrix Matrix 9 | { 10 | get 11 | { 12 | var matrix = new Matrix(); 13 | matrix.Translate(CenterX, CenterY); 14 | matrix.Rotate(Angle); 15 | matrix.Translate(-CenterX, -CenterY); 16 | return matrix; 17 | } 18 | } 19 | } 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /Source/Transforms/SvgRotate.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.Transforms 2 | { 3 | public sealed partial class SvgRotate : SvgTransform 4 | { 5 | public float Angle { get; set; } 6 | 7 | public float CenterX { get; set; } 8 | 9 | public float CenterY { get; set; } 10 | 11 | public override string WriteToString() 12 | { 13 | return $"rotate({Angle.ToSvgString()}, {CenterX.ToSvgString()}, {CenterY.ToSvgString()})"; 14 | } 15 | 16 | public SvgRotate(float angle) 17 | { 18 | Angle = angle; 19 | } 20 | 21 | public SvgRotate(float angle, float centerX, float centerY) 22 | : this(angle) 23 | { 24 | CenterX = centerX; 25 | CenterY = centerY; 26 | } 27 | 28 | public override object Clone() 29 | { 30 | return new SvgRotate(Angle, CenterX, CenterY); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Source/Transforms/SvgScale.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | 4 | namespace Svg.Transforms 5 | { 6 | public sealed partial class SvgScale : SvgTransform 7 | { 8 | public override Matrix Matrix 9 | { 10 | get 11 | { 12 | var matrix = new Matrix(); 13 | matrix.Scale(X, Y); 14 | return matrix; 15 | } 16 | } 17 | } 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /Source/Transforms/SvgScale.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.Transforms 2 | { 3 | public sealed partial class SvgScale : SvgTransform 4 | { 5 | public float X { get; set; } 6 | 7 | public float Y { get; set; } 8 | 9 | public override string WriteToString() 10 | { 11 | if (X == Y) 12 | return $"scale({X.ToSvgString()})"; 13 | return $"scale({X.ToSvgString()}, {Y.ToSvgString()})"; 14 | } 15 | 16 | public SvgScale(float x) 17 | : this(x, x) 18 | { 19 | } 20 | 21 | public SvgScale(float x, float y) 22 | { 23 | X = x; 24 | Y = y; 25 | } 26 | 27 | public override object Clone() 28 | { 29 | return new SvgScale(X, Y); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/Transforms/SvgShear.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | 4 | namespace Svg.Transforms 5 | { 6 | public sealed partial class SvgShear : SvgTransform 7 | { 8 | public override Matrix Matrix 9 | { 10 | get 11 | { 12 | var matrix = new Matrix(); 13 | matrix.Shear(X, Y); 14 | return matrix; 15 | } 16 | } 17 | } 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /Source/Transforms/SvgShear.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.Transforms 2 | { 3 | /// 4 | /// The class which applies the specified shear vector to this Matrix. 5 | /// 6 | public sealed partial class SvgShear : SvgTransform 7 | { 8 | public float X { get; set; } 9 | 10 | public float Y { get; set; } 11 | 12 | public override string WriteToString() 13 | { 14 | return $"shear({X.ToSvgString()}, {Y.ToSvgString()})"; 15 | } 16 | 17 | public SvgShear(float x) 18 | : this(x, x) 19 | { 20 | } 21 | 22 | public SvgShear(float x, float y) 23 | { 24 | X = x; 25 | Y = y; 26 | } 27 | 28 | public override object Clone() 29 | { 30 | return new SvgShear(X, Y); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Source/Transforms/SvgSkew.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System; 3 | using System.Drawing.Drawing2D; 4 | 5 | namespace Svg.Transforms 6 | { 7 | public sealed partial class SvgSkew : SvgTransform 8 | { 9 | public override Matrix Matrix 10 | { 11 | get 12 | { 13 | var matrix = new Matrix(); 14 | matrix.Shear((float)Math.Tan(AngleX / 180f * Math.PI), (float)Math.Tan(AngleY / 180f * Math.PI)); 15 | return matrix; 16 | } 17 | } 18 | } 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /Source/Transforms/SvgSkew.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.Transforms 2 | { 3 | /// 4 | /// The class which applies the specified skew vector to this Matrix. 5 | /// 6 | public sealed partial class SvgSkew : SvgTransform 7 | { 8 | public float AngleX { get; set; } 9 | 10 | public float AngleY { get; set; } 11 | 12 | public override string WriteToString() 13 | { 14 | if (AngleY == 0f) 15 | return $"skewX({AngleX.ToSvgString()})"; 16 | return $"skewY({AngleY.ToSvgString()})"; 17 | } 18 | 19 | public SvgSkew(float x, float y) 20 | { 21 | AngleX = x; 22 | AngleY = y; 23 | } 24 | 25 | public override object Clone() 26 | { 27 | return new SvgSkew(AngleX, AngleY); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/Transforms/SvgTransform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Svg.Transforms 4 | { 5 | public abstract partial class SvgTransform : ICloneable 6 | { 7 | public abstract string WriteToString(); 8 | 9 | public abstract object Clone(); 10 | 11 | public override string ToString() 12 | { 13 | return WriteToString(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Source/Transforms/SvgTransformCollection.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | 4 | namespace Svg.Transforms 5 | { 6 | public partial class SvgTransformCollection 7 | { 8 | /// 9 | /// Multiplies all matrices 10 | /// 11 | /// The result of all transforms 12 | public Matrix GetMatrix() 13 | { 14 | var transformMatrix = new Matrix(); 15 | 16 | foreach (var transform in this) 17 | using (var matrix = transform.Matrix) 18 | transformMatrix.Multiply(matrix); 19 | 20 | return transformMatrix; 21 | } 22 | } 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/Transforms/SvgTranslate.Drawing.cs: -------------------------------------------------------------------------------- 1 | #if !NO_SDC 2 | using System.Drawing.Drawing2D; 3 | 4 | namespace Svg.Transforms 5 | { 6 | public sealed partial class SvgTranslate : SvgTransform 7 | { 8 | public override Matrix Matrix 9 | { 10 | get 11 | { 12 | var matrix = new Matrix(); 13 | matrix.Translate(X, Y); 14 | return matrix; 15 | } 16 | } 17 | } 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /Source/Transforms/SvgTranslate.cs: -------------------------------------------------------------------------------- 1 | namespace Svg.Transforms 2 | { 3 | public sealed partial class SvgTranslate : SvgTransform 4 | { 5 | public float X { get; set; } 6 | 7 | public float Y { get; set; } 8 | 9 | public override string WriteToString() 10 | { 11 | return $"translate({X.ToSvgString()}, {Y.ToSvgString()})"; 12 | } 13 | 14 | public SvgTranslate(float x, float y) 15 | { 16 | X = x; 17 | Y = y; 18 | } 19 | 20 | public SvgTranslate(float x) 21 | : this(x, 0f) 22 | { 23 | } 24 | 25 | public override object Clone() 26 | { 27 | return new SvgTranslate(X, Y); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/svg-logo-v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Source/svg-logo-v.png -------------------------------------------------------------------------------- /Source/svgkey.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Source/svgkey.snk -------------------------------------------------------------------------------- /Source/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", 3 | "version": "3.4.7", 4 | "publicReleaseRefSpec": [ 5 | "^refs/heads/master" // we release from master branch 6 | ], 7 | "cloudBuild": { 8 | "buildNumber": { 9 | "enabled": true 10 | }, 11 | "setVersionVariables": true 12 | } 13 | } -------------------------------------------------------------------------------- /Tests/Issues/images/20x20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/images/20x20.png -------------------------------------------------------------------------------- /Tests/Issues/images/800x800_rect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/png/__AJ_Digital_Camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__AJ_Digital_Camera.png -------------------------------------------------------------------------------- /Tests/Issues/png/__Telefunken_FuBK_test_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__Telefunken_FuBK_test_pattern.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-015-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-015-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-016-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-016-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-034-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-034-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-036-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-036-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-064-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-064-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-064-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-064-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-074-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-074-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-082-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-082-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-083-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-083-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-084-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-084-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-084-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-084-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-109-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-109-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-1101-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-1101-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-114-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-114-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-116-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-116-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-123-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-123-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-127-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-127-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-129-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-129-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-131-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-131-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-134-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-134-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-143-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-143-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-166-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-166-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-191-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-191-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-202-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-202-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-214-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-214-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-215-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-215-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-223-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-223-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-223-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-223-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-224-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-224-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-227-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-227-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-227-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-227-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-239-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-239-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-242-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-242-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-244-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-244-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-247-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-247-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-247-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-247-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-252-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-252-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-263-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-263-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-279-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-279-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-280-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-280-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-280-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-280-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-315-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-315-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-318-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-318-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-323-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-323-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-323-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-323-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-323-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-323-03.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-329-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-329-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-338-01_stroke_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-338-01_stroke_width.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-342-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-342-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-345-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-345-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-345-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-345-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-354-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-354-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-362-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-362-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-363-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-363-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-385-01_Test_text-anchor-middle.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-385-01_Test_text-anchor-middle.PNG -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-391-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-391-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-398-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-398-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-419-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-419-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-436-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-436-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-437-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-437-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-437-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-437-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-437-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-437-03.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-460-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-460-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-479-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-479-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-488-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-488-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-508-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-508-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-541-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-541-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-554-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-554-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-554-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-554-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-578-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-578-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-592-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-592-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-592-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-592-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-622-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-622-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-626-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-626-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-634-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-634-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-664-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-664-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-675-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-675-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-732-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-732-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-744-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-744-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-747-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-747-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-755-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-755-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-758-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-758-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-769-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-769-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-785-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-785-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-789-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-789-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-789-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-789-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-789-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-789-03.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-830-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-830-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-863-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-863-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-886-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-886-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-888-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-888-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-917-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-917-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-917-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-917-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-941-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-941-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-960-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-960-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-966-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-966-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-966-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-966-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__issue-989-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__issue-989-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-1045-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-1045-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-373-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-373-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-374-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-374-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-414-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-414-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-433-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-433-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-444-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-444-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-462-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-462-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-471-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-471-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-492-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-492-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-500-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-500-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-500-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-500-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-504-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-504-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-537-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-537-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-537-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-537-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-551-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-551-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-564-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-564-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-564-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-564-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-575-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-575-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-640-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-640-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-640-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-640-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-642-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-642-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-656-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-656-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-656-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-656-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-658-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-658-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-659-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-659-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-686-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-686-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-690-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-690-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-706-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-706-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-727-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-727-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-873-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-873-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-873-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-873-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-925-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-925-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-925-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-925-02.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-925-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-925-03.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-925-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-925-04.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-925-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-925-05.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-961-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-961-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__pull_request-963-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__pull_request-963-01.png -------------------------------------------------------------------------------- /Tests/Issues/png/__text-fonts-06-t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__text-fonts-06-t.png -------------------------------------------------------------------------------- /Tests/Issues/png/__tiger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__tiger.png -------------------------------------------------------------------------------- /Tests/Issues/png/__title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Issues/png/__title.png -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-016-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-074-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-109-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-1101-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-127-01.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-131-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-143-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | test 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-191-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-202-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-223-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-223-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-242-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-244-01.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-263-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | X 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-329-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-338-01_stroke_width.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-354-01.svg: -------------------------------------------------------------------------------- 1 | 2 | Abc 3 | Def 4 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-419-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Stage 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-436-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-437-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-437-03.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-460-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | x 8 | year old 9 | (gender) 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-479-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-508-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-541-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-554-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-592-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-592-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-622-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | desc 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-634-01.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-675-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Text 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-732-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Environment Heading (degrees CCW off Stern) 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-744-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A 5 | 6 | B 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-755-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-758-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-769-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some text 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-785-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-789-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-789-03.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-830-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-863-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-886-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-888-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-917-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-917-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-941-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello World! 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-960-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-966-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-966-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__issue-989-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-1045-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-373-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AB 6 | あい 7 | (あ 8 | 9 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-374-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | ABC 4 | ABC 5 | ABC 6 | ABC 7 | ABC 8 | 9 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-414-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-444-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-492-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-500-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-500-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-504-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-537-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Switch 5 | 6 | Text 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-537-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-551-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-564-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-575-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-640-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Stop processing on invalid data 4 | `text` and everything after it should be ignored 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-640-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Stop processing on invalid data 4 | `text` and everything after it should be ignored 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-642-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-656-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-656-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-659-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-686-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-690-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-706-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | MS Gothic String. 4 | MS Gothic String. 5 | 6 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-873-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-873-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Referenced 6 | 7 | 8 | 9 | Inline 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-925-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-925-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-925-03.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-925-04.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-925-05.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__pull_request-961-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__text-fonts-06-t.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A long text 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Issues/svg/__title.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | This is visible text. 4 | THIS SHOULD NOT BE SEEN! THIS SHOULD NOT BE SEEN! 5 | 6 | -------------------------------------------------------------------------------- /Tests/Svg.Benchmark/CoordinateParserBenchmarks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using BenchmarkDotNet.Attributes; 4 | using Svg; 5 | 6 | namespace Svg.Benchmark 7 | { 8 | public class CoordinateParserBenchmarks 9 | { 10 | [Benchmark] 11 | public void CoordinateParser_TryGetBool() 12 | { 13 | var chars = "false".AsSpan().Trim(); 14 | var state = new CoordinateParserState(ref chars); 15 | CoordinateParser.TryGetBool(out var result, chars, ref state); 16 | } 17 | 18 | [Benchmark] 19 | public void CoordinateParser_TryGetFloat_Points() 20 | { 21 | var chars = "1.6,3.2 1.2,5".AsSpan().Trim(); 22 | var state = new CoordinateParserState(ref chars); 23 | while (CoordinateParser.TryGetFloat(out var result, chars, ref state)) 24 | { 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Tests/Svg.Benchmark/SvgDocumentBenchmarks.cs: -------------------------------------------------------------------------------- 1 | using BenchmarkDotNet.Attributes; 2 | using System.IO; 3 | using Svg; 4 | 5 | namespace Svg.Benchmark 6 | { 7 | public class SvgDocumentBenchmarks 8 | { 9 | private Stream Open(string name) => typeof(Program).Assembly.GetManifestResourceStream($"Svg.Benchmark.Assets.{name}"); 10 | 11 | [Benchmark] 12 | public void SvgDocument_Open_AJ_Digital_Camera() 13 | { 14 | using var stream = Open("__AJ_Digital_Camera.svg"); 15 | SvgDocument.Open(stream); 16 | } 17 | 18 | [Benchmark] 19 | public void SvgDocument_Open_Issue_134_01() 20 | { 21 | using var stream = Open("__issue-134-01.svg"); 22 | SvgDocument.Open(stream); 23 | } 24 | 25 | [Benchmark] 26 | public void SvgDocument_Open_Tiger() 27 | { 28 | using var stream = Open("__tiger.svg"); 29 | SvgDocument.Open(stream); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Tests/Svg.Benchmark/SvgNumberCollectionConverterBenchmarks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BenchmarkDotNet.Attributes; 3 | 4 | namespace Svg.Benchmark 5 | { 6 | public class SvgNumberCollectionConverterBenchmarks 7 | { 8 | [Benchmark] 9 | public void SvgNumberCollectionConverter_Parse() 10 | { 11 | SvgNumberCollectionConverter.Parse("1.6 3.2 1.2 5".AsSpan()); 12 | SvgNumberCollectionConverter.Parse("1.6,3.2,1.2,5".AsSpan()); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests/Svg.Benchmark/ToStringBenchmarks.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using BenchmarkDotNet.Attributes; 3 | 4 | namespace Svg.Benchmark 5 | { 6 | public class ToStringBenchmarks 7 | { 8 | [Benchmark(Baseline = true)] 9 | public void Float_ToString() 10 | { 11 | 123.456f.ToString(CultureInfo.InvariantCulture); 12 | 789.01f.ToString(CultureInfo.InvariantCulture); 13 | (-45.01f).ToString(CultureInfo.InvariantCulture); 14 | 31.045f.ToString(CultureInfo.InvariantCulture); 15 | } 16 | 17 | [Benchmark] 18 | public void Float_ToSvgString() 19 | { 20 | 123.456f.ToSvgString(); 21 | 789.01f.ToSvgString(); 22 | (-45.01f).ToSvgString(); 23 | 31.045f.ToSvgString(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Tests/Svg.Tests.Common/svgkey.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.Tests.Common/svgkey.snk -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/DpiTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace Svg.UnitTests 4 | { 5 | /// 6 | /// Test that basic graphics operations work. Currently only supported 7 | /// on Windows, macOS, and Linux. 8 | /// 9 | [TestFixture] 10 | public class DpiTest 11 | { 12 | /// 13 | /// We should get a valid dpi (probably 72, 96 or similar). 14 | /// 15 | [Test] 16 | public void TestDpiAboveZero() 17 | { 18 | Assert.IsTrue(SvgDocument.PointsPerInch > 0); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/GdiPlusTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace Svg.UnitTests 4 | { 5 | 6 | /// 7 | /// Simple testing of the GDI+ capabilities, just to ensure whether the checks are inmplemented correctly 8 | /// 9 | [TestFixture] 10 | public class GdiPlusTests : SvgTestHelper 11 | { 12 | [Test] 13 | public void GdiPlus_QueryCapability_YieldsTrue() 14 | { 15 | Assert.True(SvgDocument.SystemIsGdiPlusCapable(), "The gdiplus check should yield true, please validate gdi+ capabilities"); 16 | } 17 | 18 | [Test] 19 | public void GdiPlus_EnsureCapability_YieldsNoError() 20 | { 21 | SvgDocument.EnsureSystemIsGdiPlusCapable(); //This call is a void, if everything works as expected, we won't get an exception and the test will finish. 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/LargeEmbeddedImageTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace Svg.UnitTests 4 | { 5 | /// 6 | /// Test Class of rendering SVGs with a large embedded image 7 | /// Based on Issue 225 8 | /// 9 | /// 10 | /// Test use the following embedded resources: 11 | /// - Issue225_LargeUri\Speedometer.svg 12 | /// 13 | [TestFixture] 14 | public class LargeEmbeddedImageTest : SvgTestHelper 15 | { 16 | protected override string TestResource { get { return GetFullResourceString("Issue225_LargeUri.Speedometer.svg"); } } 17 | protected override int ExpectedSize { get { return 160000; } } 18 | 19 | [Test] 20 | public void TestImageIsRendered() 21 | { 22 | LoadSvg(GetXMLDocFromResource()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/MultiThreadingTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System.Diagnostics; 3 | using System.Threading.Tasks; 4 | 5 | namespace Svg.UnitTests 6 | { 7 | [TestFixture] 8 | public class MultiThreadingTest : SvgTestHelper 9 | { 10 | protected override string TestResource { get { return GetFullResourceString("Issue_Threading.TestFile.svg"); } } 11 | protected override int ExpectedSize { get { return 100; } } 12 | 13 | private void LoadFile() 14 | { 15 | LoadSvg(GetXMLDocFromResource()); 16 | } 17 | 18 | [Test] 19 | public void LoadSVGThreading_SingleThread_YieldsNoError() 20 | { 21 | LoadFile(); 22 | } 23 | 24 | [Test] 25 | public void LoadSVGThreading_MultiThread_YieldsNoErrorWhileInBounds() 26 | { 27 | Parallel.For(0, 10, (x) => 28 | { 29 | LoadFile(); 30 | }); 31 | Trace.WriteLine("Done"); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/NodeReaderTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace Svg.UnitTests 4 | { 5 | [TestFixture] 6 | public class SvgNodeReaderTests : SvgTestHelper 7 | { 8 | protected override string TestResource { get { return GetFullResourceString("Issue518_Entities.Entities.svg"); } } 9 | //protected override int ExpectedSize { get { return 4300; } } // original image has 4314 bytes 10 | 11 | [Test] 12 | public void ReadingEntitiesFromXmlSucceeds() 13 | { 14 | var xmlDoc = GetXMLDocFromResource(); 15 | var doc = SvgDocument.Open(xmlDoc); 16 | Assert.DoesNotThrow(() => doc.Draw()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue1176_Switch/Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.UnitTests/Resources/Issue1176_Switch/Blue.png -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue1176_Switch/Green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.UnitTests/Resources/Issue1176_Switch/Green.png -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue1176_Switch/Red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.UnitTests/Resources/Issue1176_Switch/Red.png -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue1176_Switch/SwitchTest.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue1176_Switch/Yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.UnitTests/Resources/Issue1176_Switch/Yellow.png -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue204_PrivateFont/BrushScriptMT2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.UnitTests/Resources/Issue204_PrivateFont/BrushScriptMT2.ttf -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue204_PrivateFont/Text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Line01 7 | Line02 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue399_LexerIssue/EmptyDTag.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | data loading - 75% 13 | 14 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue399_LexerIssue/LexerTestTemplate.svg: -------------------------------------------------------------------------------- 1 |  2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | data loading - 75% 16 | 17 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/Issue_TextElement/Text.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | IP 5 | 6 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/Resources/ScriptTag/TestFile.svg: -------------------------------------------------------------------------------- 1 | 3 | 19 | 20 | 22 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/SmallEmbeddingImageTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace Svg.UnitTests 4 | { 5 | /// 6 | /// Test Class of rendering SVGs with a large embedded image 7 | /// Based on Issue 225 8 | /// 9 | /// 10 | /// Test use the following embedded resources: 11 | /// - Issue225_LargeUri\Speedometer.svg 12 | /// 13 | [TestFixture] 14 | public class SmallEmbeddingImageTest : SvgTestHelper 15 | { 16 | protected override string TestResource 17 | { 18 | get 19 | { 20 | return this.GetFullResourceString("hotfix_image_data_uri.Speedometer.svg"); 21 | } 22 | } 23 | 24 | protected override int ExpectedSize 25 | { 26 | get 27 | { 28 | return 160000; 29 | } 30 | } 31 | 32 | [Test] 33 | public void TestImageIsRendered() 34 | { 35 | this.LoadSvg(this.GetXMLDocFromResource()); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/SvgPointCollectionTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace Svg.UnitTests 4 | { 5 | [TestFixture] 6 | public class SvgPointCollectionTests 7 | { 8 | [Test] 9 | public void ToStringReturnsValidString() 10 | { 11 | var collection = new SvgPointCollection 12 | { 13 | new SvgUnit(1.6f), new SvgUnit(3.2f), 14 | new SvgUnit(1.2f), new SvgUnit(5f) 15 | }; 16 | Assert.AreEqual("1.6,3.2 1.2,5", collection.ToString()); 17 | } 18 | 19 | [Test] 20 | public void CloneReturnsValidObjectType() 21 | { 22 | var collection = new SvgPointCollection(); 23 | Assert.IsInstanceOf(typeof(SvgPointCollection), collection.Clone()); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/public.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.UnitTests/public.pk -------------------------------------------------------------------------------- /Tests/Svg.UnitTests/svgkey.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/Svg.UnitTests/svgkey.snk -------------------------------------------------------------------------------- /Tests/SvgW3CTestRunner/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svg-net/SVG/c9eb5e8229a710d7c50f3af52d1e05619d259bc2/Tests/SvgW3CTestRunner/App.ico -------------------------------------------------------------------------------- /Tests/SvgW3CTestRunner/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace SvgW3CTestRunner 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | #if (NETCOREAPP3_0_OR_GREATER || NET5_0_OR_GREATER) 17 | Application.SetHighDpiMode(HighDpiMode.SystemAware); 18 | #endif 19 | Application.EnableVisualStyles(); 20 | Application.SetCompatibleTextRenderingDefault(false); 21 | Application.Run(new View()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Tests/SvgW3CTestRunner/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SvgW3CTestRunner.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Tests/SvgW3CTestRunner/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | --------------------------------------------------------------------------------