Other Toolkits

CD - Canvas Draw

Comparing CD with Other Graphics Libraries

There are other graphics libraries, with some portability among operational systems, available on the Internet. Among them we can highlight:

  • GKS - Very complete 2D and 3D graphics library, but with limited image resources. It is an ISO standard, and it implementations are usually commercial. Tecgraf has an implementation of GKS which is no longer used, being replaced by CD. http://www.bsi.org.uk/sc24/.
  • Mesa - 3D graphics library with support to the OpenGL standard. Implemented in C. Aimed only at display, with attribute functions for illumination and shading features. http://www.mesa3d.org/.
  • OpenGL - 3D graphics library with some 2D support. Aimed only at display. A window CD canvas can coexist with an OpenGL canvas at the same time. Note: When Double Buffer is used, do not forget to swap buffer before redrawing with the CD library. http://www.opengl.org.
  • GGI - 2D graphics library aimed only at display. http://www.ggi-project.org/.
  • GD - Library only for drawing on images, saves PNG files. Implemented in C. http://www.boutell.com/gd/.
  • GDK - Used by the GTK user interface toolkit. Implemented in C. Aimed only at display, and contains several functions for managing windows, keyboard and mouse. http://www.gtk.org/.
  • CAIRO - A vector graphics library designed to provide high-quality display and print output. Very interesting, lots of functions, usually render in bitmaps on native systems. Display hardware acceleration is used almost only to display the bitmaps. Although it can reach high quality rendering. http://cairographics.org/.
  • AGG - The AGG Project (Anti-Grain Geometry). High Fidelity 2D Graphics A High Quality Rendering Engine for C++. Renders to a bitmap then transfer it to the native system, just like Cairo. GNU GPL license.  http://www.antigrain.com/

Most of them are aimed only at one type of driver, usually display or images, and sometimes user interface routines were also included. Others add 3D drawing routines, as well as scene illumination routines. All this unnecessarily increases their complexity and does not make them more complete as 2D graphic libraries.

There are also several Graphics User Interface libraries that contain drawing functions, like Qt and wxWidgets.

As to performance, CD is as good as any other, in some cases having a better performance. Thus, the CD library offers unique features and quality as a portable 2D graphic library.