mirror of https://github.com/GNOME/gimp.git
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/grid.c: fix my fix.
This commit is contained in:
parent
d56b31643a
commit
c77781de89
|
@ -1,3 +1,7 @@
|
|||
2006-07-27 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/common/grid.c: fix my fix.
|
||||
|
||||
2006-07-27 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/common/grid.c: width and height were reversed when
|
||||
|
|
|
@ -408,12 +408,12 @@ grid (gint32 image_ID,
|
|||
{
|
||||
gimp_pixel_rgn_get_row (&srcPR, dest, sx1, y, (sx2 - sx1));
|
||||
|
||||
y_offset = y - grid_cfg.hoffset;
|
||||
y_offset = y - grid_cfg.voffset;
|
||||
while (y_offset < 0)
|
||||
y_offset += grid_cfg.hspace;
|
||||
y_offset += grid_cfg.vspace;
|
||||
|
||||
if ((y_offset +
|
||||
(grid_cfg.hwidth / 2)) % grid_cfg.hspace < grid_cfg.hwidth)
|
||||
(grid_cfg.hwidth / 2)) % grid_cfg.vspace < grid_cfg.hwidth)
|
||||
{
|
||||
for (x = sx1; x < sx2; x++)
|
||||
{
|
||||
|
@ -424,29 +424,29 @@ grid (gint32 image_ID,
|
|||
|
||||
for (x = sx1; x < sx2; x++)
|
||||
{
|
||||
x_offset = grid_cfg.vspace + x - grid_cfg.voffset;
|
||||
x_offset = grid_cfg.hspace + x - grid_cfg.hoffset;
|
||||
while (x_offset < 0)
|
||||
x_offset += grid_cfg.vspace;
|
||||
x_offset += grid_cfg.hspace;
|
||||
|
||||
if ((x_offset +
|
||||
(grid_cfg.vwidth / 2)) % grid_cfg.vspace < grid_cfg.vwidth)
|
||||
(grid_cfg.vwidth / 2)) % grid_cfg.hspace < grid_cfg.vwidth)
|
||||
{
|
||||
pix_composite (&dest[(x-sx1) * bytes],
|
||||
vcolor, bytes, blend, alpha);
|
||||
}
|
||||
|
||||
if ((x_offset +
|
||||
(grid_cfg.iwidth / 2)) % grid_cfg.vspace < grid_cfg.iwidth
|
||||
(grid_cfg.iwidth / 2)) % grid_cfg.hspace < grid_cfg.iwidth
|
||||
&&
|
||||
((y_offset % grid_cfg.hspace >= grid_cfg.ispace
|
||||
((y_offset % grid_cfg.vspace >= grid_cfg.ispace
|
||||
&&
|
||||
y_offset % grid_cfg.hspace < grid_cfg.ioffset)
|
||||
y_offset % grid_cfg.vspace < grid_cfg.ioffset)
|
||||
||
|
||||
(grid_cfg.hspace -
|
||||
(y_offset % grid_cfg.hspace) >= grid_cfg.ispace
|
||||
(grid_cfg.vspace -
|
||||
(y_offset % grid_cfg.vspace) >= grid_cfg.ispace
|
||||
&&
|
||||
grid_cfg.hspace -
|
||||
(y_offset % grid_cfg.hspace) < grid_cfg.ioffset)))
|
||||
grid_cfg.vspace -
|
||||
(y_offset % grid_cfg.vspace) < grid_cfg.ioffset)))
|
||||
{
|
||||
pix_composite (&dest[(x-sx1) * bytes],
|
||||
icolor, bytes, blend, alpha);
|
||||
|
@ -454,23 +454,23 @@ grid (gint32 image_ID,
|
|||
}
|
||||
|
||||
if ((y_offset +
|
||||
(grid_cfg.iwidth / 2)) % grid_cfg.hspace < grid_cfg.iwidth)
|
||||
(grid_cfg.iwidth / 2)) % grid_cfg.vspace < grid_cfg.iwidth)
|
||||
{
|
||||
for (x = sx1; x < sx2; x++)
|
||||
{
|
||||
x_offset = grid_cfg.vspace + x - grid_cfg.voffset;
|
||||
x_offset = grid_cfg.hspace + x - grid_cfg.hoffset;
|
||||
while (x_offset < 0)
|
||||
x_offset += grid_cfg.vspace;
|
||||
x_offset += grid_cfg.hspace;
|
||||
|
||||
if ((x_offset % grid_cfg.vspace >= grid_cfg.ispace
|
||||
if ((x_offset % grid_cfg.hspace >= grid_cfg.ispace
|
||||
&&
|
||||
x_offset % grid_cfg.vspace < grid_cfg.ioffset)
|
||||
x_offset % grid_cfg.hspace < grid_cfg.ioffset)
|
||||
||
|
||||
(grid_cfg.vspace -
|
||||
(x_offset % grid_cfg.vspace) >= grid_cfg.ispace
|
||||
(grid_cfg.hspace -
|
||||
(x_offset % grid_cfg.hspace) >= grid_cfg.ispace
|
||||
&&
|
||||
grid_cfg.vspace -
|
||||
(x_offset % grid_cfg.vspace) < grid_cfg.ioffset))
|
||||
grid_cfg.hspace -
|
||||
(x_offset % grid_cfg.hspace) < grid_cfg.ioffset))
|
||||
{
|
||||
pix_composite (&dest[(x-sx1) * bytes],
|
||||
icolor, bytes, blend, alpha);
|
||||
|
|
Loading…
Reference in New Issue