{
TextH txH = parts1.GetTextH (thIndex) ;
P3 pnt = parts1.GetPTextH(thIndex) ;
XmlOut_E th(_T(“text”),txH.GetText()) ;
{
th.AddAttribute (_T(“text-anchor”), _T(“middle”) ) ;
th.AddAttribute (_T(“font-size”), ::ToString(txH.GetHeight())) ;
}
if (fabs(txH.GetIncX()) > 1e-7 || fabs(txH.GetIncY()) > 1e-7) {
CString moveStr = _T(“translate(“) + ToString(pnt.x) + _T(“,”) + ToString(pnt.y) + _T(“)\t”) ;
CString rot_Str ;
CString skewStr ;
if (fabs(txH.GetIncX()) > 1e-7) {
rot_Str = _T(“rotate(“) + ToString(0-txH.GetIncX()) + _T(“,0,0)\t”) ;
}
if (fabs(txH.GetIncY()) > 1e-7) {
skewStr = _T(“skewX(“) + ToString(0+txH.GetIncY()) + _T(“)\t”) ;
}
th.AddAttribute (_T(“transform”), moveStr + rot_Str + skewStr ) ;
}
else {
th.AddAttribute (_T(“x”), ::ToString(pnt.x)) ;
th.AddAttribute (_T(“y”), ::ToString(pnt.y)) ;
}
g.AddChild(th) ;
}
translate で回転の位置に動かし,
rotate で文字列を回転
skewX で文字を傾ける