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 624452 - plug-in-displace pdb call incorrectly documented edge behaviour
plug-in-displace pdb call incorrectly documented edge behaviour
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal trivial
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2010-07-15 13:29 UTC by Rob Antonishen
Modified: 2010-07-15 19:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rob Antonishen 2010-07-15 13:29:02 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.
Comment 1 Sven Neumann 2010-07-15 19:35:29 UTC
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.