RadialIndicator

(Meter Parts Library)

Description: Will draw a radial type indicator that sweeps from a minimum angle to a maximum angle in the same fashion that a real radial meter would. Call from within a GUITransform.
Returns: Nothing
Usage: Steady State only.
Function Groups: Graphics
Related to: GUITransform | RadialLegend
Format: \MeterParts\RadialIndicator(DataSource, IndicatorImage[, OffsetFromCenter, Direction, MinimumAngle, MaximumAngle, Hue, Saturation, Brightness, Transparency, Contrast, ColorizeHue, ColorizeIntensity, UseTagScaling, MinScaleValue, MaxScaleValue, DampenIndicator])
Parameters:  
DataSource
Required. A Tag name, constant or expression that represents the value to show.
IndicatorImage
Required. The full path to the name of an image file to use as the indicator. Typically, this is an image of a needle.
OffsetFromCenter
The offset from the center to translate the image. This allows the user to change the rotation center point of the indicator image. The default is 0 which sets the bottom of the indicator image as the rotation center point.
Direction
A flag indicating the direction from the minimum to the maximum value representation. 0 means increase in a clockwise manner while 1 indicates a counter-clockwise manner. The default is 0 (clockwise).
MinimumAngle
The start angle of the sweep. 0 is defined as up or the 12 o’clock position. The default is 225.
MaximumAngle
The end angle of the sweep. 0 is defined as up or the 12 o’clock position. The default is 135.
Hue
The Hue translation to perform on the Indicator image. This enables you to change the color of the indicator image. The image must have color in it already to perform a hue translation. If there is no color to start with, then changing this value does nothing. You can add color by setting a value for the ColorizeHue parameter, described later.
The default is 0, indicating that no hue translation is done and the indicator is in its native color.
Saturation
The amount of saturation of the colors in the indicator image. A value of 0 will make the image black and white (no color saturation). A value of 2 produces a brightly colored (saturated) indicator. The default is 1 which corresponds to the native saturation of the indicator image.
Brightness
An adjustment of the brightness of the indicator image. Higher numbers produce a brighter indicator image. A 0 produces a black image. The default is 1 which corresponds to the native brightness of the indicator image.
Transparency
An adjustment of the opacity of the indicator where 1 means 100% opacity and 0 means %100 transparent. The default is 1.
Contrast
An adjustment of the contrast of the colors in the indicator image. A value of 0 produces a flat looking image and a value of 2 gives a high contrast image. The default is 1 which corresponds to the native contrast of the indicator image.
ColorizeHue
A value that works in conjunction with ColorizeIntensity. This is the hue of the color that is introduced by colorizing an image. Colorizing an image will introduce color into an image that previously was black and white or grayscale. The default value is 0.
ColorizeIntensity
A value to define how much color to introduce into the image. The default is 0, meaning not to introduce any color at all into the image.
UseTagScaling
A flag that indicates whether to use the supplied Tag’s scaling values. The default is FALSE.
MinScaleValue
The minimum scale value to use if the UseTagScaling flag is not true. The default is 0.
MaxScaleValue
The maximum scale value to use if the UseTagScaling flag is not true. The default is 100.
DampenIndicator
A flag to indicate whether to dampen the indicator movement. Dampened movement creates the effect of animating the indicator. The default is false.
Comments: This function must be called within a GUITransform statement in order for it to work correctly.
The size of the indicator is scaled with respect to the original size of the image and the size of the transform. If you want a smaller indicator you can simply make a smaller transform. Using the offset from center in conjunction with the size of the transform allows for extensive customization of the size and position of the needle.

Example:

  GUITransform(458, 392, 608, 242,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               \MeterParts\RadialIndicator(Invalid,
               "Bitmaps\Meter Parts\Indicators\Radial\Needle5.png", 
                0, 0, 225, 135, 0, 1, 1, 1, 1, 0, 0, 0, 0, 100, 0));