ZBar

(Engine-Level Function)

Description: Draws a layered bar in a window.
Returns: Nothing
Usage: Steady State only.
Function Groups: Graphics
Related to: Bar | Box | GUIRectangle | ZBox
Format: ZBar(Left, Bottom, Right, Top, Color)
Parameters:  
Left  
Required. Any numeric expression for the left side coordinate of the bar.
Bottom  
Required. Any numeric expression for the bottom side coordinate of the bar.
Right  
Required. Any numeric expression for the right side coordinate of the bar.
Top  
Required. Any numeric expression for the top side coordinate of the bar.
Color  
Required. May be any of the following:
Comments: Although this is a layered graphic, it cannot be edited using the Idea Studio. It is for use within text mode editing only.

Example:

  ZBar(50, 100, 250, 50, "<FF00FF00>");

A simple example that draws a green bar.

  ZBox(10, 200, 210, 
       10 { Bounding box for box },
       0 { Box is black }); 
  ZBar(10, 200, 210, Limit(Scale(fluid, 
                                 0 { min }, 
                                 2000 { max }, 
                                 200 { scaled min }, 
                                 10 { scaled max }),
                           10 { Min value from Scale }, 
                           200 { Max value from Scale }) { Bounding box for bar }, 
       10 { Color of bar }); 

A complex example that represents a changing value (not a tag) using a bar.

These two statements simulate a tank that is outlined in black (using ZBox) and whose changing fluid level is represented in the ZBar statement by scaling and limiting the value of fluid. Notice that the Scale function converts (and inverts) the value from a real world fluid level to window coordinates. Because its return value is not limited by any of its parameters, the Limit function is used to declare absolute limits. Even if the value of fluid goes beyond its limits, the bar will not be drawn outside of the box.