Only draw white square to center pixel in magnifier if pixel is big enough

This commit is contained in:
Jaex 2016-07-27 05:05:38 +03:00
parent 35e0a826b6
commit 651d1601d0

View file

@ -726,7 +726,11 @@ private Bitmap Magnifier(Image img, Point position, int horizontalPixelCount, in
}
g.DrawRectangle(Pens.Black, (width - pixelSize) / 2 - 1, (height - pixelSize) / 2 - 1, pixelSize, pixelSize);
g.DrawRectangle(Pens.White, (width - pixelSize) / 2, (height - pixelSize) / 2, pixelSize - 2, pixelSize - 2);
if (pixelSize >= 6)
{
g.DrawRectangle(Pens.White, (width - pixelSize) / 2, (height - pixelSize) / 2, pixelSize - 2, pixelSize - 2);
}
}
return bmp;