From c581408f028d5b8ceadc53c68d7c1252fbe09e6d Mon Sep 17 00:00:00 2001 From: rcoh Date: Wed, 22 Dec 2010 14:27:33 -0500 Subject: About halfway done with support for pixel regions. Modified the component registry a bit. Added support for multiple pixel mappers (and along with that, default components). RCOH --- pixelmappers/SimpleMapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pixelmappers/SimpleMapper.py') diff --git a/pixelmappers/SimpleMapper.py b/pixelmappers/SimpleMapper.py index fdcf8b9..6b414ea 100644 --- a/pixelmappers/SimpleMapper.py +++ b/pixelmappers/SimpleMapper.py @@ -1,12 +1,12 @@ from operationscore.PixelMapper import * -import Util +import util.Geo as Geo class SimpleMapper(PixelMapper): def mappingFunction(self, eventLocation, screen): if type(eventLocation) == type(tuple()): bestDist = 10**10 #don't kill me, I'm lazy bestPixel = None for pixel in screen: - pixelDist = Util.dist(pixel.location, eventLocation) + pixelDist = Geo.dist(pixel.location, eventLocation) if pixelDist < bestDist: bestPixel = pixel bestDist = pixelDist -- cgit v1.2.3