mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-03 19:54:13 +13:00
Fix line, arrow anti aliasing issue when doing horizontal or vertical lines
This commit is contained in:
parent
84b25135fb
commit
3132461219
2 changed files with 6 additions and 4 deletions
|
@ -47,12 +47,18 @@ public override void OnDraw(Graphics g)
|
||||||
{
|
{
|
||||||
g.SmoothingMode = SmoothingMode.HighQuality;
|
g.SmoothingMode = SmoothingMode.HighQuality;
|
||||||
|
|
||||||
|
if (BorderSize.IsEvenNumber())
|
||||||
|
{
|
||||||
|
g.PixelOffsetMode = PixelOffsetMode.Half;
|
||||||
|
}
|
||||||
|
|
||||||
using (Pen pen = new Pen(BorderColor, BorderSize))
|
using (Pen pen = new Pen(BorderColor, BorderSize))
|
||||||
{
|
{
|
||||||
DrawLine(g, pen);
|
DrawLine(g, pen);
|
||||||
}
|
}
|
||||||
|
|
||||||
g.SmoothingMode = SmoothingMode.None;
|
g.SmoothingMode = SmoothingMode.None;
|
||||||
|
g.PixelOffsetMode = PixelOffsetMode.Default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,6 @@ You should have received a copy of the GNU General Public License
|
||||||
|
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
using ShareX.HelpersLib;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
|
|
||||||
namespace ShareX.ScreenCaptureLib
|
namespace ShareX.ScreenCaptureLib
|
||||||
{
|
{
|
||||||
public class RoundedRectangleDrawingShape : RectangleDrawingShape
|
public class RoundedRectangleDrawingShape : RectangleDrawingShape
|
||||||
|
|
Loading…
Reference in a new issue