diff options
author | dxiao <dxiao@mit.edu> | 2011-02-20 16:18:43 -0500 |
---|---|---|
committer | dxiao <dxiao@mit.edu> | 2011-02-20 16:18:43 -0500 |
commit | 792dd4d7139f9080bf6d3d760efe763b8b3f60cc (patch) | |
tree | 7095fb17e533c9d29a531ea008b1a239f7383a8a /behaviors | |
parent | c2874a0cefa410aca3fdd33ed701b16bac520440 (diff) |
Added LocationMask, which limits affected pixels to a specified region of the screen
Diffstat (limited to 'behaviors')
-rw-r--r-- | behaviors/LocationMask.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/behaviors/LocationMask.py b/behaviors/LocationMask.py new file mode 100644 index 0000000..51eafeb --- /dev/null +++ b/behaviors/LocationMask.py @@ -0,0 +1,19 @@ +from operationscore.Behavior import * + +class LocationMask (Behavior): + """Modifies Pixels such that only ones in the pixels specified by the "location" + argument will show""" + + def processResponse(self, inputs, state): + + ret = [] + inputs = list(inputs) + + for inputset in inputs: + inputset = dict(inputset) + + inputset['Location'] += '@' + self['Location'] + + ret.append(inputset) + + return (ret, []) |