Results 1 to 3 of 3

Thread: GDI Lab

  1. #1

    Thread Starter
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    GDI Lab

    Hey Folks,

    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.

    Bill
    Attached Images Attached Images   
    Attached Files Attached Files
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: GDI Lab

    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.

    This will get very complicated so be prepared
    I don't live here any more.

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: GDI Lab

    ps, if you have any gdi+ questions, just pm me.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width