绘制SVG在.NET / C#? [英] Drawing SVG in .NET/C#?

查看:1279
本文介绍了绘制SVG在.NET / C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用C#生成SVG文件。我已经有code,以吸引他们在PNG和EMF格式(使用框架的标准类<一href=\"http://msdn.microsoft.com/en-us/library/system.drawing.imaging.metafile.aspx\">System.Drawing.Imaging.Metafile和 ZedGraph )。有什么能向你推荐做适应了code至SVG? preferably我想找到一些库(免费或不)将模仿<一个href=\"http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx\">System.Drawing.Graphics接口。

I'd like to generate an SVG file using C#. I already have code to draw them in PNG and EMF formats (using framework's standard class System.Drawing.Imaging.Metafile and ZedGraph). What could you recommend to do to adapt that code to SVG? Preferably I'd like to find some library (free or not) that would mimic System.Drawing.Graphics interface.

推荐答案

查看 SVG框架C#和SVG-GDI +桥接项目。

从上面的网页...

该SvgGdi桥是一组类
  即使用SvgNet之间转换
  SVG和GDI +。这意味着该
  使用GDI +得出任何code
  显卡可以轻松输出为SVG
  好了,只需在堵
  SvgGraphics对象。这个目的是
  完全相同的作为常规.NET
  图形对象,但创建一个SVG
  树。即使像的东西罢了孵化
  和线锚实施。

The SvgGdi bridge is a set of classes that use SvgNet to translate between SVG and GDI+. What this means is that any code that uses GDI+ to draw graphics can easily output SVG as well, simply by plugging in the SvgGraphics object. This object is exactly the same as a regular .NET Graphics object, but creates an SVG tree. Even things like hatched fills and line anchors are implemented.

这篇关于绘制SVG在.NET / C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆