优化最小画笔的鼠标指针显示

This commit is contained in:
zqm
2025-11-10 13:52:27 +08:00
parent cb05e95aef
commit f0f5793298

View File

@@ -1013,6 +1013,14 @@ namespace JoyD.Windows.CS
{
try
{
// 对于最小的画笔1像素使用更明显的笔形光标
if (size <= 1)
{
// 使用系统笔形光标,更加明显易见
return Cursors.Cross; // 或者可以尝试使用Cursors.IBeam或其他合适的光标
}
// 对于较大的画笔,创建与画笔大小一致的自定义光标
// 创建一个足够大的位图以容纳画笔大小
int cursorSize = Math.Max(size, 16); // 最小16x16
Bitmap cursorBitmap = new Bitmap(cursorSize, cursorSize);