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

A new stretch tool for Summer of Code?

This discussion is connected to the gimp-developer-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.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

How to add a new stretch tool? Tom Lechner 26 Apr 10:38
  How to add a new stretch tool? Alexander Rabtchevich 26 Apr 11:15
  How to add a new stretch tool? Sven Neumann 27 Apr 08:54
   A new stretch tool for Summer of Code? Tom Lechner 05 May 21:58
Tom Lechner
2006-04-26 10:38:44 UTC (over 18 years ago)

How to add a new stretch tool?

Hi,

I desperately want a tool that can stretch a selection or layer in a curvy sort of way on the main window, because I frequently want to place images inside of other images in such a way that the scale/rotate/perspective tools are not sufficient, nor are the curve bend or image warp plugins. Speaking of the rotate/etc tools, when shifting around, the thing is shifted as an opaque thing, rather than with its actual transparency, which is very irritating (i've only used the Gimp up to 2.2.11, maybe its different later?).

So then, what is the easiest way to add a kind of transform tool that stretches the current selection based on a cubic tensor product patch? I read a post somewhere in the archives that said it was mostly "easy" to add new tools. So what does "easy" entail? I've only spent an hour or two less'ing the gimp source, so I'm still not too sure yet what's what. Is there any one else remotely working on such a thing?

I have already implemented something of the kind in a (somewhat rough and unpolished) program called Laidout that involves subdivideable patches, of which you can see screenshots here: http://www.laidout.org/shots/screenshots.html

I envision a dialog something along the lines of this mock up: http://www.laidout.org/temp.png

My actual rendering routine is currently a major hack to get it off the ground, and is totally inefficient. It really needs coding from someone who actually knows something about rasterizing cubic tensor product patches.

Tom
http://www.laidout.org
http://www.tomlechner.com

Alexander Rabtchevich
2006-04-26 11:15:12 UTC (over 18 years ago)

How to add a new stretch tool?

What I do see on the tutorial page is a potentially very nice spline-based gradient tool, as Adobe Illustrator has. ;)

Sven Neumann
2006-04-27 08:54:40 UTC (over 18 years ago)

How to add a new stretch tool?

Hi,

Tom Lechner writes:

I desperately want a tool that can stretch a selection or layer in a curvy sort of way on the main window, because I frequently want to place images inside of other images in such a way that the scale/rotate/perspective tools are not sufficient, nor are the curve bend or image warp plugins. Speaking of the rotate/etc tools, when shifting around, the thing is shifted as an opaque thing, rather than with its actual transparency, which is very irritating (i've only used the Gimp up to 2.2.11, maybe its different later?).

That's a limitation of the current preview code. There's a already bug report for it but currently noone is working on this.

So then, what is the easiest way to add a kind of transform tool that stretches the current selection based on a cubic tensor product patch? I read a post somewhere in the archives that said it was mostly "easy" to add new tools. So what does "easy" entail? I've only spent an hour or two less'ing the gimp source, so I'm still not too sure yet what's what.

Have a look at the implementation of the existing transform tools. That should give you an idea how to add a new one. I am not sure though if your proposed tool will fit easily into the existing transform tool framework.

Sven

Tom Lechner
2006-05-05 21:58:32 UTC (over 18 years ago)

A new stretch tool for Summer of Code?

Hi,

I wrote:

...a tool that can stretch a selection or layer in a curvy sort of way (based on cubic bezier patches) on the main window, because I frequently want to place images inside of other images in such a way that the scale/rotate/perspective tools are not sufficient....

Probably too late, but could I convince the developers to add this as an idea for the Summer of Code? Is there any one out there willing to mentor (or otherwise work on) development of such a thing? Perhaps combined with making "mesh gradients" from the same sort of patches?

A special case of this sort of stretch tool would cover the recent enhancement request:
Bug 338888 – enhancement request for perspective transform tool: http://bugzilla.gnome.org/show_bug.cgi?id=338888

Unfortunately I am not a student. If there is no student or anyone else out there interested in working out such features, I will certainly keep walking down the long road of mapping out the Gimp source until I understand enough to make my stretch tool (and perhaps add a "preview opacity" transform tool option, regarding bug #167926).

Alexander Rabtchevich writes:

What I do see on the tutorial page is a potentially very nice spline-based gradient tool, as Adobe Illustrator has. ;)

Hmm, I hadn't known about that! Illustrator's tool would seem to correspond to what I had labeled "edit borders only" . The full cubic patch has more twisting potential. I was inspired from reading about the postscript shading dictionaries and certain things from Blender.

Tom ----
http://www.tomlechner.com
http://www.laidout.org