Issue
Large libraries of jpg and bmp graphics exist that have frames of damper movement, or different colors for a pump depending on status. How can these be brought into TGML and used in the same way that they were once used in I/NET gpg or Vista IV OGC graphics?
Environment
TGML
Cause
TGML has a rich set of animation and rotational tags for vectored images, however if a large library of jpg or bmp files exists, it can be imported into TGML and used like it was before in other graphics programs.
Resolution
Click here to download a sample TGML graphic that contains the two examples below. They use jpg images to represent a damper at different angles of rotation. The first example deals with an open/close damper and the second with an analog output. The four images used are:
|
|
|
|
0° | 30° | 60° | 90° |
In TGML, these would be imported using the "Insert Picture" tool and then stacked on top of each other.
Open/Close Damper
A 0° image on the bottom, 90° image on top. Binding on the 90° image toggles the Visibility attribute of the fully open image using ConvertValue tags. If the value equals 0 the "open" image is hidden, displaying the closed image. If the value is 1, the "open" image is visible, hiding the closed image below, and showing the damper fully open.
Analog Damper
A 0° image on the bottom, stacked on top with 30°, 60°, 90° images. Instead of using SignalEqualTo attribute of ConvertValue, used SignalMoreThan and SignalLessOrEqualTo to create "bands" around which each image would become visible. Because of how they are stacked on stop of each other, only one will ever show.