- AppGraphics Documentation
- Getting Started with AppGraphics
- Window Management
- Colors and Patterns
- Mouse Interactions
- Keyboard Interaction
- Graphics Shapes and Primitives
- Text Output
- Graphic Viewports
- Images
- Windows Controls
- Common Dialogs
- Clipboard Operations
- Threads, Thread Safety, and Idling
- AppGraphics License Agreement
AppGraphics Documentation
Welcome to AppGraphics, a simplified graphics library for C and Fortran from Approximatrix. This library allows users to open windows, draw various shapes within windows, add menus and simple controls, open common file dialogs and message boxes, and save or print window contents. The library has been designed for simplicity first and foremost; it hides much of the complicated Microsoft Windows code from the user.
The drawing code borrows from the WinBGIm library, which allows for drawing lines, shapes, and images within a window.
Guides
Reference
- Window Management
- Colors, Fill Patterns, and Line Styles
- Mouse Events and Queries
- Keyboard Queries
- Drawing and Shapes
- Text Output
- Viewports
- Images
- Menus, Buttons, Text Boxes, etc.
- Common Dialogs
- Clipboard Interaction
- Threads, Thread Safety, and Idling
Warnings and Notes
The AppGraphics library makes use of Microsoft’s GDI+ drawing routines to perform all drawing operations. This library comes with Windows, and it continues to be supported in modern versions of the operating system. However, being a low-level library, the user must be careful not to perform unrealistic requests. For example, if the user fails to initialize a radius variable when drawing a circle, the value may be some random, large quantity. The GDI will attempt to draw this circle regardless of the size, and it can cause an apparent or actual lockup of the Windows graphical user interface while the operation is attempted. Users should take care in determining what values are passed into the library.
In order to remain responsive when work is being performed, the AppGraphics library heavily relies on a separate thread for managing the graphical user interface. Any callbacks from menus or buttons will be called from the graphical user interface thread, which, generally speaking, is safe to do. However, if the underlying application is relying on allocated memory that is to be reallocated or freed during a callback, the user should consider implementing some mutual exclusions, or mutexes, to avoid accessing memory that is no longer available from either the callback or the main program. Please see the Threads section for more information.
Licensing
AppGraphics is based loosely on the excellent WinBGIm library, a public domain graphics library for Microsoft Windows. All additions and improvements beyond WinBGIm are copyrighted by Approximatrix, LLC. Users wishing to distribute software linking to the AppGraphics library are encouraged to do so; there are no further royalties to be paid for distributing software utilizing this library. More information is available on the licensing page. Please familiarize yourself with the license terms before distributing software using AppGraphics.