绘制直线 - DrawGuiLine
函数简介
创建直线绘制对象,支持线宽设置。
接口名称
DrawGuiLine
DLL调用
int64_t DrawGuiLine(int64_t instance, int32_t x1, int32_t y1, int32_t x2,
int32_t y2, double lineThickness);
参数说明
参数名 | 类型 | 说明 |
---|---|---|
instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
x1 | 整数型 | 起点X。 |
y1 | 整数型 | 起点Y。 |
x2 | 整数型 | 终点X。 |
y2 | 整数型 | 终点Y。 |
lineThickness | 双精度型 | 线宽(像素)。 |
示例
int64_t ola = CreateCOLAPlugInterFace();
int64_t l = DrawGuiLine(ola, 50, 50, 300, 50, 2.0);
// ...
DestroyCOLAPlugInterFace(ola);
返回值
对象句柄,失败返回0。