I am looking for a few folks who want to help me write a program mostly for fun, and to ultimately be posted as Freeware somewhere(as well as here).. Here's the idea, and a rough-sketch version I threw together tonight..
Concept:
A small, medium featured painting program, similar to MS Paint at the core. As you draw items, code is generated to do the same drawings in GDI+ in the language of your choice (plan is to support c# and vb.net). When you finish drawing, you save the drawing not as a picture, but as a .vb or .cs file, containing the sub/void that draws the same image in GDI+. The idea would be to be able to whip up drawings in much less time than it takes to think of pixel dimensions in one's head.
Features Planned:
Ability to select language upon saving, to generate c# or vb.net.
Ability to select type of sub this is for, and have it generate. I.e, just painting on a form, overriding an OnPaint for a control, etc.
History based, so actions can be undone. (or deleted from the middle)
Ability to create static drawing subs, or ones based on resize events.
Problems forseen:
Code Optimization
Complex GDI Shapes like Polygons and GraphicsPaths.
Languages used:
So far I've done just C#, but if someone with GDI+ Experience insists on VB.NET, what I have would be easy to convert.
Attatched are a few images of what I did thus far, a simple C# mock up of how it would work (but without the saving functions and such enabled - and only generating VB.Net code(sloppy code at that )
The first is an in-program shot, the second a cut/paste onto a vb.net project using code generated by the program.
A very neat idea, but for complex drawing the code would bloat up a lot.
You'll also have to check for repeated property assignments (your output code sets the pen width twice without actualy drawing anything). Also, a great deal of GDI+ drawing relies on looping, you'd need to add repetition support.