Skip to content

Commit ce377d0

Browse files
Fix typo function name (#79)
1 parent a9da3de commit ce377d0

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/text_alignment.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55

66

7-
def lenghth(a):
7+
def length(a):
88
s = len(a)
99
if s < 12:
1010
return 36
@@ -36,7 +36,7 @@ def text_alignment(label, im):
3636
if len(a) == 1:
3737
org = 29 - len(a[0]) + 2, 230
3838
x, y = org
39-
fontScale = lenghth(a[0])
39+
fontScale = length(a[0])
4040
font = ImageFont.truetype("font.ttf", fontScale)
4141
# thin border
4242
text = a[0][:-1]
@@ -56,7 +56,7 @@ def text_alignment(label, im):
5656
elif len(a) == 2:
5757
org = 29 - len(a[0]) + 2, 7
5858
x, y = org
59-
fontScale = lenghth(a[0])
59+
fontScale = length(a[0])
6060
font = ImageFont.truetype("font.ttf", fontScale)
6161

6262
# thin border
@@ -76,7 +76,7 @@ def text_alignment(label, im):
7676
im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR)
7777
org = 29 - len(a[1]) + 2, 230
7878
x, y = org
79-
fontScale = lenghth(a[1])
79+
fontScale = length(a[1])
8080
font = ImageFont.truetype("font.ttf", fontScale)
8181
# thin border
8282
text = a[1]
@@ -96,7 +96,7 @@ def text_alignment(label, im):
9696
elif len(a) == 3:
9797
org = 29 - len(a[0]) + 2, 7
9898
x, y = org
99-
fontScale = lenghth(a[0])
99+
fontScale = length(a[0])
100100
font = ImageFont.truetype("font.ttf", fontScale)
101101
# thin border
102102
text = a[0]
@@ -116,7 +116,7 @@ def text_alignment(label, im):
116116
im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR)
117117
org = 29 - len(a[1]) + 2, 210
118118
x, y = org
119-
fontScale = lenghth(a[1])
119+
fontScale = length(a[1])
120120
font = ImageFont.truetype("font.ttf", fontScale)
121121

122122
# thin border
@@ -137,7 +137,7 @@ def text_alignment(label, im):
137137
org = 29 - len(a[2]) + 2, 239
138138
x, y = org
139139

140-
fontScale = lenghth(a[2])
140+
fontScale = length(a[2])
141141
font = ImageFont.truetype("font.ttf", fontScale)
142142

143143
# thin border
@@ -158,7 +158,7 @@ def text_alignment(label, im):
158158
else:
159159
org = 29 - len(a[0]) + 2, 7
160160
x, y = org
161-
fontScale = lenghth(a[0])
161+
fontScale = length(a[0])
162162
font = ImageFont.truetype("font.ttf", fontScale)
163163

164164
# thin border
@@ -179,7 +179,7 @@ def text_alignment(label, im):
179179
im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR)
180180
org = 29 - len(a[1]) + 2, 40
181181
x, y = org
182-
fontScale = lenghth(a[1])
182+
fontScale = length(a[1])
183183
font = ImageFont.truetype("font.ttf", fontScale)
184184

185185
# thin border
@@ -199,7 +199,7 @@ def text_alignment(label, im):
199199
im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR)
200200
org = 29 - len(a[2]) + 2, 220
201201
x, y = org
202-
fontScale = lenghth(a[2])
202+
fontScale = length(a[2])
203203
font = ImageFont.truetype("font.ttf", fontScale)
204204

205205
# thin border
@@ -218,7 +218,7 @@ def text_alignment(label, im):
218218
im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR)
219219
org = 29 - len(a[3]) + 2, 250
220220
x, y = org
221-
fontScale = lenghth(a[3])
221+
fontScale = length(a[3])
222222
font = ImageFont.truetype("font.ttf", fontScale)
223223

224224
# thin border

0 commit comments

Comments
 (0)