Skip to content

Latest commit

 

History

History
148 lines (88 loc) · 4.01 KB

File metadata and controls

148 lines (88 loc) · 4.01 KB

Cairo Gauge Marker

Requires Cairo to be installed

Shows a simple gauge, with a marker at the end, which gauges some metric.

Any supported metric or unit can be used

<component type="cairo-gauge-marker" metric="speed" units="mph" />

06-cairo-gauge-marker-0.png

Max and Min Values

Use max and min to set maximum and minimum values.

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" />

06-cairo-gauge-marker-1.png

Rotation and Length

The gauge by default starts at the right, this can be changed using start, which is the number of degrees to rotate clockwise

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" start="90"/>

06-cairo-gauge-marker-2.png

The gauge is normally 270 degrees "long". This can be changed using length

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" length="90" />

06-cairo-gauge-marker-3.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" length="180" />

06-cairo-gauge-marker-4.png

Number of Ticks / Sectors

There are 6 sectors by default. This can be changed with sectors

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" length="90" sectors="2" />

06-cairo-gauge-marker-5.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" length="180" sectors="3" />

06-cairo-gauge-marker-6.png

Colours

Various colours can be set, either as RGB, or RGBA values.

The following are available to change: tick-rgb, background-rgb, gauge-rgb, dot-outer-rgb, dot-inner-rgb

Changing the tick-colour will change the background colour so to get the desired effect it may be worth specifying both.

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" tick-rgb="255,0,0"/>

06-cairo-gauge-marker-7.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" background-rgb="255,0,0,100"/>

06-cairo-gauge-marker-8.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" gauge-rgb="255,0,0" />

06-cairo-gauge-marker-9.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" dot-outer-rgb="255,0,0" />

06-cairo-gauge-marker-10.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" dot-inner-rgb="255,0,0,128" />

06-cairo-gauge-marker-11.png

Transparency

Any colour that is completely transparent will disappear... this can be used to change the appearance of the widget quite a bit.

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" background-rgb="0,0,0,0"/>

06-cairo-gauge-marker-12.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" tick-rgb="0,0,0,0"/>

06-cairo-gauge-marker-13.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" gauge-rgb="0,0,0,0"/>

06-cairo-gauge-marker-14.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" dot-inner-rgb="0,0,0,0"/>

06-cairo-gauge-marker-15.png

<component type="cairo-gauge-marker" metric="speed" units="mph" max="3" dot-outer-rgb="0,0,0,0"/>

06-cairo-gauge-marker-16.png