采集卡bug修复

This commit is contained in:
Ray
2025-10-29 17:10:32 +08:00
parent c6ccf2052f
commit ac686997d1

View File

@@ -316,6 +316,32 @@ class PreviewWindow:
canvas.create_text(x, y, text=text, fill=color, font=('Arial', 10)) canvas.create_text(x, y, text=text, fill=color, font=('Arial', 10))
except Exception as e: except Exception as e:
print(f"绘制文本错误: {e}") print(f"绘制文本错误: {e}")
# 绘制分割线,区分不同的采集卡窗口
try:
# 绘制垂直分割线(列之间的分割线)
for col in range(1, columns):
x = col * cell_width
canvas.create_line(
x, 0,
x, canvas_height,
fill='white',
width=2,
dash=(5, 5) # 虚线效果,让分割线更明显
)
# 绘制水平分割线(行之间的分割线)
for row in range(1, rows):
y = row * cell_height
canvas.create_line(
0, y,
canvas_width, y,
fill='white',
width=2,
dash=(5, 5) # 虚线效果
)
except Exception as e:
print(f"绘制分割线错误: {e}")
except Exception as e: except Exception as e:
print(f"更新帧错误: {e}") print(f"更新帧错误: {e}")