WxArt2D is a library for 2D graphical programming. WxArt2D is build on top of the wxWidgets GUI classes. Basic primitives are derived from the base a2dCanvasObject and managed in a drawing. The objects in this drawing are read from a file or created from the source code. The drawing can be made hierarchical by adding child objects to a parent canvas object. Because a canvas object is reference counted, there can be more the one parent on the same canvas object. A unique part, or level, in the hierarchy can be referenced and drawn at different multiple locations. Different parts of a a2dDrawing can be displayed, using a2dDrawingPart, in several windows at the same time. A drawing is traversed, starting at a chosen level in the hierarchy and with a given view port. Everything that it encounters within the view port will be drawn in a window using a device context. The device context target may be a window, a bitmap or even a file. A a2dDrawingPart is used to display certain parts of a drawing, it uses an internal drawing context a2dDrawer2D to do that. While traversing a a2dDrawing , the drawing context is used by the a2dDrawingPart for drawing the the objects in the drawing. Everything that is drawn from within a drawing, is achieved by calling drawing methods on the a2dDrawingPart's its drawing context. Drawing context implementations are derived from a2dDrawer2D . One can switch the internal drawing context of a2dDrawingPart on the fly. For example to switch between anti aliased rendering and normal wxDc based rendering.
- Highly optimized rendering strategy for drawing and redrawing a hierarchy of 2d objects.
Updating changes in the drawing towards the a2dDrawingPart takes place in idle time, with minimum effort for the user.
- Coordinates are in world (doubles or integer), and objects are placed relative to parent object(s) with a matrix.
- The visible part of a drawing and its size as shown on a window or bitmap can be set independently of the data within the document itself.
- The document containing the hierarchy of 2d objects, can be displayed as several views.
- Tool Classes to edit the displayed objects in a view.
- Data can be read from a file and written to a file in SVG or CVG. New graphical file formats can easily be added.
a2dCanvasObject is the base class for all primitives in a document, it can intercept/receive events in the same manner as wxWidgets handles events.
- Complex canvas objects for displaying curves with markers are available.
Objects can be connected via pin objects, this makes graph/diagram display and editing possible. Pins can be added at run time as children of the a2dCanvasObject itself.