矢量图形软件,例如C#或VB.NET中的CorelDraw或Inkscape [英] Vector graphics software like CorelDraw or Inkscape in C# or VB.NET

查看:235
本文介绍了矢量图形软件,例如C#或VB.NET中的CorelDraw或Inkscape的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Windows窗体在C#或VB.NET中创建矢量图形软件,例如CorelDraw或Inkscape.我该如何开始?我应该首先绘制整个项目周期,然后为图形工具构建基础库吗?我不想通过代码来构建菜单,而是与设计师一起构建.请帮助我.

I want to create a vector graphics software like CorelDraw or Inkscape in C# or VB.NET using windows forms. How do I start? Should I first draw the whole project cycle and then build the base libraries for the graphics tools? I don''t want to build the menus by code but with the designer. Please help me.

推荐答案

非常大的项目.我只能给你一些初步的想法.

使用WPF.对于图形建筑表面,请使用类System.Windows.Controls.Canvas,对于在此表面上放置的元素,将使用类型为System.Windows.UIElement的对象.

请参阅:
http://msdn.microsoft.com/en-us/library/system. windows.controls.canvas.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.windows. uielement.aspx [ ^ ].

已经为您开发了所有必需的事件,缩放和平移操作.一个提示:使用System.Windows.Controls.ViewboxSystem.Windows.Controls.ScrollViewer.

http://msdn.microsoft.com/en-us/library/system. windows.controls.viewbox.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. windows.controls.scrollviewer.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. windows.controls.scrollcontentpresenter.aspx [ ^ ].

使用编辑器创建的矢量图形的主要数据格式为XAML.最有可能的是,您将需要将导出方法开发为其他矢量格式,首先是可缩放矢量图形(SVG).请参阅:
http://en.wikipedia.org/wiki/Scalable_Vector_Graphics [ http://en.wikipedia.org/wiki/SVG_Working_Group [ http://www.w3.org/Graphics/SVG/ [连接不同的控件 [
Very, very big project. I can only give you some starting ideas.

Use WPF. For the graphics building surface, use the class System.Windows.Controls.Canvas, for the elements places on this surface, you will use the objects of the type System.Windows.UIElement.

Please see:
http://msdn.microsoft.com/en-us/library/system.windows.controls.canvas.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.uielement.aspx[^].

All the required events, zoom and pan operations are pretty much already developed for your. One hint: use System.Windows.Controls.Viewbox, System.Windows.Controls.ScrollViewer.

http://msdn.microsoft.com/en-us/library/system.windows.controls.viewbox.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollcontentpresenter.aspx[^].

The primary data format for the vector graphics created with your editor would be XAML. Most likely, you will need to develop export methods to other vector formats, first of all, to Scalable Vector Graphics (SVG). Please see:
http://en.wikipedia.org/wiki/Scalable_Vector_Graphics[^],
http://en.wikipedia.org/wiki/SVG_Working_Group[^],
http://www.w3.org/Graphics/SVG/[^].

You should understand that XAML expressive capabilities are narrower than that of SVG. For example, blurring is not supported (to best of my knowledge). So, you need to be careful if you also need import (which would be good).

Most likely, you will also need export to pixel graphics format, which is relatively easy.



Please also see my past answer to a related question:
Connect different controls[^].

—SA


这篇关于矢量图形软件,例如C#或VB.NET中的CorelDraw或Inkscape的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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