标签:
CAD注记旋转方向用的是弧度;
GIS注记旋转方向用的是角度;
二者使用需要转换。
示例过程:
IAnnotationFeature pAnnoFeature = pFeature as IAnnotationFeature; ITextElement pTextElement = pAnnoFeature.Annotation as ITextElement; string pAnnoText = pTextElement.Text; double pAnnoSize = pTextElement.Symbol.Size; double pAnnoAngle = pTextElement.Symbol.Angle;
double[] pCenterPoint=new double[3]; pCenterPoint[0] = (pElement.Geometry.Envelope.XMin + pElement.Geometry.Envelope.XMax)/2; pCenterPoint[1] = (pElement.Geometry.Envelope.YMin + pElement.Geometry.Envelope.YMax) / 2; pCenterPoint[2] = 0; AcadText pAcadText = CadModelSpace.AddText(pAnnoText, pCenterPoint, textHeight);
double anlgeReal = pAnnoAngle * Math.PI / 180; pAcadText.Rotate(pCenterPoint, anlgeReal);
标签:
原文地址:http://www.cnblogs.com/GISRSMAN/p/4554547.html