Jump to content

Feature Request: Add support for straight lines


Go to solution Solved by Rick Brewster,

Recommended Posts

Currently in paint.net there is no way to adjust a line to keep it straight. Let me explain with a short use-case.

 

Let's say I want to draw a ladder, I've got some parts done, what's left is just one straight line:

ladder1.png.bb541d4e8c506e5734d74f39e87ee31f.png

Then, I add it:

ladder2.png.304a2e475a4ce69a838f3d73c0abb273.png

But—I've overshot it—oh no!

So I zoom in to see exactly where I need to put it:

ladder3.png.04b1ae1a6a82935136c3f7dfb3f45239.png

Aha! Fixed! But wait—

ladder4.png.4a8fa35e58b39d40f3629b8a2ad073eb.png

The line is not straight anymore!

 

What I expect to make is:

ladder_expected.png.bebb98fcc5d371ab10223bbc031363aa.png

But currently, (let's say on wide (or any other) image files, where you cannot accurately place both start and end points) there is no possibility to adjust straight line start and end points.

 

If I'm not mistaken, this was supported a while (8-15 years) ago, but recently it's gone. It's so strange that there is currently no possibility to do this.

I don't know how it could work, but the simplest (personally intuitive) solution would have straight lines as an option in the line tool.

simple_line_tool.png.854c5b6112a912841a6e104620820f35.png

Another solution would be to hold a button (alt? shift? ctrl?) while dragging one of the two endpoints, but this would be hard to discover and hidden.

 

Maybe I'm missing something? Maybe there's currently a way to adjust straight lines, but I'm unaware of it?

Edited by pauliux00
Link to comment
Share on other sites

2 hours ago, pauliux00 said:

Maybe I'm missing something? Maybe there's currently a way to adjust straight lines, but I'm unaware of it?

 

 

recently I needed a straight line. I drafted a rectangle, adjusting TL and TR to where I had to go (rotation, drag, move), and made its width small. Another way is to erase three sides of it, but the smally variant is possible, and better.

  • Like 1
Link to comment
Share on other sites

  • Solution

simple_line_tool.png.854c5b6112a912841a6e104620820f35.png

 

This is pretty much what I'd do. I originally planned to have this in the 4.0 release but just ran out of time/energy (it was already a 5 year project). The complexity, iirc, came when you switched between the line vs. curve formats. Where do the nubs go when switching to a curve, modifying the handles, then back to line, modifying it, then back to curve? I just didn't have the runway to deal with that at the time.

 

I do have an issue to track this for the 4.4.x series of releases.

  • Like 4
  • Upvote 1

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

18 hours ago, ardneh said:

If the line is on its own layer it can be easily trimmed with the Eraser tool or Selection / Delete.

if one has enough time to do it pixelwise, and there is the fight against anti-aliasing....

 My rectangles are on that layer (own) already

Link to comment
Share on other sites

On 2/18/2022 at 4:46 PM, Rick Brewster said:

simple_line_tool.png.854c5b6112a912841a6e104620820f35.png

 

This is pretty much what I'd do. I originally planned to have this in the 4.0 release but just ran out of time/energy (it was already a 5 year project). The complexity, iirc, came when you switched between the line vs. curve formats. Where do the nubs go when switching to a curve, modifying the handles, then back to line, modifying it, then back to curve?

 

The middle nubs go to the straight line and stay there at the thirds, and remain internally moved at the thirds, when switching to the straight line, and go grey, or disappear. When switching from a straight line to a curve, the middle nubs stay, go black, become freely movable, or appear at the thirds. When Undoing in the history, it is Undo. Internal Disappear and Appear is less preferable (not really an option), from a programmers point of view, than internally fixed, versus free move. Visible Disappear and Appear is an option, of course, instead of going grey.

 

When just one single middle Nub is clicked (perhaps dragged) with some Modifier key (shift), it goes back to the straight line between the two end points (to fix a misplaced middle nub to a well known place). The end points do stay anyway, don't they? When an end point is dragged with a modifier key (shift), the aligment concerns the end points, this endpoint related to the other. It is interface handling (except fixing middle nubs at the thirds, this is new), and not drawing algorithm. Would that sound sane?

 

When we are in the rotate zone (or right drag to rotate), it is rotate. The rotate anchor is initially in the middle. (the rotate anchor is new, as the rotate zone). There could even be a selection rectangle around the Line/Curve while it is in the drawing layer. (Or a modifier for proportional stretching.) That would be new too, but not completely.

Edited by Peter1
right mouse button drag is already rotate
Link to comment
Share on other sites

  • 10 months later...

Issue still persists on paint.net 5.0 (β 5.0.8395.39754). There's a possibility to draw 3 straight lines with the new tool, but what if you want a straight line from A to B? what if you do a small correction on point B? The line becomes not a line A->B, but two lines A->C->B! Or even three if you do a small correction on A!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...