Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7202794

Browse files
committed
add WordItem.__str__
1 parent9842179 commit7202794

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎hocr-editor.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ def __init__(self, word, word_selected_cb, word_changed_cb):
9494
# disable text overlay
9595
self.text_item=None
9696

97+
def__str__(self):
98+
pos=self.scenePos()
99+
return (
100+
f"WordItem("+
101+
f"span_range={self.word.span_range!r}"+
102+
f", id={self.word.id!r}"+
103+
f", text={self.word.text!r}"+
104+
f", bbox={self.word.bbox!r}"+
105+
f", pos={(pos.x(),pos.y())!r}"+
106+
f")"
107+
)
108+
97109
@print_exceptions
98110
defmove_done_cb(self,pos1,pos2):
99111
self._update_text_position()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp