<Start> <Intro> <Install> <Legal> <Screen> <Buffer> <Sprite> <Input> <Misc> <Debug> <Utes>
<Author>
JLib Design
The fundamental concept behind JLib is to remove as many of the details of graphical interfaces as possible from
the programmer. By abstracting away from hardware considerations, programs are made simpler to write,
understand, and debug. JLib hides the details of graphical operations from the programmer. Whether a JLib
program is running in a full screen or in a desktop window, the program always treats user input and graphical
output in the same way.
Some basic concepts about how JLib is designed are helpful to determine whether you will find it useful. Here, then are the hard and fast rules behind the behaviour of JLib based programs.
Things JLib Programs can't Do:
You can do these three things from JLib programs, but you will have to write the code for it yourself for each
target you hope to port to.
Commonly Used Terms
Target
A combination of a programming environment and graphics mode form a JLib target. An example is the MS-DOS based djgpp compiler package (programming environment), and the mode 13h (320x200, 256 colour) graphics mode. Targets are identified by #defines in a library configuration header file. To compile the library for a particular target, the correct target header file is installed, then the library is recompiled. Programs subsequently linked with the library will use the given graphics mode.
Buffer
A buffer is like a drawing pad for JLib programs. Buffers can be different sizes, and there are many graphics primitives that can be used to draw onto them. Part or all of a buffer can be shown on the screen as desired. Anything that you want to draw on the screen in your program must first be drawn to a buffer, and then copied to the screen. Often, a buffer is exactly the same size as the output screen, and is treated like the screen. When the buffer changes in any way, the screen is updated to reflect the buffer.
Sprite
A sprite is an image or picture that does not overwrite the area of the screen that it appears on. Sprites are used to draw cursors, icons and animated images that can move over a backgrounds as though they are floating in front it.
Next Section: Function Categories
<Start> <Intro> <Install> <Legal> <Screen> <Buffer> <Sprite> <Input> <Misc> <Debug> <Utes>
<Author>