개정판 3cc9f544
issue #655: fix text angle
Change-Id: I36e303f4d89dff9bfdb72e012d594645931e29f9
DTI_PID/DTI_PID/OcrResultDialog.py | ||
---|---|---|
276 | 276 |
self._text_item.update_shape() |
277 | 277 |
|
278 | 278 |
self.textInfoList = self.textInfoList[1:] |
279 |
''' |
|
279 |
''' |
|
280 |
radian = round(math.radians(abs(self.angle)), 2) |
|
281 |
if radian == 1.57 or radian == 4.71: |
|
282 |
for text_info in self.textInfoList: |
|
283 |
text_info.setAngle(radian) # 360 degree == 6.28319 radian |
|
284 |
width = text_info.getW() |
|
285 |
height = text_info.getH() |
|
286 |
text_info.setW(height) # SWAP |
|
287 |
text_info.setH(width) # SWAP |
|
280 | 288 |
|
281 | 289 |
QDialog.accept(self) |
282 | 290 |
|
내보내기 Unified diff