**
visionpro cogRecordDisplay十字显示
**
如图所示
代码如下
public static void Fcd(int width, int height, ref CogRecordDisplay crd)
{
try
{
if (crd != null)
{
ICogImage image = crd.Image;
if (image == null)
{
image = new CogImage8Grey(width, height);
}
if (image != null)
{
int cw = image.Width / 2;
int ch = image.Height / 2;
double cx, cy;
image.GetTransform(".", "@").MapPoint(cw, ch, out cx, out cy);
CogPointMarker lt = new CogPointMarker();
lt.Color = CogColorConstants.Red;
lt.SetCenterRotationSize(cx, cy, 0, 2500);
crd.Image = image;
crd.StaticGraphics.Clear();
crd.StaticGraphics.Add( lt, " lt");
crd.Fit();
}
}
}
catch
{
}
}