修复温差图绘制方形与光标块不对齐问题,将方形绘制从居中对齐改为左上角对齐
This commit is contained in:
@@ -2899,8 +2899,8 @@ namespace JoyD.Windows.CS
|
||||
}
|
||||
|
||||
// 绘制擦除区域(方形)
|
||||
int halfSize = adjustedBrushSize / 2;
|
||||
g.FillRectangle(Brushes.Transparent, imagePoint.X - halfSize, imagePoint.Y - halfSize, adjustedBrushSize, adjustedBrushSize);
|
||||
// 确保与光标块左上角对齐
|
||||
g.FillRectangle(Brushes.Transparent, imagePoint.X, imagePoint.Y, adjustedBrushSize, adjustedBrushSize);
|
||||
|
||||
// 恢复CompositingMode为默认值
|
||||
g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
|
||||
@@ -2944,10 +2944,10 @@ namespace JoyD.Windows.CS
|
||||
}
|
||||
|
||||
// 绘制区域(方形)
|
||||
int halfSize = adjustedBrushSize / 2;
|
||||
// 确保与光标块左上角对齐
|
||||
using (SolidBrush brush = new SolidBrush(selectedColor))
|
||||
{
|
||||
g.FillRectangle(brush, imagePoint.X - halfSize, imagePoint.Y - halfSize, adjustedBrushSize, adjustedBrushSize);
|
||||
g.FillRectangle(brush, imagePoint.X, imagePoint.Y, adjustedBrushSize, adjustedBrushSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user