parameters: change Align enum members to uppercase

This commit is contained in:
David Lechner
2019-02-27 15:23:16 -06:00
parent fe93f0c0b1
commit e44f9d7bc6
2 changed files with 22 additions and 22 deletions
+4 -4
View File
@@ -39,8 +39,8 @@ class Display():
pass
def image(self, file_name, alignment=Align.center, coordinate=None, clear=True):
"""image(file_name, alignment=Align.center, coordinate=None, clear=True)
def image(self, file_name, alignment=Align.CENTER, coordinate=None, clear=True):
"""image(file_name, alignment=Align.CENTER, coordinate=None, clear=True)
Show an image file.
@@ -48,7 +48,7 @@ class Display():
Arguments:
file_name (str): Path to the image file. Paths may be absolute or relative from the project folder.
alignment (Align): Where to place the image (*Default*: Align.center).
alignment (Align): Where to place the image (*Default*: Align.CENTER).
coordinate (tuple): ``(x, y)`` coordinate tuple. It is the top-left corner of the image (*Default*: None).
clear (bool): Whether to clear the screen before showing the image (*Default*: ``True``).
@@ -62,7 +62,7 @@ class Display():
# Display a custom image image at the top right of the screen, without clearing
# the screen first
brick.display.image('arrow.png', Align.top_right, clear=False)
brick.display.image('arrow.png', Align.TOP_RIGHT, clear=False)
"""
pass
+18 -18
View File
@@ -197,25 +197,25 @@ class Button(Enum):
class Align():
"""Alignment of an image on the display.
.. data:: bottom_left
.. data:: bottom
.. data:: bottom_right
.. data:: left
.. data:: center
.. data:: right
.. data:: top_left
.. data:: top
.. data:: top_right
.. data:: BOTTOM_LEFT
.. data:: BOTTOM
.. data:: BOTTOM_RIGHT
.. data:: LEFT
.. data:: CENTER
.. data:: RIGHT
.. data:: TOP_LEFT
.. data:: TOP
.. data:: TOP_RIGHT
"""
bottom_left = 1
bottom = 2
bottom_right = 3
left = 4
center = 5
right = 6
top_left = 7
top = 8
top_right = 9
BOTTOM_LEFT = 1
BOTTOM = 2
BOTTOM_RIGHT = 3
LEFT = 4
CENTER = 5
RIGHT = 6
TOP_LEFT = 7
TOP = 8
TOP_RIGHT = 9
class Sound():