dcsimg
 

JTDraw Update

Monday Jun 3rd 2002 by Tao Zhu

A simple drawing program with GDI+ support.




Click here for a larger image.

Environment: VC6 SP3/4, NT4/5 GDI+, BCGControlBar

JTDraw was a simple drawing program started from a Microsoft Drawcli project. It was a small part of code from one of the projects that I developed for the visualization of a metabolic pathway. (My major is chemical engineering.) Based the questions and suggestions that have been given to the topic, I decided to release more code examples from my own project. The current version of Draw project includes the following features:

  1. Supports GDI+ drawing. It includes transparent filling, pattern filling, and using an image easily. For the UI, I developed my own color picker (very similar to the style of Office 2000), in which you can not only select the color, but also select the pattern, gradient, and picture you want to fill the shape.
  2. Supports multiple pages and zoom.
  3. Supports infinite step undo/redo. You can adjust the stacks to hold the undo/redo stack. In the example code, it is set to 20 steps.
  4. Still uses the BCGControlbar library. My version is the 5.82 release. I think the evaluation version of BCGControlbar should work. You can dig into the code to delete all the BCGControlbar stuff if you really hate it, but I suggest you should have one copy of this library. It is pretty cool and cheap.

My project is aimed at visualizing metabolic pathways in a living cell, so I have other objects that are not included in this example because I don't think many of you are interested in how to visualize a molecule or a reaction. The alignment of objects is not hard to implement, and my own code is related to network layout and may not have a general readership; hence, I leave the alignment function to readers.

GDI+ is part of new SDK release. It is free to download from the Microsoft Web site here.

Downloads

Download demo project - 300 Kb
Home
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved