mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Workaround for draw rectangle bug
This commit is contained in:
parent
f7a870b2d7
commit
f983bae51f
1 changed files with 5 additions and 2 deletions
|
@ -31,10 +31,13 @@ namespace HelpersLib
|
|||
public static class GraphicsExtensions
|
||||
{
|
||||
public static void DrawRectangleProper(this Graphics g, Pen pen, Rectangle rect)
|
||||
{
|
||||
if ((int)pen.Width == 1)
|
||||
{
|
||||
rect = rect.SizeOffset(-1);
|
||||
}
|
||||
|
||||
if (rect.Width > 1 && rect.Height > 1)
|
||||
if (rect.Width > 0 && rect.Height > 0)
|
||||
{
|
||||
g.DrawRectangle(pen, rect);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue