Comment 26 for bug 165780

Revision history for this message
David Eccles (gringer) (gringer) wrote :

Just from what people are saying here, I would guess that this problem occurs because a stamping approach is used, rather than a modulus approach -- the pattern is not being treated as something that stretches in all directions to infinity, wrapping around itself.

Here's what probably should happen:

define image(x, y) as the current image location
define pattern(x, y) as the 'pattern coordinate location', pattern(0,0) corresponds to the position at the origin of the pattern (top left, or whatever)
define patternStartX() as the X image coordinate of the pattern origin
define patternWidth() as the width (X) of the pattern
define patternStartY() as the Y image coordinate of the pattern origin
define patternHeight() as the height (Y) of the pattern
define mod(x, y) as the [positive] remainder of x divided by y

image(x,y) = pattern(mod(x - patternStartX(), patternWidth), mod(y - patternStartY(), patternHeight);

Adjustments for scale / rotation would need to be made as well, but I would expect that Inkscape can do that in its sleep.