forked from josch/plakativ
Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
a8cc4c438f |
1 changed files with 11 additions and 3 deletions
14
plakativ.py
14
plakativ.py
|
@ -740,7 +740,11 @@ class Plakativ:
|
|||
)
|
||||
)
|
||||
shape.finish(color=(1, 0, 0))
|
||||
shape.insertTextbox(
|
||||
if hasattr(shape, "insert_textbox"):
|
||||
it = shape.insert_textbox
|
||||
else:
|
||||
it = shape.insertTextbox
|
||||
it(
|
||||
fitz.Rect(
|
||||
x0 + 5,
|
||||
y0 + 5,
|
||||
|
@ -850,8 +854,12 @@ class Plakativ:
|
|||
)
|
||||
shape.finish(width=0.2, color=(0.5, 0.5, 0.5), dashes="[5 6 1 6] 0")
|
||||
if numbers:
|
||||
if hasattr(shape, "insert_textbox"):
|
||||
it = shape.insert_textbox
|
||||
else:
|
||||
it = shape.insertTextbox
|
||||
if portrait:
|
||||
shape.insertTextbox(
|
||||
it(
|
||||
fitz.Rect(
|
||||
mm_to_pt(self.layout["border_left"]) + 5,
|
||||
mm_to_pt(self.layout["border_top"]) + 5,
|
||||
|
@ -863,7 +871,7 @@ class Plakativ:
|
|||
color=(0.5, 0.5, 0.5),
|
||||
)
|
||||
else:
|
||||
shape.insertTextbox(
|
||||
it(
|
||||
fitz.Rect(
|
||||
mm_to_pt(self.layout["border_bottom"]) + 5,
|
||||
mm_to_pt(self.layout["border_left"]) + 5,
|
||||
|
|
Loading…
Reference in a new issue