If you write transportation management applications, or applications which track trucks, railroad cars, or other vehicles, you may be interested in this vehicle tracking simulation using VG.net vector graphics. It is a combination of the PanZoom and PathMove samples, demonstrating:
- Real-time tracking of vehicles using scalable vector graphics
- Implementation of a Vehicle class with custom properties
- Movement of an object along a path
- Control over velocity of movement
- Zooming and panning
- Throttling CPU usage of animation of specific objects
- Layers using Groups
The Vehicle class custom properties:
- MovementPath: the path along which the vehicle moves
- Position: distance along the movement path
- Direction: forward or backward
- State: normal, or alarm state, indicated visually by a change in the color (red vehicles are in the alarm state)
Download the executable by clicking on the image above. Download the source code, which compiles with Visual Studio 2003. You will need VG.net installed, full or Lite version.
Click on the image above to run the Centralized Styles sample for VG.net vector graphics. Grab the lower right corner of the window to scale the UI larger and smaller.
Download the source code to learn how to centralize all your Styles into a single template Picture that overrides Styles recursively, starting at a top-level Picture and moving to sub Pictures.
In the future we will have a special class in VG.net you can derive from, a type of Picture, that you can drag and drop onto any Picture in order to reuse a central set of Styles. This sample code allows you to centralize Styles with released versions of VG.net, 2.7 or 2.8.
This sample also demonstrates how to create a vector graphics LED radio button, and how to use the TranslucentForm class.
If you are using a Lite version, change DisplayInTranslucentForm to DisplayInForm, and you can run the code.