FreehandSensitivity = 0 breaks editor when I try to draw a dot with freehand

Description

I need an ability to draw a dot, but smoothing don't allow it. So I tried to turn it of and editor crashed

Error:
Software version: 1.3.229 - 82fa94f566 (64 bit)
.NET runtime version: 4.0.30319.42000+
Time: 2022-03-23 12:33:22 +10:00
OS: Windows 10 2009 x64 build 19042
GDI object count: 101
User object count: 61

Exception: System.OutOfMemoryException
Message: Out of memory.

Stack:
at System.Drawing.Drawing2D.GraphicsPath.Widen(Pen pen, Matrix matrix, Single flatness)
at Greenshot.Editor.Drawing.FreehandContainer.DrawSelectionBorder(Graphics graphics, Pen linePen, GraphicsPath path) in D:\a\1\s\src\Greenshot.Editor\Drawing\FreehandContainer.cs:line 246
at Greenshot.Editor.Drawing.FreehandContainer.Draw(Graphics graphics, RenderMode renderMode) in D:\a\1\s\src\Greenshot.Editor\Drawing\FreehandContainer.cs:line 225
at Greenshot.Editor.Drawing.DrawableContainer.DrawContent(Graphics graphics, Bitmap bmp, RenderMode renderMode, Rectangle clipRectangle) in D:\a\1\s\src\Greenshot.Editor\Drawing\DrawableContainer.cs:line 431
at Greenshot.Editor.Drawing.DrawableContainerList.Draw(Graphics g, Bitmap bitmap, RenderMode renderMode, Rectangle clipRectangle) in D:\a\1\s\src\Greenshot.Editor\Drawing\DrawableContainerList.cs:line 320
at Greenshot.Editor.Drawing.Surface.SurfacePaint(Object sender, PaintEventArgs paintEventArgs) in D:\a\1\s\src\Greenshot.Editor\Drawing\Surface.cs:line 1576
at System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Configuration dump:

Environment

None

Attachments

2

Activity

Show:

john brown March 24, 2022 at 8:39 AM

I take screenshots of market charts and trades and I need to mark certain points of interest. I like greenshot but to draw a dot I have to drag the cursor instead of just point and click. It’s just frustrating. I guess you can get used to it but it’s just feels weird and looks not so great.

Robin Krom March 24, 2022 at 6:06 AM

Can you describe your use case in a bit more details, what you like to do and why?

john brown March 23, 2022 at 11:33 PM

I completely agree that modifying INI and expecting it to work is wrong, But a really needed an ability to just click to draw instead of dragging, Probably needed to post that in feature thread, Sorry about that. But it would be really nice if you allow to draw dots. Thanks

Robin Krom March 23, 2022 at 8:47 AM

I’ve added validation on it for 1.3.

But still, there is no UI for that setting, if you are starting to play around with modifying the values in the INI we cannot support that. You can make a lot of other stuff break.

Solution: Do not put it on anything lower than 1, or higher than 2147483647 (which really doesn’t make sense).

Closing this.

Done

Details

Assignee

Reporter

Components

Priority

Created March 23, 2022 at 3:14 AM
Updated March 24, 2022 at 8:39 AM
Resolved March 23, 2022 at 8:47 AM