GNOME Bugzilla – Bug 624452
plug-in-displace pdb call incorrectly documented edge behaviour
Last modified: 2010-07-15 19:35:29 UTC
The PDB documentation for plug-in-displace shows: { GIMP_PDB_INT32, "displace-type", "Edge behavior { WRAP (0), SMEAR (1), BLACK (2) }" } The lines up with the radio group: frame = gimp_int_radio_group_new (TRUE, _("Edge Behavior"), G_CALLBACK (gimp_radio_button_update), &dvals.displace_type, dvals.displace_type, _("_Wrap"), GIMP_PIXEL_FETCHER_EDGE_WRAP, &wrap, _("_Smear"), GIMP_PIXEL_FETCHER_EDGE_SMEAR, &smear, _("_Black"), GIMP_PIXEL_FETCHER_EDGE_BLACK, &black, NULL); but when this plugin is called programatically the value is passed directly to the pixel fetcher: (line 559) gimp_pixel_fetcher_set_edge_mode (pft, dvals.displace_type); and this is an enum type (from gimppixelfetcher.h): typedef enum { GIMP_PIXEL_FETCHER_EDGE_NONE, GIMP_PIXEL_FETCHER_EDGE_WRAP, GIMP_PIXEL_FETCHER_EDGE_SMEAR, GIMP_PIXEL_FETCHER_EDGE_BLACK, GIMP_PIXEL_FETCHER_EDGE_BACKGROUND } GimpPixelFetcherEdgeMode; So the PDB call doc needs to be changed to: { GIMP_PDB_INT32, "displace-type", "Edge behavior { WRAP (1), SMEAR (2), BLACK (3) }" } to line up with the enum type.
Thanks for reporting this. Fixed in trunk: commit 17a4baff01720eedf8a857d90305074826e6d3f5 Author: Sven Neumann <sven@gimp.org> Date: Thu Jul 15 21:36:12 2010 +0200 Bug 624452 - plug-in-displace pdb call incorrectly documented edge behaviour Fix documentation for displace-type parameter. Spotted by Rob Antonishen.