Skip to content

Commit 22e22bd

Browse files
committed
Small fixes
1 parent 594be76 commit 22e22bd

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

transimage/canvas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __init__(self,parent,font):
8989
self.textTextCtrl = wx.TextCtrl(self,wx.ID_ANY,wx.EmptyString,wx.DefaultPosition,wx.DefaultSize,wx.TE_MULTILINE)
9090
self.textTextCtrl.SetForegroundColour(TEXT_COLOR)
9191
self.textTextCtrl.SetBackgroundColour(BACKGROUND_COLOR)
92-
self.textTextCtrl.SetFont(font)
92+
#self.textTextCtrl.SetFont(font)
9393

9494
textSizer.Add(self.textTextCtrl,1,wx.ALL|wx.EXPAND,5)
9595

@@ -282,7 +282,7 @@ def update_image(self,image):
282282
def edit_text(self,event):
283283
string=event.String
284284
font=event.Font
285-
font.SetPointSize(event.Size)
285+
#font.SetPointSize(event.Size)
286286
dlg = EditDialog(self,font)
287287

288288
dlg.textTextCtrl.SetValue(string)

transimage/transimage.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ def process_image(self,event):
436436
def translate(self):
437437
log.debug('Start the tranlsation of image')
438438
self.translator.text.clear()
439+
img=self.translator.img_process
439440
for text in self.imageCanvas.text:
440441
log.debug('Copy text object on canvas to image translator module')
441442
text_object=text['text_object']
@@ -454,6 +455,8 @@ def translate(self):
454455
string=text['original_translated']
455456
else:
456457
string= self.translator.run_translator(text_object.String)
458+
cv2.rectangle(img, (x, y), (x+w, y+h), (255, 255, 255), -1)
459+
457460
self.translator.text.append(
458461
{
459462
'x': x,

0 commit comments

Comments
 (0)