Drawbox: a new open source C++ graphics library

Drawbox: a new open source C++ graphics library

Post by Ken Brook » Mon, 14 Jan 2002 03:07:43

I hereby announce Drawbox, a new, open-source cross-platform graphics
library for C++.  It has been under quiet development, and circulating
in the world of school teachers, for some months.  But today I want to
announce it widely as an open-source effort, and invite the programming
public to try it - and to get involved.

I am aware of other cross-platform graphics efforts, particularly
ClanLib.  But I offer this one also, because it is comes with a very
particular design goal, namely, ABSOLUTE EASE OF USE for student
programmers.  Drawbox was designed as I taught a high school AP
Computer Science course; several features are chosen to be particularly
helpful for classroom use.  Teachers, students, the self-taught, and
amateur programmers whose careers are in other fields, will all find
its simplicity especially helpful.  For example: only one line of
#include is required; the very first line of executable code may be a
drawing command, and it will be drawn!

These are the core design goals:

- as absolutely friction-free as possible.  Absolutely minimal setup
before getting to the task; no information forced upon the beginner
that he doesn't need to deal with.

- system-independent interface.  The same source can be compiled with
(very nearly) the same results on MacOS and Windows.

- object-oriented: there are classes Point and Rect (among others) to
handle spatial information.  But a beginner who is not yet ready to
handle classes can also work without them.

- functions are heavily overloaded so that the programmer can present
the parameters in the form in which he has them at the moment, instead
of wasting effort converting them to match.

Features include all the standard graphics primitives, keyboard and
mouse input with good support for detecting modifiers, fine grained
timing control, and bitmapped image support (JPEG under Windows, PICT
under MacOS).  Auxiliary classes are provided to help with simulations
such as motion with gravity.  A GUI toolkit is in process, but not
ready for the public view. (Ask if you want to beta test it.)

Drawbox is available at http://www.sparklight.com/drawbox .  The
download includes all sources needed to build the library for Macintosh
and for Windows, as well as a tutorial and a well commented Drawbox.h
header file.  It comes with project files for CodeWarrior on both
platforms, and Visual C++ for Windows.  Plenty of sample programs, from
10-liners to moderately complex examples, are included.  If you intend
to use it in a dual-platform environment, download to a Mac first, it
will preserve the file type information.

Participants wanted!
I have spent my sweat, and need to turn my energy to other things, most
especially teaching.  But here are some improvements waiting for anyone
who might be inspired:

1. Port to Linux

2. Port to MacOS X native, either Carbon or Aqua or both.

3. Create project files for some of the free PC compilers, such as

4. Add JPEG support for Mac (it is already there for Windows).

5. Add multi-window support.  Right now Drawbox addresses only one

And I'm sure the you, the user community, will think of many others.  I
am ready to actively support those who are ready to get involved.  To

Have fun and enjoy it!

Ken Brooks


1. New open source raster image manipulation library

Check this out :


This is something that I wrote for AfterStep window manager,
but it has grown to be rather powerfull raster image
manipulation library. The accent has been made on high quality
image processing - instead of 8bit per channel with saturation,
it does 32 bit per channel with subsequent translation into 8bit
  with error diffusion to compensate for bandwidth loss. It
actually performs very well, despite perceived complexity.

Some other things to mention :

Supports about 10 file formats.
Could work with and without X windows.
XML based image manipulation.
High quality 128bit raster engine.
TrueType antialiased text rendering.
In memory image compression.

Have fun.

2. Newbie Help Question.......

3. New Open source raster image library

4. Q: Proximity/limit switches

5. Any open source graphics library?

6. Wanted: Colored Text/*Graphics* Terminal Emulator for PC

7. any free/open source graphic libraries?

8. IDEA! for poligonalizing meshes dinamically

9. MS Visual C++ library --> Borland C++ library

10. the newest open source of Open Inventor?

11. c/c++ 2D plotting library/source

12. Good library/source code for encoding and decoding of JPEG in C++

13. VisualAge C++ and Open Class Library