10-20-压路机路线(二)画图
1. paint函数,void CDemo_ShowRouteDlg::paint(CPoint point,double i_Scale,int i_num)。调用:paint(Point_Bitmap,i_scale,2); 2.CPoint类。见百度百科。 3.CPaintDC。当前窗口作图。https://blog.csdn.net/liuy_yy/article/details/7192567 4.CRect。矩形类,见百度百科 5.GetClientRect(&rect); ?该函数获取窗口客户区的大小。 6.第一个点在左侧中间,第二个点在右侧中间,第三个点在上部中间,第四个点在下部中间 CPoint oPt1; oPt1.x=30 - 3; oPt1.y=20 + ylong / 2; CPoint xPt1; xPt1.x=30 + xlong + 3; xPt1.y=20 + ylong / 2; CPoint yPt1; yPt1.x=30 + xlong / 2; yPt1.y=20 - 3; CPoint yPt2; yPt2.x=30 + xlong / 2; yPt2.y=20 + ylong + 3;
7.Pen pen(Color(50,80,40,40),20.0f);(分别是颜色,宽度)其中color的四个参数如下: static ARGB MakeARGB(IN BYTE a,IN BYTE r,IN BYTE g,IN BYTE b) { return (((ARGB) (b) << BlueShift) | ((ARGB) (g) << GreenShift) | ((ARGB) (r) << RedShift) | ((ARGB) (a) << AlphaShift)); } class PointF { public: PointF() { X = Y = 0.0f; } 11.Bitmap位图数据。 12.Graphics https://blog.csdn.net/hireboy/article/details/8989997 13.Direction(m_PrePoint,CenterPoint,pp); 原函数:PointF* CDemo_ShowRouteDlg::Direction(PointF p0,PointF p1,PointF* point) 14.memDC.FillPolygon(&b_Brush,pp,4); 填充多边形 15.DrawImage 16.Invalidate( )?:使整个窗口客户区无效,并进行更新显示的函数 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |