Example #1
0
        private void RotateCoords()
        {
            double mDAngle = 0;

            mDAngle = 360 - (this.m_dAngle + this.m_dMapRotation);
            short i = 0;

            Utility.POINTAPI mCoords = new Utility.POINTAPI();
            for (i = 0; i <= 4; i = (short)(i + 1))
            {
                if (i != 2)
                {
                    mCoords            = this.m_coords[i];
                    this.m_coords[i].x = this.m_coords[2].x +
                                         Convert.ToInt32((double)(mCoords.x - this.m_coords[2].x) *
                                                         Math.Cos(Utility.Radians(mDAngle))) -
                                         Convert.ToInt32((double)(mCoords.y - this.m_coords[2].y) *
                                                         Math.Sin(Utility.Radians(mDAngle)));
                    this.m_coords[i].y = this.m_coords[2].y +
                                         Convert.ToInt32((double)(mCoords.x - this.m_coords[2].x) *
                                                         Math.Sin(Utility.Radians(mDAngle))) +
                                         Convert.ToInt32((double)(mCoords.y - this.m_coords[2].y) *
                                                         Math.Cos(Utility.Radians(mDAngle)));
                }
            }
        }
Example #2
0
 public static extern int Polygon(int hDC, ref Utility.POINTAPI lpPoint, int nCount);