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