Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
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.
Posted
Updated 13-Mar-12 15:33pm
v4
Comments
ZurdoDev 13-Mar-12 11:09am    
That is a loaded question. You'll start in Visual Studio with a new windows forms project but there is a ton more after that. What specifically are you stuck on?
Sergey Alexandrovich Kryukov 13-Mar-12 19:27pm    
No, this is a typical problems best solved with WPF.
--SA
Sergey Alexandrovich Kryukov 13-Mar-12 19:39pm    
By the way, I just put my answer with essential overview of a plan and advice for such work. Please see.
--SA
Sergey Alexandrovich Kryukov 13-Mar-12 21:34pm    
Fixed number of spelling and punctuation mistakes. Also, there is not such language as C#.NET. And I think this is about Inkscape, not Inkspace (what is it?).
--SA
Sergey Alexandrovich Kryukov 13-Mar-12 21:38pm    
By the way "I don't want to build the menus by code but with the designer" is ridiculous. This piece of functionality is so insignificant compared to the whole project that I suspect that your idea of this project is way too ambitious compared to your skills. (I would be glad to learn that I was wrong, so don't think I'm trying to discourage you; it's just a little warning about complexity of the project.)

You can use Designer, but you could be surprised to know how little is the use of Designers in all serious projects, compared to "real" code. Designers are more created for quick-and-dirty work, beginners, small projects, etc. And this type of project just has to be very serious. Just think about it.

--SA

1 solution

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.

[EDIT]

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

—SA
 
Share this answer
 
v5
Comments
RaisKazi 13-Mar-12 20:14pm    
My 5.
Sergey Alexandrovich Kryukov 13-Mar-12 20:36pm    
Thank you Rais.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900