The Drawing Gauges Using GDI+ code sample demonstrates one method of creating a custom C++ gauge in Microsoft ESP without using the XML gauge system. This sample lays the groundwork for many practical applications of C++ gauges and the Panels and Gauges SDK, some examples of which include:
- Access to the complete suite of GDI+ drawing facilities for gauge display
- Drawing bitmaps to a gauge from shared memory for:
- Compatibility with a variety of graphics APIs
- Use with any external source of bitmap images
The gauges provided in the Drawing Gauges Using GDI+ code sample do the following:
- Retrieve real-time data from a running simulation
- Interpret that data, and
- Represent the data graphically in several ways
There is an opaque and a transparent version of the gauge that both do the following:
- Display lat/long/alt and heading data as strings
- Represent the throttle percentage as a string and as a scalable rectangle
The opaque version of the gauge represents heading graphically using an arrow image to display a heading indicator. The transparent version does the same, with the addition of utilizing the heading arrow’s alpha channel. This allows the arrow to appear without a rectangular bounding box. Thus, the simulated world view shows through, creating a clean transparency appearance.
|