After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 161131 - Displace plug-in could also operate in polar-coords.
Displace plug-in could also operate in polar-coords.
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-12-13 04:36 UTC by Joao S. O. Bueno
Modified: 2005-08-25 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implements enhancement as described (15.41 KB, patch)
2004-12-13 04:37 UTC, Joao S. O. Bueno
none Details | Review
Implements enhacement, leaving mode parameter as optional (15.79 KB, patch)
2005-01-11 22:45 UTC, Joao S. O. Bueno
none Details | Review
Updated patch implementing enhacement. (15.79 KB, patch)
2005-01-17 03:02 UTC, Joao S. O. Bueno
accepted-commit_now Details | Review

Description Joao S. O. Bueno 2004-12-13 04:36:03 UTC
Hi. 
I've worked on the displace plug-in so that it can do what it already does, 
but also can operate on polar coordinates base, meaning the mappings will make 
the target drawable pixels move along their distance to the center (vary 
radius), or their angle in relation to the drawable center. 
This is roughly equivalent to the Whirl and Pinch plug-in, but it is mapped by 
another drawable. 
I also implemented a version of the label changing interface from AlienMap2 on 
it. 
 
Of course this is not meant for the 2.2 cycle.
Comment 1 Joao S. O. Bueno 2004-12-13 04:37:22 UTC
Created attachment 34785 [details] [review]
Implements enhancement as described
Comment 2 Sven Neumann 2005-01-07 11:53:41 UTC
Looks almost OK except for the change of the procedure call. Please make the
newly introduced parameter optional so that the procedure can be still be called
with the old number of parameters.
Comment 3 Joao S. O. Bueno 2005-01-11 22:45:34 UTC
Created attachment 35859 [details] [review]
Implements enhacement, leaving mode parameter as optional
Comment 4 Joao S. O. Bueno 2005-01-17 03:02:06 UTC
Created attachment 36119 [details] [review]
Updated patch implementing enhacement.

The previous patch resulted in an incorrect offset for the angle when in polar
mode. Fixed here.
Comment 5 Sven Neumann 2005-02-10 15:27:25 UTC
2005-02-10  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/displace.c: applied a modified patch from Joao
	S. O. Bueno Calligaris that adds a polar mode to the Displace
	plug-in (bug #161131).

I've fixed the resizing problem with the labels and changed the dialog layout a
little so that it becomes more compact.
Comment 6 Sven Neumann 2005-08-24 09:53:01 UTC
Optional parameters aren't supported by all language bindings, in particular not
by Script-Fu. Thus I had to do the following change:

2005-08-24  Sven Neumann  <sven@gimp.org>

	* plug-ins/script-fu/scripts/i26-gunya2.scm
	* plug-ins/script-fu/scripts/ripply-anim.scm: reverted the last
	change...

	* plug-ins/common/displace.c: ... and fixed the plug-in instead.
	The number of parameters must not change. Provide a new procedure
	for polar mode instead.
Comment 7 Kevin Cozens 2005-08-24 21:48:00 UTC
Optional parameters are supported in Script-Fu/Tiny-Fu. See the description for
<Formals> (section 4.1.4. titled Procedures) in the right-hand column of page 9
of the R5RS.
Comment 8 Sven Neumann 2005-08-25 19:54:49 UTC
Well, they may be supported by Scheme but AFAIK at least script-fu will not
accept procedure calls with the wrong number of parameters. How does tiny-fu
handle this?