【IMAQ】imaqDrawLineOnImage() 划线

函数:

int = imaqDrawLineOnImage(Image* dest, const Image* source, DrawMode mode, Point start, Point end, float newPixelValue)

参数:

dest:输出图像
source:输入图像
DrawMode mode:该函数用于绘制直线的方法。可以为 IMAQ_DRAW_VALUE 或 IMAQ_DRAW_INVERT 。
start:线的起点坐标
end:线的终点坐标
newPixelValue:如果将 mode 设置为 IMAQ_DRAW_VALUE ,则 newPixelValue 设置函数绘制直线时的像素值。如果设置 mode 为 IMAQ_DRAW_INVERT ,该函数将忽略此参数。

DrawMode:

typedef enum DrawMode_enum {
    IMAQ_DRAW_VALUE      = 0,    // Draws the boundary of the object with the specified pixel value.
    IMAQ_DRAW_INVERT     = 2,    // Inverts the pixel values of the boundary of the object.
    IMAQ_PAINT_VALUE     = 1,    // Fills the object with the given pixel value.
    IMAQ_PAINT_INVERT    = 3,    // Inverts the pixel values of the object.
    IMAQ_HIGHLIGHT_VALUE = 4,    // The function fills the object by highlighting the enclosed pixels with the color of the object.
    IMAQ_DRAW_MODE_SIZE_GUARD = 0xFFFFFFFF
} DrawMode;

作用:

在图片中的指定位置划线。

示例:

startPoint.x = leftMargin[h][w];
startPoint.y = topMargin[h][w]; 
endPoint.x = leftMargin[h][w];
endPoint.y = bottomMargin[h][w];
imaqDrawLineOnImage(srcImage, srcImage, IMAQ_DRAW_VALUE, startPoint, endPoint, 0.0);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不雨_亦潇潇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值