diff options
author | Pootle daemon <pootle@pootle.sugarlabs.org> | 2012-06-30 04:31:58 (GMT) |
---|---|---|
committer | Pootle daemon <pootle@pootle.sugarlabs.org> | 2012-06-30 04:31:58 (GMT) |
commit | 261c7324995e808fb3d781b66ac18634c7e78f14 (patch) | |
tree | b82e2acf6de8ec8b41c295f6e5557beb2f50ef0b /TurtleArt/tabasics.py | |
parent | c413529f53e333d1871825c9520cf79bb70484a2 (diff) | |
parent | ab4e5279bd1511c134bdcca83895edc8f6c33cb8 (diff) |
Merge branch 'master' of git.sugarlabs.org:turtleart/mainline
Diffstat (limited to 'TurtleArt/tabasics.py')
-rw-r--r-- | TurtleArt/tabasics.py | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py index c88dfd9..e8d9378 100644 --- a/TurtleArt/tabasics.py +++ b/TurtleArt/tabasics.py @@ -330,36 +330,6 @@ in place of a number block)'), define_logo_function('tapensize', 'to tapensize\routput first round \ pensize\rend\r') - palette.add_block('startfill', - style='basic-style-extended-vertical', - label=_('start fill'), - prim_name='startfill', - help_string=_('starts filled polygon (used with end \ -fill block)')) - self.tw.lc.def_prim('startfill', 0, - lambda self: self.tw.canvas.start_fill()) - - palette.add_block('stopfill', - style='basic-style-extended-vertical', - label=_('end fill'), - prim_name='stopfill', - help_string=_('completes filled polygon (used with \ -start fill block)')) - self.tw.lc.def_prim('stopfill', 0, - lambda self: self.tw.canvas.stop_fill()) - - def _color_palette(self): - """ The basic Turtle Art color palette """ - - if self.tw.hw == XO30: - palette = make_palette('pen', - colors=["#00FFFF", "#00A0A0"], - help_string=_('Palette of pen colors')) - else: - palette = make_palette('colors', - colors=["#00FFFF", "#00A0A0"], - help_string=_('Palette of pen colors')) - palette.add_block('setcolor', style='basic-style-1arg', label=_('set color'), @@ -423,6 +393,36 @@ used in place of a number block)'), prim_name='gray') self.tw.lc.def_prim('gray', 0, lambda self: self.tw.canvas.gray) + palette.add_block('startfill', + style='basic-style-extended-vertical', + label=_('start fill'), + prim_name='startfill', + help_string=_('starts filled polygon (used with end \ +fill block)')) + self.tw.lc.def_prim('startfill', 0, + lambda self: self.tw.canvas.start_fill()) + + palette.add_block('stopfill', + style='basic-style-extended-vertical', + label=_('end fill'), + prim_name='stopfill', + help_string=_('completes filled polygon (used with \ +start fill block)')) + self.tw.lc.def_prim('stopfill', 0, + lambda self: self.tw.canvas.stop_fill()) + + def _color_palette(self): + """ The basic Turtle Art color palette """ + + if self.tw.hw == XO30: + palette = make_palette('pen', + colors=["#00FFFF", "#00A0A0"], + help_string=_('Palette of pen colors')) + else: + palette = make_palette('colors', + colors=["#00FFFF", "#00A0A0"], + help_string=_('Palette of pen colors')) + self._make_constant(palette, 'red', _('red'), CONSTANTS['red']) self._make_constant(palette, 'orange', _('orange'), CONSTANTS['orange']) |