Component: Scale Arc (Controls)
Author | Matrix Ltd |
Version | 1.1 |
Category | Controls |
Contents
Scale Arc component
For creating dials and rotary controls. Make a scale to show any range of values, then link a pointer object to construct meters and rotary controls.
This component can be used as a base to create child components
The following components all inherit the traits of Scale Arc:
![]() |
Simple simulation only knob (no analogue pin connection) for use on the dashboard. |
![]() |
Simulation only panel meter for the dashboard (no analogue pin connection). |
Examples
No additional examples
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
GetValue
Get the current scale value - this will be the most recent value set using "SetValue", or from the most recent mouse click if the component is in "Control"
mode.
Parameters
- This macro has no parameters
Return value
SetValue
Set the pointer to the given value on the scale. Returns the angle required to point at the given value.
Parameters
- FLOAT Value
- New value to set the pointer to.
Return value
- FLOAT : The resulting angle of the pointer in degrees from the positive X-axis.
SetLabel
Set the label text for the scale
Parameters
- STRING Label
- Text to display.
Return value
- This call does not return a value
SetRange
Set the minimum and maximum values of the scale
Parameters
- FLOAT Minimum
- Minimum value for the scale
- FLOAT Maximum
- Maximum value for the scale
Return value
- This call does not return a value
Property reference
Pointer
This property is of type Panel object and can be referenced with the variable name target_object.
Set another panel object to be a pointer that will rotate around the scale.
Depending on the property 'Function' (below)....
"Display" mode - the object acts as a pointer showing the values set by the "SetValue" macro.
"Control" mode - the object acts as a handle for mouse movements that will set the current value.
Axis Object
This property is of type Panel object and can be referenced with the variable name axis_object.
By default the dial is centered at the component centre. Choose another object here to set
a different center point for the scale.
NB) Pointer objects always rotate around the centre of the dial markings.
Mouse Control
This property is of type Fixed list of ints and can be referenced with the variable name control_type.
Decide whether or not the value can be set by clicking with the mouse.
Modes...
None - the dial will be a display only; value can be set using the 'setValue' macro.
Dial - clicking on the dial face will set the value.
Pointer - clicking and dragging the pointer object will set the value.
Dial and Pointer - either object can set the value.
Canvas Shape
This property is of type Fixed list of ints and can be referenced with the variable name canvas_shape.
Shape of the plane on which to draw the scale.
Resolution
This property is of type Signed integer and can be referenced with the variable name resolution.
The number of pixels per world unit of size.
The scale is drawn as a bit-map, so this setting determines the level of detail vs. drawing speed and memory
usage.
BG Color
This property is of type Color picker with transparency and can be referenced with the variable name bg_color.
Color of the scale background.
Positive Color
This property is of type Color picker and can be referenced with the variable name ink_color.
Color for arc and divisions for negative values.
Negative Color
This property is of type Color picker and can be referenced with the variable name neg_color.
Color for the arc and divisions for positive values.
Label Color
This property is of type Color picker and can be referenced with the variable name label_color.
Color for the component lable text.
Radius %
This property is of type Signed integer and can be referenced with the variable name arc_radius.
Radius of the arc line as a percentage of the component's shortest dimension.
Start Angle
This property is of type Signed integer and can be referenced with the variable name arc_start.
Start angle of the sweep, where the minimum value will appear.
Measured in degrees, anti-clockwise from the positive X-axis.
Sweep
This property is of type Signed integer and can be referenced with the variable name arc_sweep.
The number of degrees between the minimum value and the maximum value.
Show
This property is of type True or false and can be referenced with the variable name show_arc.
Whether to show or hide the arc.
Thickness
This property is of type Floating point and can be referenced with the variable name arc_thick.
Thickness of the arc line.
Divisions
This property is of type Signed integer and can be referenced with the variable name marks_count.
Number of main divisions around the scale - these divisions can be numbered.
Radius %
This property is of type Signed integer and can be referenced with the variable name marks_radius.
Radius of the division ends - they are drawn from here to their interseciot with the arc.
% of the component size.
Thickness
This property is of type Floating point and can be referenced with the variable name divs_thick.
Thickness of main (numbered) division lines.
Subdivisions
This property is of type Signed integer and can be referenced with the variable name marks_subdiv.
Number of smaller divisions between each main division. Set to zero if not required.
Subs Radius %
This property is of type Signed integer and can be referenced with the variable name subdiv_radius.
Radius of the small division ends. They are drawn from here to their intersection with the arc.
% of component size.
Subs Thickness
This property is of type Floating point and can be referenced with the variable name subs_thick.
Thickness of sub-division lines.
Show
This property is of type True or false and can be referenced with the variable name show_marks.
Whether to show or hide the division markings.
Maximum
This property is of type Floating point and can be referenced with the variable name val_max.
Maximum value to show on the display.
Minimum
This property is of type Floating point and can be referenced with the variable name val_min.
Minimum value to show on the display.
Decimals
This property is of type Signed integer and can be referenced with the variable name dec_places.
Number of decimal places to show on the number values.
Radius %
This property is of type Signed integer and can be referenced with the variable name num_radius.
Radius from the centre to place the number values.
% of component size.
Text Size %
This property is of type Signed integer and can be referenced with the variable name num_size.
Height of number text - % of component size.
Font
This property is of type Font picker and can be referenced with the variable name num_font.
Font for the number values.
Show
This property is of type True or false and can be referenced with the variable name show_numbers.
Show or hide the number values.
Text
This property is of type Line of text and can be referenced with the variable name label_text.
A text label to help identify the display.
Radius %
This property is of type Signed integer and can be referenced with the variable name label_radius.
Radius to place the label - % of component size.
Angle
This property is of type Signed integer and can be referenced with the variable name label_angle.
Angle at which to place the label - degrees anti-clockwise from the positive X-axis.
Text Size %
This property is of type Signed integer and can be referenced with the variable name label_size.
Height of the label font - % of component size.
Font
This property is of type Font picker and can be referenced with the variable name label_font.
Font for the text label.
Show
This property is of type True or false and can be referenced with the variable name show_label.
Show or hide the text label.