Object Graphics Library
The Object Graphics Library (OGL) is a library for displaying and editing diagrams. These diagrams can consist of nodes and
arcs: when nodes are moved, arcs follow. You can use OGL in your applications to provide convenient visualisation
and drawing facilities.
Possible applications include network diagrams, business process modelling, decision trees,
visual programming, Petri nets, OOAD, mindmaps, among many others.
The sample application OGLEdit is shown on the right. You can use this source code as a template for your
own applications.
Features of OGL
- A range of predefined shape classes, such as wxRectangleShape, wxPolygonShape, wxEllipseShape.
- Multiline and spline wxLineShape connecting node shapes: the arcs move with the nodes.
- Arcs join neatly at the perimeter of shapes.
- Arcs can either join at attachment points or as if connected to the centre of the node.
- Resizing handles.
- Multiple text regions for complex shapes.
- Divided rectangles: rectangles with an arbitrary number of vertical divisions.
- Composite shapes.
- Simple 'metafile' shapes which can be resized and rotated.
- Bitmap shapes.
- wxDiagram class manages a list of shapes, and implements input/output.
The relationship between OGL and Hardy
OGL is the core graphics code for Hardy,
a meta-CASE tool written with wxWidgets.
There are various features that Hardy implements over and above the OGL functionality, including
a symbol library, node and arc symbol editors, attachment point editor, junction node functionality,
and various editing facilities. It is possible that contributors could extend OGL to
encompass these areas in future.
Distribution
Distributed on the wxWidgets CD-ROM.