Difference between revisions of "Component: Scale Arc Template (Advanced Shapes)"
From Flowcode Help
Jump to navigationJump to search (XML import - Pre 8.0 release) |
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.2 |- | width="20%" style="color:gray...") |
||
Line 1: | Line 1: | ||
− | + | {| style="width:50%" | |
− | |||
− | {| | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| Matrix Ltd | | Matrix Ltd | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
− | | 1.2 | + | | 1.2 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Advanced Shapes | | 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 Pack== |
− | |||
− | |||
− | |||
+ | MODELS | ||
− | + | ==Detailed description== | |
− | + | ''No detailed description exists yet for this component'' | |
− | + | ==Examples== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | + | ''<span style="color:red;">No additional examples</span>'' |
− | |||
− | |||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
− | '' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue''' | ||
+ | |- | ||
+ | | colspan="2" | 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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | + | |- | |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue''' | ||
+ | |- | ||
+ | | colspan="2" | Set the pointer to the given value on the scale. Returns the angle required to point at the given value. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" | Value | ||
+ | |- | ||
+ | | colspan="2" | The value on the scale to move the pointer to. | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | ''' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLabel''' | ||
+ | |- | ||
+ | | colspan="2" | Set the label text for the scale | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" | Label | ||
+ | |- | ||
+ | | colspan="2" | Text to display.as the component label. | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRange''' | |
− | + | |- | |
− | + | | colspan="2" | Set the minimum and maximum values of the scale | |
− | = | + | |- |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | |
− | + | | width="90%" | Minimum | |
− | + | |- | |
− | + | | colspan="2" | Minimum value for the scale | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | |
− | + | | width="90%" | Maximum | |
− | + | |- | |
− | + | | colspan="2" | Maximum value for the scale | |
− | + | |- | |
− | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |
− | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | |
− | == | + | |} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | :: | ||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Set the minimum and maximum values of the scale | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 109: | Line 104: | ||
==Property reference== | ==Property reference== | ||
− | |||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |
− | + | |- | |
− | + | |- | |
− | " | + | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] |
− | + | | width="90%" | Pointer | |
− | " | + | |- |
− | + | | colspan="2" | 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. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] | |
− | + | | width="90%" | Axis Object | |
− | + | |- | |
− | + | | colspan="2" | 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. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Function | |
− | + | |- | |
− | + | | colspan="2" | 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. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Canvas Shape | |
− | + | |- | |
− | + | | colspan="2" | Shape of the plane on which to draw the scale. | |
− | + | |- | |
− | " | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] |
− | + | | width="90%" | Resolution | |
− | value changes. | + | |- |
− | + | | colspan="2" | 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. | |
− | "Control" mode - clicking on the scale, or 'Pointer' object, sets the value directly, which can be | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] | |
− | susequently read by the "GetValue" macro. | + | | width="90%" | BG Color |
− | + | |- | |
− | + | | colspan="2" | Color of the scale background. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Positive Color | |
− | + | |- | |
− | + | | colspan="2" | Color for arc and divisions for negative values. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Negative Color | |
− | + | |- | |
− | The number of pixels per world unit of size. | + | | colspan="2" | Color for the arc and divisions for positive values. |
− | + | |- | |
− | The scale is drawn as a bit-map, so this setting determines the level of detail vs. drawing speed and memory | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] |
− | + | | width="90%" | Label Color | |
− | usage. | + | |- |
− | + | | colspan="2" | Color for the component label text. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Radius % | |
− | + | |- | |
− | Color of the scale background. | + | | colspan="2" | Radius of the arc line as a percentage of the component's shortest dimension. |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Start Angle | |
− | + | |- | |
− | + | | colspan="2" | Start angle of the sweep, where the minimum value will appear. Measured in degrees, anti-clockwise from the positive X-axis. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Sweep | |
− | + | |- | |
− | + | | colspan="2" | The number of degrees between the minimum value and the maximum value. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Thickness | |
− | + | |- | |
− | + | | colspan="2" | Thickness of the arc line. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Show | |
− | + | |- | |
− | + | | colspan="2" | Whether to show or hide the arc. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Divisions | |
− | Radius of the arc line as a percentage of the component's shortest dimension. | + | |- |
− | + | | colspan="2" | Number of main divisions around the scale - these divisions can be numbered. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Radius % | |
− | + | |- | |
− | + | | colspan="2" | Radius of the division ends - they are drawn from here to their intersection with the arc. % of the component size. | |
− | + | |- | |
− | Measured in degrees, anti-clockwise from the positive X-axis. | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] |
− | + | | width="90%" | Thickness | |
− | + | |- | |
− | + | | colspan="2" | Thickness of main (numbered) division lines. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Subdivisions | |
− | + | |- | |
− | + | | colspan="2" | Number of smaller divisions between each main division. Set to zero if not required. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Subs Radius % | |
− | + | |- | |
− | + | | colspan="2" | Radius of the small division ends. They are drawn from here to their intersection with the arc. % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Subs Thickness | |
− | + | |- | |
− | + | | colspan="2" | Thickness of sub-division lines. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Show | |
− | + | |- | |
− | + | | colspan="2" | Whether to show or hide the division markings. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Maximum | |
− | + | |- | |
− | + | | colspan="2" | Maximum value to show on the display. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Minimum | |
− | % of the component size. | + | |- |
− | + | | colspan="2" | Minimum value to show on the display. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Decimals | |
− | + | |- | |
− | + | | colspan="2" | Number of decimal places to show on the number values. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Radius % | |
− | + | |- | |
− | + | | colspan="2" | Radius from the centre to place the number values. % of component size. | |
− | Number of smaller divisions between each main division. Set to zero if not required. | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Text Size % | |
− | + | |- | |
− | + | | colspan="2" | Height of number text - % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-3-icon.png]] | |
− | + | | width="90%" | Font | |
− | % of component size. | + | |- |
− | + | | colspan="2" | Font for the number values. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Show | |
− | + | |- | |
− | + | | colspan="2" | Show or hide the number values. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Text | |
− | + | |- | |
− | + | | colspan="2" | A text label to help identify the display. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Radius % | |
− | + | |- | |
− | + | | colspan="2" | Radius to place the label - % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Angle | |
− | + | |- | |
− | + | | colspan="2" | Angle at which to place the label - degrees anti-clockwise from the positive X-axis. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | Minimum value to show on the display. | + | | width="90%" | Text Size % |
− | + | |- | |
− | + | | colspan="2" | Height of the label font - % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-3-icon.png]] | |
− | + | | width="90%" | Font | |
− | + | |- | |
− | + | | colspan="2" | Font for the text label. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Show | |
− | + | |- | |
− | + | | colspan="2" | Show or hide the text label. | |
− | + | |- | |
− | % of component size. | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] |
− | + | | width="90%" | Show Buttons | |
− | + | |- | |
− | + | | colspan="2" | Controls if the adjustment buttons are shown on the scale arc or not. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Adjustment Value | |
− | + | |- | |
− | + | | colspan="2" | 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. | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections''' | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations''' | |
− | + | |- | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | A text label to help identify the display. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 16:22, 7 January 2022
Author | Matrix Ltd |
Version | 1.2 |
Category | Advanced Shapes |
Contents
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 Pack
MODELS
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable 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 |