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 602761 - plug-in-grid: Parameters Horizontal/Vertical Spacing and Horizontal/Vertical Offset are reversed.
plug-in-grid: Parameters Horizontal/Vertical Spacing and Horizontal/Vertical ...
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-11-23 19:18 UTC by themroc
Modified: 2009-11-24 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description themroc 2009-11-23 19:18:17 UTC
This happens both in interactive mode (click Filters/Render/Pattern/Grid...) and when called from gimp-perl (and thus very likely also in other script-languages). This bug appeared somewhere between 2.2.17 (which is ok) and 2.4.7. 

In http://git.gnome.org/cgit/gimp/tree/plug-ins/common/grid.c are what seems to be the offending lines:

414  if ((y_offset +
415      (grid_cfg.hwidth / 2)) % grid_cfg.vspace < grid_cfg.hwidth)

430  if ((x_offset +
431      (grid_cfg.vwidth / 2)) % grid_cfg.hspace < grid_cfg.vwidth)
Comment 1 Michael Natterer 2009-11-23 23:25:00 UTC
These values specify the width of the horizontal and vertical grid lines,
which of course has an effect in x direction for vertical and in y direction
for horizontal. This is simply a misunderstanding.
Comment 2 themroc 2009-11-24 12:28:36 UTC
No, it is not. Its a bug (though a little different from what the title suggests...).
If the "vertical" parameters should affect the x-axis (which is consistenly the case in 2.2), then why do "vertical spacing" and "vertical offset" affect y?
Sorry for posting a misleading title, it should say

Parameters Horizontal/Vertical Spacing and Horizontal/Vertical Offset are reversed.
Comment 3 Michael Natterer 2009-11-24 12:49:59 UTC
Hm you are right. It's ok for "width" but broken for "spacing" and "offset".

I guess somebody "fixed up" the plugin to do what's "obviously" right,
but the GUI is all but obvious.

The code needs to be fixed to modify the right lines again, and the
GUI needs to be fixed to properly speak of horizontal/vertical *lines*
to get rid of any confusion.
Comment 4 Michael Natterer 2009-11-24 14:00:21 UTC
Fixed in master:

commit 825fab3dd0f830abdc0785a465b2dd7f57ba4e1f
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue Nov 24 14:58:28 2009 +0100

    Bug 602761 - plug-in-grid: Parameters Horizontal/Vertical Spacing and Horizontal/Vertical 
    
    Add "Lines" to the "Horizontal" and "Vertical" labels to clarify
    what exactly is affected.

 plug-ins/common/grid.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

commit 028b66beba66dd6b1fe0a9a6b825034d3b971b5a
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue Nov 24 14:49:17 2009 +0100

    Bug 602761 - plug-in-grid: Parameters Horizontal/Vertical Spacing and Horizontal/Vertical 
    
    Revert commits bc099a98f306c3246a3ca2fd950d6f1af056e4c4 and
    c77781de8927bac39817424ae5c732ad3b7fe343 from Jul 27 2006;
    also changed refval boundaries of the "width" size entries
    in the spirit of the original fix, only reversed.
    
    Rationale: the "horizontal" parameters all have to affect the
    horizontal *lines*, so have an effect in *vertical* direction.
    
    Will commit a label change on top to clarify this.

 plug-ins/common/grid.c |   68 ++++++++++++++++++++++++------------------------
 1 files changed, 34 insertions(+), 34 deletions(-)
Comment 5 Michael Natterer 2009-11-24 14:02:19 UTC
Same fix (minus the separate label change) applied to 2.6:

commit acc37a4e5d08c0f97920cd1b6bd757f126cafb45
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue Nov 24 14:49:17 2009 +0100

    Bug 602761 - plug-in-grid: Parameters Horizontal/Vertical Spacing and Horizontal/Vertical 
    
    Revert commits bc099a98f306c3246a3ca2fd950d6f1af056e4c4 and
    c77781de8927bac39817424ae5c732ad3b7fe343 from Jul 27 2006;
    also changed refval boundaries of the "width" size entries
    in the spirit of the original fix, only reversed.
    
    Rationale: the "horizontal" parameters all have to affect the
    horizontal *lines*, so have an effect in *vertical* direction.
    
    Will commit a label change on top to clarify this.
    (cherry picked from commit 028b66beba66dd6b1fe0a9a6b825034d3b971b5a)

 plug-ins/common/grid.c |   68 ++++++++++++++++++++++++------------------------
 1 files changed, 34 insertions(+), 34 deletions(-)