Skip to content

Latest commit

 

History

History
99 lines (60 loc) · 1.99 KB

File metadata and controls

99 lines (60 loc) · 1.99 KB

Compass

Experimental

The compass component draws a compass, rotated to the current heading.

<component type="compass" size="250" />

07-compass-0.png

Positioning

Compass does not support x and y co-ordinates. Put compass inside a translate to move it around

<translate x="50" y="50">
<component type="compass" size="250"/>
</translate>

07-compass-1.png

Colours

Colours can be controlled with fg, bg and text attributes

<component type="compass" size="100" fg="128,128,128"/>

07-compass-2.png

<component type="compass" size="100" bg="128,128,128"/>

07-compass-3.png

<component type="compass" size="100" text="128,128,255"/>

07-compass-4.png

Fonts

Text size can be controlled with the textsize attribute

<component type="compass" size="100" textsize="8"/>

07-compass-5.png

<component type="compass" size="100" textsize="32"/>

07-compass-6.png

Transparency

By default the bg is fully transparent, but like the text component, the transparency of the fg, bg and text can be controlled with an alpha component in the colour.

<component type="text" size="64" rgb="255,255,0">Hello</component>
<component type="compass" size="256" textsize="32"/>

07-compass-7.png

<component type="text" size="64" rgb="255,255,0">Hello</component>
<component type="compass" size="256" textsize="32" bg="0,0,0,128"/>

07-compass-8.png

<component type="text" size="64" rgb="255,255,0">Hello</component>
<component type="compass" size="256" textsize="32" bg="0,0,0,128" text="0,255,255,128"/>

07-compass-9.png