mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Only draw two arrows if two arrows not collide with each other to avoid GDI related bug
This commit is contained in:
parent
2eab4f214d
commit
69d57b07bd
1 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using ShareX.HelpersLib;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
|
@ -63,7 +64,7 @@ protected override Pen CreatePen(Color borderColor, int borderSize)
|
|||
Pen pen = new Pen(borderColor, borderSize);
|
||||
pen.CustomEndCap = lineCap;
|
||||
|
||||
if (ArrowHeadsBothSide)
|
||||
if (ArrowHeadsBothSide && MathHelpers.Distance(StartPosition, EndPosition) > arrowHeight * borderSize * 2)
|
||||
{
|
||||
pen.CustomStartCap = lineCap;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue