=========================
Author: Thomas Geymayer <admin@tomprogs.at>
-Revision: 2012/05/04
+Revision: 2012/05/18
Introduction
------------
A new canvas can be instantiated by creating a node /canvas/texture[<INDEX>]
with at least the following children:
- <size-x type="int"> The width of the underlying texture
- <size-y type="int"> The height of the underlying texture
+ <size n="0" type="int"> The width of the underlying texture
+ <size n="1" type="int"> The height of the underlying texture
- <view-width type="int"> The width of the canvas
- <view-height type="int"> The height of the canvas
+ <view n="0" type="int"> The width of the canvas
+ <view n="1" type="int"> The height of the canvas
The dimensions of the canvas are needed to be able to use textures with
different resolutions but use the same units for rendering to the canvas.
<red type="float">
<green type="float">
<blue type="float">
+ <alpha type="float">
</NAME>
* Text:
2. aircraft-dir
3. $FG_DATA/Fonts
4. Default osg font paths
- <size type="float"> The font size (default: 32)
+ <character-size type="float"> The font size (default: 32)
+ <character-aspect-ratio type="float"> Ratio between character height and width
+ (default: 1)
<tf> A 3x3 transformation matrix specified by 6 values
- (child elements <a>, ..., <f>) See
+ (child elements <m n="0">, ..., <m n="5"> which equal to a,
+ ...,f used in the SVG standard) See
http://www.w3.org/TR/SVG/coords.html#TransformMatrixDefined
for details.
You can also use shortcuts and use an alternative to
specifying six values:
- - Translation: <tx>, <ty> (ty, ty default to 0)
- - Totation: <rot>
- - Scale: <sx>, <sy> (sx is required, sy defaults to sx)
+ - Translation: <t n="0">, <t n="1"> (both default to 0)
+ - Rotation: <rot>
+ - Scale: <s n="0">, <s n="1"> (s[0] is required, s[1]
+ defaults to s[0])
<alginment type="string"> Text alignment (default: "left-baseline") One of:
"left-top"
<canvas>
<texture>
- <size-x type="int">384</size-x>
- <size-y type="int">512</size-y>
- <view-width type="int">768</view-width>
- <view-height type="int">1024</view-height>
+ <size n="0" type="int">384</size-x>
+ <size n="1" type="int">512</size-y>
+ <view n="0" type="int">768</view-width>
+ <view n="1" type="int">1024</view-height>
<mipmapping type="bool">false</mipmapping>
<coverage-samples type="int">0</coverage-samples>
<color-samples type="int">0</color-samples>
+ <color-background>
+ <red type="float">0</red>
+ <green type="float">0.02</green>
+ <blue type="float">0</blue>
+ <alpha type="float">1</alpha>
+ </color-background>
<group>
<text>
<text type="string">TEST MESSAGE</text>
<font type="string">helvetica_bold.txf</font>
+ <character-size type="float">40</character-size>
<tf>
<!-- Translate (18|50) -->
<tx>18</tx>