Skip to content

Commit 981ed6d

Browse files
committed
fixed naming in TransformableImage class
1 parent 4a4f679 commit 981ed6d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/turtle.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -867,11 +867,11 @@ def __init__(self, screen, image):
867867
self._screen = screen
868868
self._originalImage = image
869869
self._rotationCenter = (image.width() / 2, image.height() / 2)
870-
self._tkPhotoImage = image.copy()
870+
self._transformedImage = image.copy()
871871
self._currentOrientation = (1.0, 0)
872872
self._currentTilt = 0.0
873873
self._transformMatrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
874-
self._item = screen._createimage(self._tkPhotoImage)
874+
self._item = screen._createimage(self._transformedImage)
875875

876876
def clone(self, *args, **kwargs):
877877
return self.__class__(self._screen, self._originalImage, *args, **kwargs)
@@ -965,7 +965,7 @@ def draw(self, position, orientation, tilt):
965965
bounding_box = self._get_new_bounding_box()
966966
offset_x = bounding_box["min_x"] * -1
967967
offset_y = bounding_box["min_y"] * -1
968-
self._tkPhotoImage = TK.PhotoImage(width=bounding_box["width"],
968+
self._transformedImage = TK.PhotoImage(width=bounding_box["width"],
969969
height=bounding_box["height"])
970970

971971
for new_y in range(bounding_box["height"]):
@@ -981,11 +981,11 @@ def draw(self, position, orientation, tilt):
981981
is_transparent = self._originalImage.transparency_get(
982982
int(original_x), int(original_y)
983983
)
984-
self._tkPhotoImage.put(
984+
self._transformedImage.put(
985985
"#{:02x}{:02x}{:02x}".format(rgb[0], rgb[1], rgb[2]),
986986
(new_x, new_y),
987987
)
988-
self._tkPhotoImage.transparency_set(
988+
self._transformedImage.transparency_set(
989989
new_x, new_y, is_transparent
990990
)
991991
elif (
@@ -998,17 +998,17 @@ def draw(self, position, orientation, tilt):
998998
is_transparent = self._originalImage.transparency_get(
999999
int(original_x), int(original_y)
10001000
)
1001-
self._tkPhotoImage.put(
1001+
self._transformedImage.put(
10021002
"#{:02x}{:02x}{:02x}".format(rgb[0], rgb[1], rgb[2]),
10031003
(new_x, new_y),
10041004
)
1005-
self._tkPhotoImage.transparency_set(
1005+
self._transformedImage.transparency_set(
10061006
new_x, new_y, is_transparent
10071007
)
10081008

10091009
self._currentOrientation = orientation
10101010
self._currentTilt = tilt
1011-
self._screen._drawimage(self._item, position, self._tkPhotoImage)
1011+
self._screen._drawimage(self._item, position, self._transformedImage)
10121012

10131013
def delete(self):
10141014
self._screen._delete(self._item)

0 commit comments

Comments
 (0)