|
-
August 2nd, 2009, 09:52 AM
#4
Re: UI programming
Adobe Illustrator and CorelDraw are examples of applications which use mainly GDI for UI purposes. For a given level of density and complexity, if the features of GDI are sufficient for rendering, the speed is somewhat dependent on hardware and drivers.
AutoCAD is a unique example and that series. AutoCAD is capable of 3D, and is always "running" in a 3D mode even if you're drawing in 2D - the primitives of GDI are not sufficient (entirely) to perform the "regen" in AutoCAD.
That product was originally implemented in DOS, in C.
Eventually it moved to 16 bit Windows, then to 32 bit Windows (now there's a 64 bit version). Along the way the moved to MFC based development.
Early on they realized as the moved from DOS to Windows, they required a means of drawing not available in GDI, so the made their own "Heidi" layer (which can be substituted, like a plugin). This was a "mixture" of the DOS roots and Windows. All of the drawing primitives where implemented in Heidi, which somewhat took the position we now expect of a 3D graphics card, though there was a separation of 3D calculation and representation. AutoCAD must represent 3D information in ways that neither DirectX nor OpenGL can handle. At this point they have interfaces for DirectX (perhaps it's DirectShow internally I don't know)....
The point is that such a product does use non-GDI methods to achieve feature and performance - because they're drawing requirements are not within the domain of GDI.
3D Studio Max is another example of a "drawing program" which can be configured for GDI, OpenGL or DirectX implementation of the UI.
GDI can draw lines and arcs, some bezier curves, ellipses, rounded rectangles, solid filled shapes and bitmaps.
If your drawing needs go beyond that, you'll need to consider a graphics engine of some kind (2D or 3D).
To gain leverage, you really need to work and think in C++ instead of win32.
What you may be asking about is not just the drawing component of this subject (GDI vs DirectX or OpenGL), but of that layer of logic associated with object management which gives you a metaphor of "something to grab and move". Various graphics and game engine libraries offer features along those lines, though it may be pointing at something in order to shoot it rather than relocated a vertex.
In an application where you need to implement the interactive UI of "rubber bands" and moving "selectable vertexes", there are example applications and yes, GDI is generally capable of that.
There are LOTS of tricks and techniques.
You'll need some examples, some time to practice, etc.
The subject is full of tributaries, I could write a book. If you can narrow down a specific set of UI goals I might have more specific suggestions.
Last edited by JVene; August 2nd, 2009 at 10:01 AM.
If my post was interesting or helpful, perhaps you would consider clicking the 'rate this post' to let me know (middle icon of the group in the upper right of the post).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|