@All, guys, this feature is already here, it's undocumented and it works by abusing the fact that Alt / F10 pauses the application and focus the menu.
1. Mouse-over with the tool - pencil, brush, eraser, gradient, recolor or whatever at - the beginning point.
2. Press Alt to lock the cursor in this position. ruler will confirm.
3. Move the mouse over the endpoint!
4. Left or right click to un-pause the app. This will generate nice line.
Disable Fluid mouse input if this method generates curves instead.
Happy lining and polygoning
@Paint.Net guys, please don't fix this bug since it's a hidden feature. Better, document it