QuickImage

Introduction

QuickImage is an open-source utility for adding drawings and graphs to your Web applications. It was designed primarily for use with the SteelBlue Application Server, but is general enough to be used in many programming environments.

The QuickImage package contains both Java classes that can draw images on the client's browser and a C++ program that can draw images on the Web server. They both interpret the same set of graphics commands, and you only need one version to add drawings to your Web applications.

Download QuickImage

The latest version of QuickImage is 1.0 and can be downloaded from the SteelBlue download repository. There you will find the full source (both C++ and Java) and the compiled Java classes.

QuickImage is released under the Artistic License, which is certified by the Open Source Initiative. The copyright for QuickImage is held by the Turner Consulting Group.

QuickImage Example

The following is an example of the QuickImage Java class. If you view the source, you will see the actual commands passed to the applet (the QuickImage CGI script accepts the same commands in standard input):

QuickImage Drawing Commands

The format for the QuickImage applet call is (assuming the classes are in the current Web directory):
<APPLET CODE="QuickImage.class" WIDTH=500 HEIGHT=200>
 <PARAM NAME="draw" value="drawing commands">
</APPLET>
Each drawing command must end with ";" and command case is ignored. For example, the following:
<APPLET CODE="QuickImage.class" WIDTH=100 HEIGHT=100>
 <PARAM NAME="draw" value="color FF0000; arc 40 40 30 40 0 270;">
</APPLET>
creates:
The following are the drawing commands:

CommandPurpose
LINE xa ya xb yb Draws a line
BOX xa ya xb yb Draws a rectangle
FBOX xa ya xb yb Draws a filled rectangle
POLY num_points xa ya xb yb ... xn yn Draws a polygon with the given number of points
FPOLY num_points xa ya xb yb ... xn yn Draws a filled convex polygon with the given number of points
LPOLY num_points xa ya xb yb ... xn yn 'tool tip' Draws a polygon with the given number of points labeled with the given tool tip.
LBOX xa ya xb yb 'tool tip' Draws a rectangle labeled with the given tool tip.
ARC x y w h sa aa Draws an arc centered at (x,y) with the given width w and height h from the starting angle sa to the ending angle aa.
FARC x y w h sa aa Draws a filled arc centered at (x,y) with the given width w and height h from the starting angle sa to the ending angle aa.
TEXT align x y 'text string' Draws text with the given alignment (center, left, or right) at (x,y).
COLOR RRGGBB Changes the pen color to the given hexidecimal color triple
FONT name type size Changes the current font to the given name (serif, timesroman, monospaced, courier, sanserif, or helvetica), the given type (normal, bold, italic, or bolditalic), and point size (e.g. 8, 10, 12, 20).


Copyright (C) 2001 TCG.