Skip to content

Latest commit

 

History

History
109 lines (68 loc) · 2.51 KB

File metadata and controls

109 lines (68 loc) · 2.51 KB

Compass

Experimental

The compass-arrow component draws a simple compass, with a needle pointing in the current direction

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

07-compass-arrow-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-arrow" size="250"/>
</translate>

07-compass-arrow-1.png

Colours

Colours can be controlled with bg, text, arrow, outline and arrow-outline attributes

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

07-compass-arrow-2.png

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

07-compass-arrow-3.png

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

07-compass-arrow-4.png

<component type="compass-arrow" size="100" outline="128,128,255"/>

07-compass-arrow-5.png

<component type="compass-arrow" size="100" arrow-outline="128,128,255"/>

07-compass-arrow-6.png

Fonts

Text size can be controlled with the textsize attribute

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

07-compass-arrow-7.png

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

07-compass-arrow-8.png

Transparency

By default the bg is fully transparent, but like the text component, the transparency of the 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-arrow" size="256" textsize="32"/>

07-compass-arrow-9.png

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

07-compass-arrow-10.png

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

07-compass-arrow-11.png