diff options
Diffstat (limited to 'pixelmappers/GaussianMapper.py')
-rw-r--r-- | pixelmappers/GaussianMapper.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pixelmappers/GaussianMapper.py b/pixelmappers/GaussianMapper.py index 552f5c9..1cf9e88 100644 --- a/pixelmappers/GaussianMapper.py +++ b/pixelmappers/GaussianMapper.py @@ -3,11 +3,14 @@ import Util class GaussianMapper(PixelMapper): def mappingFunction(self, eventLocation, screen): returnPixels = [] - for pixel in screen: + [x,y] = eventLocation + for (x,pixel) in screen.pixelsInRange(x-self['CutoffDist'], \ + x+self['CutoffDist']): pixelDist = Util.dist(pixel.location, eventLocation) if pixelDist < self['CutoffDist']: w = Util.gaussian(pixelDist, self['Height'], 0, self['Width']) if w>1: - pdb.set_trace() + #pdb.set_trace() + pass returnPixels.append((pixel, w)) return returnPixels |