[.net] Graph system
Hello!
I want to implement a graph system, which can be used by the user to created directed graphs. To have a better understand what I mean please take a look at this video: "> video Please jump to 1:13.
In this video you can see a dark gray canvas with several rectangles. The rectangles are the nodes. Every node can be moved via drag & drop. At 1:31 the user creates some edges between nodes.
My simple question: How can I implement such a graph system with C++/CLI and WinForms? Can I use some standard controls or do I have to implement everything on my own with GDI+ or System.Drawing?
Thanks for any help!
I have chosen C++/CLI + WinForms in my project for several reasons. But WHY I use WinForms doesnt matter in this thread.
I think the only way to do this is to render everything by myself:(
I think the only way to do this is to render everything by myself:(
Yes, you'll probably have to draw it on your own. Don't let that scare you too much though, it's not too difficult. Implement the functionality as a custom control and encapsulate the main pieces smartly and it should be easy to create and reuse in as many projects as you need it for.
Quote:Original post by schupf
I have chosen C++/CLI + WinForms in my project for several reasons. But WHY I use WinForms doesnt matter in this thread.
I think the only way to do this is to render everything by myself:(
The WHY could matter. If you picked it because you know it well implementing a custom control would be a breeze. If you picked it because you already have a starting base (app) you would be (more or less) stuck to WinForms.
Implementing such graphics is sometimes much easier on another platform such as WPF.
I made one using C++, win32, and DX9 (screenshot here). I can't say it was easy to create, but it wasn't the most challenging task either. Not a definite indication of anything, but it's written in about 1300 lines of code, not counting utility DX functions and objects. But such a control is neat and useful enough to warrant the effort for me. Good luck.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement