加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

10-20-压路机路线(二)画图

发布时间:2020-12-14 04:18:09 所属栏目:大数据 来源:网络整理
导读: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。矩

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));
    }
8.SolidBrush b_Brush(Color(50,20,30));创建固体刷
9.GraphicsPath  绘图路径  https://docs.microsoft.com/zh-cn/dotnet/api/system.drawing.drawing2d.graphicspath.-ctor?redirectedfrom=MSDN&view=netframework-4.7.2#System_Drawing_Drawing2D_GraphicsPath__ctor
10.PointF CenterPoint; ? ?//三角形中心点。浮点型的点
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( )?:使整个窗口客户区无效,并进行更新显示的函数

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读