From e108487cff19177002f60f1d754f9a205fb91d15 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Fri, 30 Aug 2013 20:27:37 +0000 Subject: merge from mzepf set_xy takes x, y instead of (x, y) --- diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py index 0346d0e..beccd2a 100644 --- a/TurtleArt/tabasics.py +++ b/TurtleArt/tabasics.py @@ -217,7 +217,7 @@ degrees)')) 'setxy2', 2, lambda self, x, y: primitive_dictionary['move']( - self.tw.turtles.get_active_turtle().set_xy, (x, y))) + self.tw.turtles.get_active_turtle().set_xy, x, y)) define_logo_function('tasetxy', 'to tasetxy :x :y\nsetxy :x :y\nend\n') primitive_dictionary['set'] = self._prim_set @@ -295,7 +295,7 @@ turtle (can be used in place of a number block)'), 'setxy', 2, lambda self, x, y: primitive_dictionary['move']( - self.tw.turtles.get_active_turtle().set_xy, (x, y), + self.tw.turtles.get_active_turtle().set_xy, x, y, pendown=False)) define_logo_function('tasetxypenup', 'to tasetxypenup :x :y\npenup\n\ setxy :x :y\npendown\nend\n') diff --git a/TurtleArt/taturtle.py b/TurtleArt/taturtle.py index 1ed557c..8d2afea 100644 --- a/TurtleArt/taturtle.py +++ b/TurtleArt/taturtle.py @@ -157,7 +157,7 @@ class Turtles: # if it is a new turtle, start it in the center of the screen self._active_turtle = self.get_turtle(turtle_name, True, colors) self._active_turtle.set_heading(0.0, False) - self._active_turtle.set_xy((0.0, 0.0), False, pendown=False) + self._active_turtle.set_xy(0.0, 0.0, False, pendown=False) self._active_turtle.set_pen_state(True) elif colors is not None: self._active_turtle = self.get_turtle(turtle_name, False) @@ -562,16 +562,15 @@ class Turtle: int(distance)])) self._turtles.turtle_window.send_event(event) - def set_xy(self, pos, share=True, pendown=True, dragging=False): + def set_xy(self, x, y, share=True, pendown=True, dragging=False): old = self.get_xy() - try: if dragging: - xcor = pos[0] - ycor = pos[1] + xcor = x + ycor = y else: - xcor = pos[0] * self._turtles.turtle_window.coord_scale - ycor = pos[1] * self._turtles.turtle_window.coord_scale + xcor = x * self._turtles.turtle_window.coord_scale + ycor = y * self._turtles.turtle_window.coord_scale except (TypeError, ValueError): debug_output('bad value sent to %s' % (__name__), self._turtles.turtle_window.running_sugar) diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 50691c8..3a8f4bb 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -2557,10 +2557,12 @@ before making changes to your Turtle Blocks program')) pos = self.turtles.screen_to_turtle_coordinates((dx, dy)) if self.selected_turtle.get_pen_state(): self.selected_turtle.set_pen_state(False) - self.selected_turtle.set_xy(pos, share=False, dragging=True) + self.selected_turtle.set_xy(*pos, share=False, + dragging=True) self.selected_turtle.set_pen_state(True) else: - self.selected_turtle.set_xy(pos, share=False, dragging=True) + self.selected_turtle.set_xy(*pos, share=False, + dragging=True) if self.update_counter % 5: self.lc.update_label_value( 'xcor', self.selected_turtle.get_xy()[0] / diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py index 8f5a94d..2ae320a 100644 --- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py +++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py @@ -1403,8 +1403,10 @@ Journal objects')) def _prim_showlist(self, sarray): """ Display list of media objects """ - x = self.tw.turtles.get_active_turtle.get_xy()[0] / self.tw.coord_scale - y = self.tw.turtles.get_active_turtle.get_xy()[1] / self.tw.coord_scale + x = (self.tw.turtles.get_active_turtle().get_xy()[0] / + self.tw.coord_scale) + y = (self.tw.turtles.get_active_turtle().get_xy()[1] / + self.tw.coord_scale) for s in sarray: self.tw.turtles.get_active_turtle().set_xy(x, y, pendown=False) self._prim_show(s) diff --git a/po/ko.po b/po/ko.po index 8eeab45..cc5a5c6 100644 --- a/po/ko.po +++ b/po/ko.po @@ -7,15 +7,14 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-05-17 00:31-0400\n" -"PO-Revision-Date: 2009-05-10 23:43-0400\n" +"PO-Revision-Date: 2013-08-06 11:21+0900\n" "Last-Translator: Donghee Park \n" "Language-Team: LANGUAGE \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Pootle 1.2.1\n" +"X-Generator: Poedit 1.5.7\n" #. TRANS: "name" option from activity.info file msgid "TurtleBlocks" @@ -86,7 +85,7 @@ msgstr "도" #: TurtleArt/tabasics.py:182 msgid "radius" -msgstr "라디우스" +msgstr "반지름" #: TurtleArt/tabasics.py:186 msgid "moves turtle along an arc" @@ -177,7 +176,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:1194 #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:1199 msgid "gray" -msgstr "" +msgstr "회색" #: TurtleArt/tabasics.py:309 msgid "set color" @@ -197,7 +196,7 @@ msgstr "" #: TurtleArt/tabasics.py:333 msgid "set gray" -msgstr "" +msgstr "회색으로 설정" #: TurtleArt/tabasics.py:336 msgid "sets gray level of the line drawn by the turtle" @@ -241,7 +240,7 @@ msgstr "" #: TurtleArt/tabasics.py:404 msgid "start fill" -msgstr "" +msgstr "채우기 시작" #: TurtleArt/tabasics.py:406 msgid "starts filled polygon (used with end fill block)" @@ -249,7 +248,7 @@ msgstr "" #: TurtleArt/tabasics.py:413 msgid "end fill" -msgstr "" +msgstr "채우기 끝" #: TurtleArt/tabasics.py:415 msgid "completes filled polygon (used with start fill block)" @@ -269,35 +268,35 @@ msgstr "" #: TurtleArt/tabasics.py:439 msgid "red" -msgstr "" +msgstr "빨간색" #: TurtleArt/tabasics.py:440 msgid "orange" -msgstr "" +msgstr "오렌지색" #: TurtleArt/tabasics.py:442 msgid "yellow" -msgstr "" +msgstr "노란색" #: TurtleArt/tabasics.py:444 msgid "green" -msgstr "" +msgstr "초록색" #: TurtleArt/tabasics.py:445 msgid "cyan" -msgstr "" +msgstr "사이안색" #: TurtleArt/tabasics.py:446 msgid "blue" -msgstr "" +msgstr "파란색" #: TurtleArt/tabasics.py:447 msgid "purple" -msgstr "" +msgstr "보라색" #: TurtleArt/tabasics.py:449 msgid "white" -msgstr "" +msgstr "하얀색" #: TurtleArt/tabasics.py:450 #, fuzzy @@ -497,7 +496,7 @@ msgstr "이면" #: TurtleArt/tabasics.py:775 msgid "if then" -msgstr "" +msgstr "만약" #: TurtleArt/tabasics.py:777 msgid "if-then operator that uses boolean operators from Numbers palette" @@ -509,7 +508,7 @@ msgstr "아니면" #: TurtleArt/tabasics.py:789 TurtleArt/tabasics.py:797 msgid "if then else" -msgstr "" +msgstr "그 외" #: TurtleArt/tabasics.py:790 TurtleArt/tabasics.py:798 msgid "if-then-else operator that uses boolean operators from Numbers palette" @@ -533,7 +532,7 @@ msgstr "" #: TurtleArt/tabasics.py:822 msgid "stop action" -msgstr "" +msgstr "멈춤" #: TurtleArt/tabasics.py:825 msgid "stops current action" @@ -573,7 +572,7 @@ msgstr "" #: TurtleArt/tawindow.py:1461 TurtleArt/tawindow.py:2077 #: TurtleArt/tawindow.py:4363 msgid "action" -msgstr "" +msgstr "행동" #: TurtleArt/tabasics.py:861 msgid "top of nameable action stack" @@ -617,7 +616,7 @@ msgstr "" #: TurtleArt/tabasics.py:924 TurtleArt/tawindow.py:4427 msgid "store in" -msgstr "" +msgstr "담기" #: TurtleArt/tabasics.py:924 TurtleArt/tabasics.py:939 msgid "box" @@ -625,7 +624,7 @@ msgstr "상자" #: TurtleArt/tabasics.py:924 TurtleArt/tawindow.py:4427 msgid "value" -msgstr "" +msgstr "물체" #: TurtleArt/tabasics.py:928 TurtleArt/tabasics.py:942 #: TurtleArt/tawindow.py:1355 TurtleArt/tawindow.py:1486 @@ -1128,7 +1127,7 @@ msgstr "" #: plugins/accelerometer/accelerometer.py:56 #: plugins/accelerometer/accelerometer.py:63 msgid "acceleration" -msgstr "" +msgstr "가속도" #: plugins/accelerometer/accelerometer.py:58 #: plugins/accelerometer/accelerometer.py:65 @@ -1148,7 +1147,7 @@ msgstr "" #: plugins/audio_sensors/audio_sensors.py:90 #: plugins/audio_sensors/audio_sensors.py:105 msgid "loudness" -msgstr "" +msgstr "소리크기" #: plugins/audio_sensors/audio_sensors.py:91 #: plugins/audio_sensors/audio_sensors.py:106 @@ -1206,7 +1205,7 @@ msgstr "" #: plugins/light_sensor/light_sensor.py:56 #: plugins/light_sensor/light_sensor.py:63 msgid "brightness" -msgstr "" +msgstr "밝기" #: plugins/camera_sensor/camera_sensor.py:82 #: plugins/camera_sensor/camera_sensor.py:130 @@ -1242,7 +1241,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:109 #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:112 msgid "while" -msgstr "" +msgstr "하는 동안" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:113 msgid "do-while-True operator that uses boolean operators from Numbers palette" @@ -1251,7 +1250,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:119 #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:122 msgid "until" -msgstr "" +msgstr "할 때 까지" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:123 msgid "do-until-True operator that uses boolean operators from Numbers palette" @@ -1303,7 +1302,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:200 #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:228 msgid "show" -msgstr "" +msgstr "보이기" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:204 #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:217 @@ -1417,7 +1416,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:343 #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:354 msgid "button down" -msgstr "" +msgstr "마우스 누름" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:346 msgid "returns 1 if mouse button is pressed" @@ -1429,7 +1428,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:364 msgid "mouse x" -msgstr "" +msgstr "마우스 가로 위치" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:367 msgid "returns mouse x coordinate" @@ -1437,7 +1436,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:374 msgid "mouse y" -msgstr "" +msgstr "마우스 세로 위치" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:377 msgid "returns mouse y coordinate" @@ -1462,7 +1461,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:430 msgid "read pixel" -msgstr "" +msgstr "색 확인" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:433 msgid "RGB color under the turtle is pushed to the stack" @@ -1470,7 +1469,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:441 msgid "turtle sees" -msgstr "" +msgstr "거북이가 보는 색깔" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:443 msgid "returns the color that the turtle \"sees\"" @@ -1478,7 +1477,7 @@ msgstr "" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:451 msgid "time" -msgstr "" +msgstr "시간" #: plugins/turtle_blocks_extras/turtle_blocks_extras.py:454 msgid "elapsed time (in seconds) since program started" diff --git a/pysamples/dotted_line.py b/pysamples/dotted_line.py index c581f83..c0d3008 100644 --- a/pysamples/dotted_line.py +++ b/pysamples/dotted_line.py @@ -94,8 +94,8 @@ # fillscreen(self, c, s) # tw.turtles.get_active_turtle().fillscreen(70, 90) # Note: Fill the screen with color 70, shade 90 (light blue) -# self.set_xy(self, (x, y)) -# tw.turtles.get_active_turtle().set_xy((100,100)) +# self.set_xy(self, x, y) +# tw.turtles.get_active_turtle().set_xy(100,100) # Note: Move the turtle to position (100, 100) # self.get_xy tw.turtles.get_active_turtle().get_xy()[0] # Note: The current x coordinate of the turtle -- cgit v0.9.1