svg:text の配置で,横方向の指定(text-anchor=”middle”)はあるが,縦方向はなさそうだったので…
if (fabs(incX) > 1e-7 || fabs(incY) > 1e-7) {
CString moveStr = _T(“translate(“)+ToString(pnt.x)+_T(“,”)+ToString(pnt.y)+_T(“)\t”) ;
CString rot_Str ;
CString skewStr ;
if (fabs(incX) > 1e-7) {
rot_Str = _T(“rotate(“)+ToString(0-incX)+_T(“,0,0)\t”) ;
}
if (fabs(incY) > 1e-7) {
skewStr = _T(“skewX(“) + ToString(0+incY) + _T(“)\t”) ;
}
CString vAlign ;
{
P2 move = P2(0,0+txH.GetHeight()/3) ;
vAlign = _T(“translate(“) + ToString(move.x) + _T(“,“) + ToString(move.y) + _T(“)\t”) ;
}
th.AddAttribute (_T(“transform”), moveStr + rot_Str + skewStr + vAlign ) ;
}
else {
th.AddAttribute (_T(“x”), ::ToString(pnt.x)) ;
th.AddAttribute (_T(“y”), ::ToString(pnt.y+txH.GetHeight()/3)) ;
}