JLib supports a subset of the GPI, enough to do a certain amount of graphics work. See What JLib doesn't do.
In similar fashion to container controls & drag'n'drop, there is a header file declaring a namespace class to hold the various constants and enumerations used by the graphics classes. This class is JGfx, defined in <JGfx.hpp>.
Class JDC is defined in <JDC.hpp>. This represents a PM device context, and is abstract. You can, however, instantiate instances of JMemoryDC, JWindowDC, and JMetafileDC. A device context is the device dependent part of the output device.
<JPSpace.hpp> defines several presentation-space classes, rooted in JBPSpace. A presentation space reflects the device independent part of the output device, and allows you to write to that device. In the Windows API, the DC is a PM (DC,PS) pair.
JWindowPS creates a window PS; JPSpace is a general micro-presentation space, and JNormalPS is a `normal' presentation space, that is it supports retained graphics (see the GPI ref).
JPSpace contains methods for quickly drawing text, rectangles, bitmaps & icons, methods to get and set various types of settings, and one other important method: render( const JGObject &g).
<JGPrim.hpp> defines the JGObject class, which represents something which can be drawn into a presentation space. Also defined here are the following primitives, the behaviour of which should mostly be obvious:
The last of these provides one way of managing graphics: construct a chain of commands, in a JGList, and then render that in your presentation space. Of course you could have a JGList being a member of another JGList.
A presentation space has a whole bunch of settings which determine how various things get drawn. Settings of this sort often need to be changed while rendering a sequence of objects, and so the settings-changing objects themselves inherit from JGObject. These are defined in <JGLPrim.hpp>:
Bitmaps are treated slightly separately. Two classes are defined in <JBitmap.hpp>, JBitmap, and JBitmapReader. The former is a wrapper around a PM HBITMAP; it inherits from JGObject, and so can be rendered in a presentation space in that way.
JBitmapReader is for reading .bmp, .ptr, or .ico files. It constructs a list of JBitmaps for the bitmaps in the file. There's no support at the moment for saving bitmaps in any other format than one bitmap per file, OS/2 style.
<JColour.hpp> defines class JColour; an instance of this represents an RGB colour, and there are static methods for getting system colours.
<JFont.hpp> defines class JFont; there are static methods for listing installed fonts & running a font dialog.