图形集合
一.点CogPointMarker
CogPointMarker PointMarker1 = new CogPointMarker();//创建对象,点CogPointMarker
//注意运行工具
PointMarker1.X = 100;
PointMarker1.Y = 100;//点坐标
PointMarker1.Color = CogColorConstants.Red;//点颜色设置
PointMarker1.LineWidthInScreenPixels = 20;//点大小设置
二.直线CogLine
CogLine Line1 = new CogLine();//创建对象,直线CogLine
Line1.X = 10;
Line1.Y = 10;//线坐标,也可以用 Line1.Rotation设置角度
Line1.Color = CogColorConstants.Red;//直线颜色设置
Line1.LineWidthInScreenPixels = 20;//直线宽度
三.矩形CogRectangle
CogRectangle Rectangle1 = new CogRectangle();//创建对象,矩形CogRectangle
Rectangle1.X = 200;
Rectangle1.Y = 100;//矩形坐标
Rectangle1.Width = 100;
Rectangle1.Height = 100;//矩形长宽,也可以用 Rectangle1.Rotation设置角度
Rectangle1.Color = CogColorConstants.Red;//颜色
Rectangle1.LineWidthInScreenPixels = 20;
四.圆形 CogCircle
CogCircle Circle1 = new CogCircle();创建对象,矩形CogRectangle
Circle1.CenterX = 192;
Circle1.CenterY = 100;//圆坐标
Circle1.Radius = 10;//圆半径
Circle1.Color = CogColorConstants.Red;//圆颜色
Circle1.LineWidthInScreenPixels = 20;//圆线宽度
五.多边形 CogPolygon
CogPolygon p = new CogPolygon();
p = mBlob.Results.GetBlobs()[i].GetBoundary();
p.Color = CogColorConstants.Red;
6. 图形基类 ICogGraphic
所有图形基于 ICogGraphic类
7.图形集合CogGraphicCollection
包含的对象类型为 ICogGraphic 所有图形对象 都可以直接放入集合中
多种图形添加 方式:
创建多个List<>
创建一个List<ICogGraphic >
创建一个CogGraphicCollection