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 137053 - PDB entries for transform tools lack some options
PDB entries for transform tools lack some options
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: libgimp
git master
Other All
: Urgent enhancement
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks: 101604
 
 
Reported: 2004-03-13 13:28 UTC by Raphaël Quinet
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
creates gimp_flip_extended in core transform tools, allow some needed enums to be exported to pdbgen (3.82 KB, patch)
2004-10-07 18:08 UTC, Joao S. O. Bueno
none Details | Review
Version of pdb file that implements optional parameters in PDB. (32.79 KB, application/x-perl)
2004-10-07 18:14 UTC, Joao S. O. Bueno
  Details
Changes needed to makefiles and enum files to implement gimp_transform_ pdb namespace (7.07 KB, patch)
2004-10-09 05:37 UTC, Joao S. O. Bueno
committed Details | Review
FIle implementing new API (19.84 KB, application/x-perl)
2004-10-09 05:41 UTC, Joao S. O. Bueno
  Details
File implementing new API (19.93 KB, application/x-perl)
2004-10-11 01:39 UTC, Joao S. O. Bueno
  Details
File implementing new API (20.11 KB, application/x-perl)
2004-10-13 18:27 UTC, Joao S. O. Bueno
  Details

Description Raphaël Quinet 2004-03-13 13:28:13 UTC
The PDB entries for the transform tools (rotate, scale, perspective, ...) do
not expose all options of the underlying core tools.  The following options
are currently missing:
- interpolation_type: in the PDB calls, there is only a boolean specifying if
  interpolation should be used or not, but the type is taken from the global
  config options.
- supersample: this is currently hardcoded to TRUE or FALSE depending on the
  tool, as described in bug #136702.
- clip_result: this is currently hardcoded to FALSE for all tools.
It would be nice to change the PDB API or to provide an additional API that
gives more control to the caller.
Comment 1 Joao S. O. Bueno 2004-06-14 20:20:58 UTC
The rotation tool with it's "gimp-rotate" PDB entry misses the 
coordinates around which to operate the rotation. 
 
That renders this API entry almost useless.  
I'd say its priority could be "normal" rather than "low". At least this should be 
done before 2.2 final.  
 
As for a start to fix this bug, I think that all new PDB entries with the extra 
functionalities would be better than replacing the old ones.  
 
What could be a good name for the new functions? 
Something as gimp-rotate-new, or gimp-rotate-full ?  
 
 
 
 
Comment 2 Nathan Summers 2004-09-16 15:06:46 UTC
Is it necessary to have a new name at all?  PDB functions can take varying
arguments.
Comment 3 Joao S. O. Bueno 2004-10-07 06:51:27 UTC
Finished coding the modifications for this. 
 
I am building it now to see if it works, and tomorrow I will attach the 
patches. 
Comment 4 Joao S. O. Bueno 2004-10-07 18:08:34 UTC
Created attachment 32357 [details] [review]
creates gimp_flip_extended in core transform tools, allow some needed enums to be exported to pdbgen
Comment 5 Joao S. O. Bueno 2004-10-07 18:14:30 UTC
Created attachment 32358 [details]
Version of pdb file that implements optional parameters in PDB.

untabifiying made a patch useless.
File implements *_extended versions of all transform tools PDB which accept
as extra parameters things taht were hardcoded in the older functions.

The biggest change is the rotate, which allows one to choose the center,
seconded by the one that allows one to pick the "interpolation type" straight,
instead of reliyng on GIMP context.
Comment 6 Sven Neumann 2004-10-07 18:35:17 UTC
Do I miss something here or does clip-result not make any sense for the flip
tool? Why did you add it then?

Also gimp_foo_extended() is a bad name for new procedures. I would suggest that
we deprecate the old PDB calls and replace them with new ones that have proper
names in a gimp_transform namespace. So we would have gimp_transform_flip,
gimp_transform_rotate, gimp_transform_scale, ... These functions would best live
in a separate file, transform.pdb.
Comment 7 Joao S. O. Bueno 2004-10-08 05:23:25 UTC
I will do most of these changes in the morning. I tried to ask for the names 
before.  :-) 
 
Do I need to change any of the meta-makefiles when creating a new file? 
As for the "gimp-transform-flip' instead of clipping result, I will let the 
flipping axis being one parameter - it is there internally - the axis x, or y 
coordinate. Maybe the clipping will have an effect them. 
 
Also, having the functions with fewer parameters is good for rapid *-fu 
development. Do the old ones really have to be deprecated?   
Comment 8 Joao S. O. Bueno 2004-10-09 05:37:43 UTC
Created attachment 32421 [details] [review]
Changes needed to makefiles and enum files to implement gimp_transform_ pdb namespace
Comment 9 Joao S. O. Bueno 2004-10-09 05:41:19 UTC
Created attachment 32422 [details]
FIle implementing new API

New file that re-implements all transform functions as
gimp-drawable-transform-xxxx , at Mitchs request.

Also, first attempt to implement a flip around an arbitrary axis - I have not
tested it yet - need some sleep.
Comment 10 Joao S. O. Bueno 2004-10-11 01:39:52 UTC
Created attachment 32470 [details]
File implementing new API

Fixed the flip procedure.
Comment 11 Michael Natterer 2004-10-11 16:08:31 UTC
Your patch breaks indentation in all touched files and doesn't
really follow the coding style.
Comment 12 Joao S. O. Bueno 2004-10-13 18:27:49 UTC
Created attachment 32574 [details]
File implementing new API

I fixed the linebreak / indentation issues I could find. I am sorry if there
are more of them remaining.
Comment 13 Joao S. O. Bueno 2004-10-22 18:33:36 UTC
I forgot to mention here, latest implementation of *flip* includes a working 
flip around an arbitray axis, as asked in bug #133720. 
Comment 14 Sven Neumann 2004-10-26 17:51:20 UTC
2004-10-26  Sven Neumann  <sven@gimp.org>

	Added new drawable transform API to the PDB. Largely based on
	patches from Joao S. O. Bueno. Fixes bug #137053.

	* app/core/gimpdrawable-transform.[ch]: added missing parameters
	to gimp_drawable_transform_flip().

	* tools/pdbgen/pdb/transform_tools.pdb: changed accordinly.

	* app/base/base-enums.h
	* app/core/core-enums.h: removed pdp-skip for GimpInterpolationType
	and GimpTransformDirection enums.

	* libgimp/gimpenums.h
	* plug-ins/pygimp/gimpenums.py
	* tools/pdbgen/enums.pl
	* tools/pdbgen/groups.pl: regenerated.

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/drawable_transform.pdb: added new file defining
	the new PDB calls.

	* app/pdb/Makefile.am
	* app/pdb/drawable_transform_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpdrawabletransform_pdb.[ch]: regenerated.

Comment 15 Sven Neumann 2004-10-29 22:39:15 UTC
Mitch and me found some issues with the new API and we think that it needs some
review before 2.2. Mitch started to work on this already. Reopening so that this
isn't forgotten.
Comment 16 Joao S. O. Bueno 2004-10-30 23:15:36 UTC
K.  
Let me know if you think I can help. 
I was wondering|: are path transformations in already?  
Maybe they could get in still. They would have to be in another file, of 
course. 
Comment 17 Sven Neumann 2004-10-30 23:20:38 UTC
You can of course write that patch but I don't think we should accept more PDB
API changes at this point. Such an API always needs some review and time is
getting short. We can focus on a nice new vectors API for GIMP 2.4.
Comment 18 Sven Neumann 2004-11-06 12:51:42 UTC
Mitch did a couple of changes to the transform APIs. Can this bug be closed now?
Comment 19 Michael Natterer 2004-11-16 22:36:01 UTC
Yes, after this final cleanup:

2004-11-16  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/drawable_transform.pdb: renamed the new
	drawable_foo_defaults() functions to drawable_foo_default() to be
	consistent with paintbrush_default() and friends.

	* tools/pdbgen/pdb/transform_tools.pdb
	* libgimp/gimp.def: changed accordingly.

	* app/pdb/drawable_transform_cmds.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimpdrawabletransform_pdb.[ch]
	* libgimp/gimptransformtools_pdb.c: regenerated.

	* plug-ins/script-fu/scripts/coolmetal-logo.scm
	* plug-ins/script-fu/scripts/image-structure.scm
	* plug-ins/script-fu/scripts/text-circle.scm: follow the API change.