개정판 f24a438f
issue #663: fix indent
Change-Id: I226122c9cf1bbcfdbffcf08f0aaf54387de668db
DTI_PID/DTI_PID/tesseract_ocr_module.py | ||
---|---|---|
219 | 219 |
transform.translate(-imgWidth * 0.5, -imgHeight * 0.5) |
220 | 220 |
text_rect = transform.mapRect(text_rect) |
221 | 221 |
|
222 |
text_info = ti.TextInfo(self.text_filter(text), startPoint[0] + text_rect.left() - thickness,
|
|
222 |
text_info = ti.TextInfo(text_filter(text), startPoint[0] + text_rect.left() - thickness, |
|
223 | 223 |
startPoint[1] + text_rect.top() - thickness, |
224 | 224 |
text_rect.width(), text_rect.height(), angle) |
225 | 225 |
textInfoList.append(text_info) |
... | ... | |
236 | 236 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
237 | 237 |
return None |
238 | 238 |
|
239 |
def text_filter(self, text): |
|
240 |
""" fix input text """ |
|
241 |
text = text.replace('—', '-').replace('--', '-') |
|
242 |
return text |
|
239 |
def text_filter(text): |
|
240 |
""" fix input text """ |
|
241 |
text = text.replace('—', '-').replace('--', '-') |
|
242 |
return text |
내보내기 Unified diff