Halcon图形绘制相关的函数也有很多细分,
这里我们介绍与用户交互绘制几何图形的函数。
可以发现,这些函数都是以DRAW_形式打头。
主要用于绘制几何图形,生成几何图形相关参数或区域。
利用这些参数我们可以手动生成测量标准,保存到磁盘,
供后期检测时做为参考标准加载。
介绍完这些函数后,我们也会简单看下这些函数在具体项目中的应用
这些函数有
drag_region1 drag_region2 drag_region3
draw_circle draw_circle_mod
draw_ellipse draw_ellipse_mod
draw_line draw_line_mod
draw_point draw_point_mod
draw_rectangle1 draw_rectangle1_mod
draw_rectangle2 draw_rectangle2_mod
draw_xld draw_xld_mod draw_polygon draw_region
draw_nurbs
draw_nurbs_mod
draw_nurbs-interp
draw_nurbs_interp_mod
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
read_image (Image, 'fabrik')
dev_display (Image)
*draw_circle (WindowHandle, Row, Column, Radius)
*draw_circle_mod (WindowHandle, Row, Column, Radius, Row1, Column1, Radius1)
*draw_ellipse (WindowHandle, Row2, Column2, Phi, Radius11, Radius2)
*draw_ellipse_mod (WindowHandle, Row2, Column2, Phi, Radius11, Radius2, Row3, Column3, Phi1, Radius12, Radius21)
*draw_line (WindowHandle, Row11, Column11, Row21, Column21)
*draw_line_mod (WindowHandle, Row11, Column11, Row21, Column21, Row12, Column12, Row22, Column22)
*draw_point (WindowHandle, Row4, Column4)
*draw_point_mod (WindowHandle, Row4, Column4, Row, Column)
*draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
*draw_rectangle1_mod (WindowHandle, Row1, Column1, Row2, Column2, Row11, Column11, Row21, Column21)
*draw_rectangle2 (WindowHandle, Row, Column, Phi, Length1, Length2)
*draw_rectangle2_mod (WindowHandle, Row, Column, Phi, Length1, Length2, Row1, Column1, Phi1, Length11, Length21)
*draw_xld (ContOut3, WindowHandle, 'true', 'true', 'true', 'true')
*draw_xld_mod(ContOut3, ContOut4, WindowHandle, 'true', 'true', 'true', 'true', 'false')
* draw_polygon (PolygonRegion, WindowHandle)
*draw_region (Region, WindowHandle)
draw_nurbs (ContOut, WindowHandle, 'true', 'true', 'true', 'true', 3, Rows, Cols, Weights)
draw_nurbs_mod (ContOut3, WindowHandle, 'true', 'true', 'true', 'true', 'true', 3, Rows, Cols, Weights, Rows3, Cols3, Weights1)
draw_nurbs_interp (ContOut1, WindowHandle, 'true', 'true', 'true', 'true', 3, ControlRows, ControlCols, Knots, Rows1, Cols1, Tangents)
draw_nurbs_interp_mod (ContOut2, WindowHandle, 'true', 'true', 'true', 'true', 'true', 3, ControlRows, ControlCols, Tangents, ControlRows1, ControlCols1, Knots1, Rows2, Cols2, Tangents1)
上边为视频教程部分内容,
可以下载下面的视频教程学习。
上位机VC MFC程序开发精典实例大全源码与视频讲解配套下载408例 经历1年的编程与录制点击进入查看
如果您认可,可联系功能定制! 如果您着急,充值会员可直接联系发您资料!
|