RSS/Atom feed Twitter
Site is read-only, email is disabled

Path Tool enhancement

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

6 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

Path Tool enhancement A 21 Jan 07:36
  Path Tool enhancement Simon Budig 22 Jan 22:51
Path Tool enhancement Saul Goode 21 Jan 10:17
  Path Tool enhancement A 21 Jan 13:06
   Path Tool enhancement Simon Budig 22 Jan 23:07
Path Tool enhancement Saul Goode 21 Jan 19:02
A
2007-01-21 07:36:13 UTC (over 17 years ago)

Path Tool enhancement

Hi all,
was wondering if anyone has had the same issues I've had with the path tool.

I would like at least one particular option that is available in both Inkscape and PS: to be able to 'lock' the control points of a single point such that the line joining the two control points intersects the point itself (i.e. the two control lines are parallel)

The reason is VERY simple and should be EXTREEMLY obvious to anyone who has ever used The GIMP path tool. You don't get a smooth line/curve across a point unless the two tangents are the same (or very similar) When trying to make a smooth curve with more than 2 points, the 2 control points for each non-end point must be in a straight line that also intersects the point itself.
It's a real PITA to have to adjust them by hand since it isn't always easy to judge by sight.

Myself, I ended up writing a little Java program that you export a path to an SVG and feed it into the Java program and it spits out a slightly modified SVG where any control point tangents that are within a specified tolerance are corrected so they are the same. Only problem is that you end up with paths that are not really where you wanted them in the first place. So I don't use it.
This actually came from firstly writing a little Java app for generating a perfect gradient perpendicular to a path (you have a path that has two colours on either side and you draw a perpendicular line of chosen length that starts as one colour and finishes as another colour then spit out a PNG to be loaded as a layer.) Yeah paths have become rather of interest to me (and also somewhat of a bane)

Now, I'm not really asking anyone to implement this, rather, I'm wondering if anyone could save me a lot of time and help me with where I would change this in the code and of course which version I should be looking at. I can program as well as anyone (well better than most actually) but of course I really don't want to start on a life path of understanding The GIMP code inside out to work out what is needed to be changed and what odd preferences the programmers have (yes we all have them, myself included - I really do understand a lot on the subject of programming)

Anyway - is this worth me spending time on ... or is it already going to be part of 2.4? (I assume 2.4 is where I'll end up looking to change if necessary)
Anyone with helpful info greatly appreciated.

AND - if it is possible to do from some sort of script I guess that would be OK - but I find the scripting language code I've seen not very easy to read (and I will add that there are VERY few programming languages, and TYPES of programming languages, that I haven't used) - so I was surprised at my complete lack of understanding of the scripting language without any background prior knowledge of it.

-Thanks for any help

Saul Goode
2007-01-21 10:17:18 UTC (over 17 years ago)

Path Tool enhancement

I don't know if the feature is available in version 2.2, but the development version (2.3) is currently able to "lock" the control points in a manner similar to what you describe by holding down the CTRL and SHIFT keys while moving either of the controls in the Edit Mode.

I would like at least one particular option that is available in both Inkscape and PS: to be able to 'lock' the control points of a single point such that the line joining the two control points intersects the point itself (i.e. the two control lines are parallel)

--------
"It is amazing what you can accomplish if you do not care who gets the credit." -- Harry S. Truman

A
2007-01-21 13:06:50 UTC (over 17 years ago)

Path Tool enhancement

Thanks for that Saul - yep that really means that it's only gonna be a minor change for what I want :) The Shift-Click (not Ctrl-Shift-Click) make both parallel but also changes the length of the second one to match the selected one.
That might even be the same as PS or Inkscape (but I can't remember and have only used them once or twice) So I guess some other X-Shift-Click could mean to keep the length of the second one the value it already is and only adjust the length of the clicked one as you move it around. (Ctrl-Shift-Click means delete)
Maybe even Shift-RightClick ...
Anyway, if I get time some time (in the future ...), I might try to find the code and hopefully it shouldn't be too hard to add that extra option myself since all the code really should be there already anyway - yay :) -Thanks again!

On Sun, 2007-01-21 at 01:17 -0800, Saul Goode wrote:

I don't know if the feature is available in version 2.2, but the development version (2.3) is currently able to "lock" the control points in a manner similar to what you describe by holding down the CTRL and SHIFT keys while moving either of the controls in the Edit Mode.

I would like at least one particular option that is available in both Inkscape and PS: to be able to 'lock' the control points of a single point such that the line joining the two control points intersects the point itself (i.e. the two control lines are parallel)

--------
"It is amazing what you can accomplish if you do not care who gets the credit." -- Harry S. Truman

Saul Goode
2007-01-21 19:02:09 UTC (over 17 years ago)

Path Tool enhancement

Maybe even Shift-RightClick ...
Anyway, if I get time some time (in the future ...), I might try to find the code and hopefully it shouldn't be too hard to add that extra option myself since all the code really should be there already anyway - yay :)

The use of RightClick is not available for tools; both it and MiddleClick are intercepted by the GIMP's interface and are not passed on to objects such as tools, filters, and plugins. Even if the code passed the extra mouseclicks, your interface still would need to address the possibility of input devices that do not possess them.

-------- "It is amazing what you can accomplish if you do not care who gets the credit." -- Harry S. Truman

Simon Budig
2007-01-22 22:51:55 UTC (over 17 years ago)

Path Tool enhancement

A (gimp623@k1k2.com) wrote:

I would like at least one particular option that is available in both Inkscape and PS: to be able to 'lock' the control points of a single point such that the line joining the two control points intersects the point itself (i.e. the two control lines are parallel)

Try pressing SHIFT when moving the control handles around, that makes the opposite handle behave symmetrically.

Bye, Simon

Simon Budig
2007-01-22 23:07:22 UTC (over 17 years ago)

Path Tool enhancement

A (gimp623@k1k2.com) wrote:

The Shift-Click (not Ctrl-Shift-Click) make both parallel but also changes the length of the second one to match the selected one.
That might even be the same as PS or Inkscape (but I can't remember and have only used them once or twice) So I guess some other X-Shift-Click could mean to keep the length of the second one the value it already is and only adjust the length of the clicked one as you move it around. (Ctrl-Shift-Click means delete)
Maybe even Shift-RightClick ...

Ah, I missed that this already got answered. Shift-RightClick is not an option, since the right click is reserved for the menu (and canceling editing actions) and is not available in the relevant tool infrastructure.

CTRL switches to the Edit mode, and in Edit-Mode SHIFT makes the tool delete stuff. Hence CTRL-SHIFT-click on an handle "removes" the handle (by moving it back to the anchor).

When I tried to figure out which shortcuts to assign to the various editing options I tried hard to make them consistent, so that one has a chance to remember what is doing what. So without looking at the whole, I am hesitant to discuss "there is a shortcut missing for this function, lets see, which one is still available", because the output would be purely randomly assigned shortcuts, which are impossible to explain.

So for now, I don't see how to integrate the "smooth" editing mode with a sane keyboard shortcut. The code to determine which restriction is active is in app/tools/gimpvectortool.c (search for "restriction"), the code that actually moves the handles around is in app/vectors/gimpbezierstroke.c (function gimp_bezier_stroke_anchor_move_relative() )

Anyway, if I get time some time (in the future ...), I might try to find the code and hopefully it shouldn't be too hard to add that extra option myself since all the code really should be there already anyway - yay :)

The main problem is how to present this to the user. I'd welcome proposals, but rest assured that I'll probe for weak spots :)

I hope that we somewhen can do a usability study on the path tool.

Bye, Simon