<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"
switch( _transform_types[i] )
{
case TT_MATRIX:
- tf = osg::Matrix( tf_node->getDoubleValue("a", 1),
- tf_node->getDoubleValue("b", 0), 0, 0,
+ tf = osg::Matrix( tf_node->getDoubleValue("m[0]", 1),
+ tf_node->getDoubleValue("m[1]", 0), 0, 0,
- tf_node->getDoubleValue("c", 0),
- tf_node->getDoubleValue("d", 1), 0, 0,
+ tf_node->getDoubleValue("m[2]", 0),
+ tf_node->getDoubleValue("m[3]", 1), 0, 0,
0, 0, 1, 0,
- tf_node->getDoubleValue("e", 0),
- tf_node->getDoubleValue("f", 0), 0, 1 );
+ tf_node->getDoubleValue("m[4]", 0),
+ tf_node->getDoubleValue("m[5]", 0), 0, 1 );
break;
case TT_TRANSLATE:
- tf.makeTranslate( osg::Vec3f( tf_node->getDoubleValue("tx", 0),
- tf_node->getDoubleValue("ty", 0),
+ tf.makeTranslate( osg::Vec3f( tf_node->getDoubleValue("t[0]", 0),
+ tf_node->getDoubleValue("t[1]", 0),
0 ) );
break;
case TT_ROTATE:
break;
case TT_SCALE:
{
- float sx = tf_node->getDoubleValue("sx", 1);
+ float sx = tf_node->getDoubleValue("s[0]", 1);
// sy defaults to sx...
- tf.makeScale( sx, tf_node->getDoubleValue("sy", sx), 1 );
+ tf.makeScale( sx, tf_node->getDoubleValue("s[1]", sx), 1 );
break;
}
default:
TransformType& type = _transform_types[parent->getIndex()];
- if( name == "a" || name == "b" || name == "c"
- || name == "d" || name == "e" || name == "f" )
+ if( name == "m" )
type = TT_MATRIX;
- else if( name == "tx" || name == "ty" )
+ else if( name == "t" )
type = TT_TRANSLATE;
else if( name == "rot" )
type = TT_ROTATE;
- else if( name == "sx" || name == "sy" )
+ else if( name == "s" )
type = TT_SCALE;
else
SG_LOG