Skip to content

Commit

Permalink
Merge pull request #119 from computational-psychology/fix/text
Browse files Browse the repository at this point in the history
fix(text): remove text direction argument
  • Loading branch information
JorisVincent authored Dec 18, 2023
2 parents 7883ef4 + 6cceca6 commit 759f8e8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions stimupy/components/texts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def text(
intensity_background=0.5,
fontsize=36,
align="center",
direction="ltr",
# direction="ltr",
):
"""Draw given text into a (numpy) image-array
Expand All @@ -42,8 +42,6 @@ def text(
font size, by default 36
align : "left", "center" (default), "right"
alignment of text, by default "center"
direction : "ltr" (default), "rtl"
text drawing direction, left-to-right, right-to-left
Returns
-------
Expand Down Expand Up @@ -89,7 +87,14 @@ def text(
draw = ImageDraw.Draw(img)

# Draw text into this image
draw.text((0, 0), text, fill=1, font=font, align=align, direction=direction)
draw.text(
(0, 0),
text,
fill=1,
font=font,
align=align,
# direction=direction
)

# Turn into mask-array
mask = np.array(img)
Expand Down

0 comments on commit 759f8e8

Please sign in to comment.