本帖最后由 去0564 于 2023-7-14 17:42 编辑
- //遍历轮廓数组
- GetContourXld(SelectedXLD, &Rows, &Cols);
- QVector<QPointF> pos;
- for (int i = 0; i < Rows.Length(); i++)
- {
- pos.append(QPointF(Cols[i], Rows[i]));
- }
- //绘图
- QImage image = QImage(int(width), int(height), QImage::Format_ARGB32);
- image.fill(qRgba(0, 0, 0, 0));//填充图片
- for (auto &i : pos)
- {
- image.setPixelColor(i.rx(), i.ry(), QColor(0, 255, 0, 255));
- }
复制代码
|