修复温差图画框逻辑:设置线径为1并优化初始框大小设置

This commit is contained in:
zqm
2025-11-10 16:56:58 +08:00
parent 18c5fdf30b
commit 003748c978

View File

@@ -650,7 +650,10 @@ namespace JoyD.Windows.CS
} }
// 获取相对于图像的坐标作为矩形起始点 // 获取相对于图像的坐标作为矩形起始点
_rectangleStartPoint = ControlPointToImagePoint(e.Location); Point imagePoint = ControlPointToImagePoint(e.Location);
// 按下鼠标时初始框大小即为笔块大小
_rectangleStartPoint = imagePoint;
_isDrawingRectangle = true; _isDrawingRectangle = true;
return; return;
} }
@@ -1350,8 +1353,8 @@ namespace JoyD.Windows.CS
// 绘制填充矩形 // 绘制填充矩形
g.FillRectangle(new SolidBrush(fillColor), rect); g.FillRectangle(new SolidBrush(fillColor), rect);
// 绘制矩形边框 // 绘制矩形边框线径固定为1以更精确控制绘制逻辑
using (Pen pen = new Pen(selectedColor, _currentBrushSize)) using (Pen pen = new Pen(selectedColor, 1))
{ {
g.DrawRectangle(pen, rect); g.DrawRectangle(pen, rect);
} }