Author
|
Matrix Ltd
|
Version
|
1.2
|
Category
|
Advanced Shapes
|
Scale Arc Template component
A base component for drawing circular dials. This allows a simple way to create graduated and labelled dials, for example, within meter and rotary control components. Mouse handling is built in for ease of building interactive controls.
Component Source Code
Please click here to view the component source code (Beta): FC_Comp_Source_Scale_Arc.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
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.
|
- FLOAT
|
Return
|
|
SetValue
|
Set the pointer to the given value on the scale. Returns the angle required to point at the given value.
|
- FLOAT
|
Value
|
The value on the scale to move the pointer to.
|
- FLOAT
|
Return
|
|
SetLabel
|
Set the label text for the scale
|
- STRING
|
Label
|
Text to display.as the component label.
|
- VOID
|
Return
|
|
SetRange
|
Set the minimum and maximum values of the scale
|
- FLOAT
|
Minimum
|
Minimum value for the scale
|
- FLOAT
|
Maximum
|
Maximum value for the scale
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Pointer
|
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
|
An object to act as the centre of the arc, and rotation point of the 'Pointer' object. By default, the arc is drawn centrally, but by assigning an object here, the whole scale can be centred around a different point.
|
|
Function
|
Choose the 'mode' of the component. "Display" mode - the arc can act as a value display, with the 'Pointer' object rotating to show incoming value changes. "Control" mode - clicking on the scale, or 'Pointer' object, sets the value directly, which can be susequently read by the "GetValue" macro.
|
|
Style
|
|
Canvas Shape
|
Shape of the plane on which to draw the scale.
|
|
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
|
Color of the scale background.
|
|
Positive Color
|
Color for arc and divisions for negative values.
|
|
Negative Color
|
Color for the arc and divisions for positive values.
|
|
Label Color
|
Color for the component label text.
|
|
Arc
|
|
Radius %
|
Radius of the arc line as a percentage of the component's shortest dimension.
|
|
Start Angle
|
Start angle of the sweep, where the minimum value will appear. Measured in degrees, anti-clockwise from the positive X-axis.
|
|
Sweep
|
The number of degrees between the minimum value and the maximum value.
|
|
Thickness
|
Thickness of the arc line.
|
|
Show
|
Whether to show or hide the arc.
|
|
Marks
|
|
Divisions
|
Number of main divisions around the scale - these divisions can be numbered.
|
|
Radius %
|
Radius of the division ends - they are drawn from here to their intersection with the arc. % of the component size.
|
|
Thickness
|
Thickness of main (numbered) division lines.
|
|
Subdivisions
|
Number of smaller divisions between each main division. Set to zero if not required.
|
|
Subs Radius %
|
Radius of the small division ends. They are drawn from here to their intersection with the arc. % of component size.
|
|
Subs Thickness
|
Thickness of sub-division lines.
|
|
Show
|
Whether to show or hide the division markings.
|
|
Numbers
|
|
Maximum
|
Maximum value to show on the display.
|
|
Minimum
|
Minimum value to show on the display.
|
|
Decimals
|
Number of decimal places to show on the number values.
|
|
Radius %
|
Radius from the centre to place the number values. % of component size.
|
|
Text Size %
|
Height of number text - % of component size.
|
|
Font
|
Font for the number values.
|
|
Show
|
Show or hide the number values.
|
|
Label
|
|
Text
|
A text label to help identify the display.
|
|
Radius %
|
Radius to place the label - % of component size.
|
|
Angle
|
Angle at which to place the label - degrees anti-clockwise from the positive X-axis.
|
|
Text Size %
|
Height of the label font - % of component size.
|
|
Font
|
Font for the text label.
|
|
Show
|
Show or hide the text label.
|
|
Buttons
|
|
Show Buttons
|
Controls if the adjustment buttons are shown on the scale arc or not.
|
|
Adjustment Value
|
Sets the button adjustment value, will round the value to the nearest whole adjustment. For example with an adjustment of 1,0 the adjustment buttons will jump to the next whole number.
|
==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.
|
- FLOAT
|
Return
|
|
SetValue
|
Set the pointer to the given value on the scale. Returns the angle required to point at the given value.
|
- FLOAT
|
Value
|
The value on the scale to move the pointer to.
|
- FLOAT
|
Return
|
|
SetLabel
|
Set the label text for the scale
|
- STRING
|
Label
|
Text to display.as the component label.
|
- VOID
|
Return
|
|
SetRange
|
Set the minimum and maximum values of the scale
|
- FLOAT
|
Minimum
|
Minimum value for the scale
|
- FLOAT
|
Maximum
|
Maximum value for the scale
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Pointer
|
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
|
An object to act as the centre of the arc, and rotation point of the 'Pointer' object. By default, the arc is drawn centrally, but by assigning an object here, the whole scale can be centred around a different point.
|
|
Function
|
Choose the 'mode' of the component. "Display" mode - the arc can act as a value display, with the 'Pointer' object rotating to show incoming value changes. "Control" mode - clicking on the scale, or 'Pointer' object, sets the value directly, which can be susequently read by the "GetValue" macro.
|
|
Style
|
|
Canvas Shape
|
Shape of the plane on which to draw the scale.
|
|
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
|
Color of the scale background.
|
|
Positive Color
|
Color for arc and divisions for negative values.
|
|
Negative Color
|
Color for the arc and divisions for positive values.
|
|
Label Color
|
Color for the component label text.
|
|
Arc
|
|
Radius %
|
Radius of the arc line as a percentage of the component's shortest dimension.
|
|
Start Angle
|
Start angle of the sweep, where the minimum value will appear. Measured in degrees, anti-clockwise from the positive X-axis.
|
|
Sweep
|
The number of degrees between the minimum value and the maximum value.
|
|
Thickness
|
Thickness of the arc line.
|
|
Show
|
Whether to show or hide the arc.
|
|
Marks
|
|
Divisions
|
Number of main divisions around the scale - these divisions can be numbered.
|
|
Radius %
|
Radius of the division ends - they are drawn from here to their intersection with the arc. % of the component size.
|
|
Thickness
|
Thickness of main (numbered) division lines.
|
|
Subdivisions
|
Number of smaller divisions between each main division. Set to zero if not required.
|
|
Subs Radius %
|
Radius of the small division ends. They are drawn from here to their intersection with the arc. % of component size.
|
|
Subs Thickness
|
Thickness of sub-division lines.
|
|
Show
|
Whether to show or hide the division markings.
|
|
Numbers
|
|
Maximum
|
Maximum value to show on the display.
|
|
Minimum
|
Minimum value to show on the display.
|
|
Decimals
|
Number of decimal places to show on the number values.
|
|
Radius %
|
Radius from the centre to place the number values. % of component size.
|
|
Text Size %
|
Height of number text - % of component size.
|
|
Font
|
Font for the number values.
|
|
Show
|
Show or hide the number values.
|
|
Label
|
|
Text
|
A text label to help identify the display.
|
|
Radius %
|
Radius to place the label - % of component size.
|
|
Angle
|
Angle at which to place the label - degrees anti-clockwise from the positive X-axis.
|
|
Text Size %
|
Height of the label font - % of component size.
|
|
Font
|
Font for the text label.
|
|
Show
|
Show or hide the text label.
|
|
Buttons
|
|
Show Buttons
|
Controls if the adjustment buttons are shown on the scale arc or not.
|
|
Adjustment Value
|
Sets the button adjustment value, will round the value to the nearest whole adjustment. For example with an adjustment of 1,0 the adjustment buttons will jump to the next whole number.
|