Rt 小弟谢过

解决方案 »

  1.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=202254
      

  2.   

    void  CShowWnd::Rotate(CDC *pDC, int  degrees,  CRect  bounds)
    {  
        CPoint  origin(bounds.left  +  bounds.Width()/2,  bounds.top  +  bounds.Height()/2);  
        double  dRadians  =  degrees  /  180.00  *  3.14159265358979;      //  Go  through  the  final  rows  and  columns,  filling  in  the  data
        int stepx = 0, stepy = 0;
        for  (int  cols  =  bounds.left;  cols  <  bounds.right;  cols++)    
        {  
            for  (int  rows  =  bounds.top;  rows  <  bounds.bottom;  rows++)    
            {  
               POINT  before;  
               POINT  after;             after.x  =  cols;
               after.y  =  rows;           //  Calculate  the  original  x  and  y  
               int  x1  =  Round((after.x-origin.x)  *  cos(dRadians)  -  (after.y-origin.y)  *  sin(dRadians)  +  origin.x);
               int  y1  =  Round((after.y-origin.y)  *  cos(dRadians)  +  (after.x-origin.x)  *  sin(dRadians)  +  origin.y);
        
               // 平移
               x1 += 34;
               y1 += 34;           before.x  =  x1;
               before.y  =  y1;           if (wall_buf[cols][rows] == '1')
                   pDC->SetPixel(before,  RGB(57, 109, 165));
               else if (wall_buf[cols][rows] == '2')
                   pDC->SetPixel(before,  RGB(255, 0, 0));
               else if (wall_buf[cols][rows] == '3')
                   pDC->SetPixel(before,  RGB(0, 0, 0));
            }
        }
    }旋转后这个矩形每一行都会间隔出现空点
      

  3.   

    syy64(太平洋)
    大哥图片发不上来太郁闷了哎
    弄不好我晕死
      

  4.   

    每一行空一个点就会出现 要不大哥我把程序给你你看下吧 特别的郁闷
    能留email或msn,qq吗?
      

  5.   

    在解决不了我好在csdn上表演裸奔了 555555
      

  6.   

    哦 我今天也在想是精度问题, 不是90度或倍数 cos 的值有小数点 就不准确
      

  7.   

    mousubin(msb)   大哥查收