StringFormat format;
format.SetAlignment(StringAlignmentCenter);
format.SetLineAlignment(StringAlignmentNear);
Gdiplus::Font clrFont(L"Arial",65,FontStyleRegular,UnitPixel );
SolidBrush blackBrush(Color(255, 0, 0, 0));
RectF rcText(PointF(rcBounds.left-m_fSideWidth*cxInch*0.9,rcBounds.top+nw+txtSize/2),SizeF(txtSize,txtSize));
PointF txtPoint[4]={
PointF(rcText.GetLeft(),rcText.GetTop()),
PointF(rcText.GetRight(),rcText.GetTop()),
PointF(rcText.GetLeft(),rcText.GetBottom()),
PointF(rcText.GetRight(),rcText.GetBottom())
};
graph.RotateTransform(REAL(-90)); // 旋转 角度
graph.TransformPoints(CoordinateSpaceWorld,CoordinateSpacePage,txtPoint,4);//求旋转后的位置
RectF rcTrText(txtPoint[0],SizeF(txtSize,txtSize));
graph.DrawString(IntToStr(nw/cxInch),-1,&clrFont,rcTrText,&format,&blackBrush);
graph.ResetTransform();