示例#1
0
        public static IPath MakeTextPath(IPath pPath, double length)
        {
            try
            {
                double angle = GetAngle(pPath);
                IPoint pPt = pPath.ToPoint;
                IConstructPoint pCP = new PointClass();
                double PI = 3.1415926535897;
                double rad = angle * PI / 180;
                pCP.ConstructAngleDistance(pPt, rad, 1);
                IPoint pNew = pCP as IPoint;

                IPath pNewPath = new PathClass();
                pNewPath.FromPoint = pPt;
                pNewPath.ToPoint = pNew;
                if (ShouldFlip(angle))
                {
                    pNewPath.ReverseOrientation();
                }
                return pNewPath;
            }
            catch (Exception eX)
            {
                MessageBox.Show(eX.Message);
                return null;
            }
        }