From b3d151b60e285339a4f39708f5dce818151a8419 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 12 Aug 2010 22:09:54 +0000 Subject: read pixel block --- (limited to 'TurtleArt/taconstants.py') diff --git a/TurtleArt/taconstants.py b/TurtleArt/taconstants.py index 2998885..5088b8f 100644 --- a/TurtleArt/taconstants.py +++ b/TurtleArt/taconstants.py @@ -135,7 +135,7 @@ PALETTES = [['clean', 'forward', 'back', 'show', 'left', 'right', ['kbinput', 'push', 'printheap', 'keyboard', 'pop', 'clearheap', 'myfunc1arg', 'userdefined', 'addturtle', 'comment', 'print', 'cartesian', 'width', 'height', 'polar', 'sandwichtop', - 'sandwichbottom'], + 'sandwichbottom', 'readpixel'], ['journal', 'audio', 'description', 'hideblocks', 'showblocks', 'fullscreen', 'savepix', 'savesvg', 'picturelist', 'picture1x1a', 'picture1x1', 'picture2x2', 'picture2x1', @@ -183,7 +183,7 @@ BASIC_STYLE_TAIL = ['stopstack', 'empty'] BASIC_STYLE = ['clean', 'penup', 'pendown', 'stack1', 'stack2', 'vspace', 'hideblocks', 'showblocks', 'clearheap', 'printheap', 'kbinput', 'fullscreen', 'sandwichcollapsed', 'cartesian', 'polar', 'startfill', - 'stopfill'] + 'stopfill', 'readpixel'] BASIC_STYLE_EXTENDED = ['picturelist', 'picture1x1', 'picture2x2', 'picture2x1', 'picture1x2', 'picture1x1a'] BASIC_STYLE_1ARG = ['forward', 'back', 'left', 'right', 'seth', 'show', 'image', @@ -337,6 +337,7 @@ BLOCK_NAMES = { 'purple':[_('purple')+' = 90'], 'push':[_('push')], 'random':[_('random'), _('min'), _('max')], + 'readpixel':[_('read pixel')], 'red':[_('red')+' = 0'], 'remainder2':[_('mod')], 'repeat':[' ',_('repeat')], @@ -479,6 +480,7 @@ PRIMITIVES = { 'push':'push', 'random':'random', 'red':'red', + 'readpixel':'readpixel', 'remainder2':'mod', 'repeat':'repeat', 'resistance':'resistance', @@ -783,6 +785,7 @@ HELP_STRINGS = { 'product2':_("multiplies two numeric inputs"), 'push':_("pushes value onto FILO (first-in last-out heap)"), 'random':_("returns random number between minimum (top) and maximum (bottom) values"), + 'readpixel':_("RGB color under the turtle is pushed to the stack"), 'remainder2':_("modular (remainder) operator"), 'repeat':_("loops specified number of times"), 'resistance':_("sensor input resistance"), -- cgit v0.9.1