epaint-1.0 README
----------------------------
21 February, 2004

Author: S Pramod Biligiri (www.geocities.com/pramodbiligiri)

epaint is an elementary graphics editor that works on MS-DOS. It is written in C++ and uses Borland's DOS Graphics routines (graphics.h).
It has been developed and tested under Borland's Turbo C/C++ IDE version 3.0. 

 It can be used to create raster images using lines, rectangles, circles, ellipses, spray painting etc. It saves and loads images in its simple native format. No other image format is supported.

epaint was developed as part of my 6th semester Graphics project as per the requirements of the Visweswaraiah Technological University (VTU)  syllabus. All the features selected have been to meet those requirements. I've referred to (and copied verbatim from) quite a few similar projects done by my University seniors.


COMPILE / INSTALL
----------------------------

The editor uses the "Project" feature of TurboC IDE.  It is their proprietary, binary format for storing information about all files related to a project.
I found it useful during development and am too lazy to move it to an open scheme. Anyway, the TurboC IDE is widely available.

To compile using TurboC IDE

1. Change the working directory to the directory where you have copied the source files (using File -> Change Directory). 
This is to provide search paths for my header files and .PRJ files 
2.  Open EDITOR.PRJ from the Project Menu (Project - > Open ). If all goes fine, you should see a window at the bottom showing a list of all the files in the project, with some brief info about each. 
3. Open the file MAIN.CPP. In the function initialize_graphics(), change the 3rd parameter to initgraph() to reflect where the BGI files are located in your TurboC installation. (Note: It uses UNIX style slash separators)
4. Build the editor using Make from the Compile Menu ( Compile -> Make). The executable is created. Any errors here are probably due to not using the proper working directory or not having the Project Files window open. Also, check for proper options in Options->Directories and Options->Compiler.
5. Pressing Ctrl + F9 should run the editor. 
 If you get messages like: Error: Graphics not initialized, it's probably due to some path setting for initgraph() (see 3 above) or some problem with your MS-DOS setup. 
 

AUTHOR
-------------

I'm S Pramod Biligiri. I am in the final semester of my Bachelor of Engineering, Computer Science course at K.S. Institute of Technology, Bangalore, India. You can find more about me at http://www.geocities.com/pramodbiligiri . I hope you find this application useful/educative. Do mail me your reaction and feedback to ultratimepass@indiatimes.com

LICENSE
-------------

I have decided to place epaint under GPL. See accompanying file COPYING.


DESIGN
------------

The graphics algorithms used for the actual drawing are derived from standard text books or ripped off from similar editors. 
The organization of the editor is based on the Command Design Pattern (Design Patterns, Gamma et al, http://www.amazon.com/exec/obidos/tg/detail/-/0201633612/002-4226527-6800024?v=glance. The book is a classic, and a must  read for anyone interested in design and OOP. Google for Gang of Four + Design Patterns).

The Command Pattern is similar to Function Objects, or the Signal/Slots mechanism in KDE/Gtk. In short, it associates a state with procedures, rather than just  functionality. It also decouples a request from the implementor of the request. This increases modularity in the code. (Note the simple main() function in MAIN.CPP). It can be easily extended to provide an Undo feature for each command. I could not implement this for lack of time.