Skip to content

Commit

Permalink
Ensure valid "re" rectangles
Browse files Browse the repository at this point in the history
  • Loading branch information
JorjMcKie committed Jan 15, 2024
1 parent efda39e commit 49b4334
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8671,7 +8671,7 @@ def get_drawings(self, extended: bool=False) -> list:
cmd = item[0]
rest = item[1:]
if cmd == "re":
item = ("re", Rect(rest[0]), rest[1])
item = ("re", Rect(rest[0]).normalize(), rest[1])
elif cmd == "qu":
item = ("qu", Quad(rest[0]))
else:
Expand Down Expand Up @@ -8805,7 +8805,7 @@ def get_lineart(self) -> object:
cmd = item[0]
rest = item[1:]
if cmd == "re":
item = ("re", Rect(rest[0]), rest[1])
item = ("re", Rect(rest[0]).normalize(), rest[1])
elif cmd == "qu":
item = ("qu", Quad(rest[0]))
else:
Expand Down
4 changes: 2 additions & 2 deletions src_classic/fitz_old.i
Original file line number Diff line number Diff line change
Expand Up @@ -6344,7 +6344,7 @@ def get_oc_items(self) -> list:
cmd = item[0]
rest = item[1:]
if cmd == "re":
item = ("re", Rect(rest[0]), rest[1])
item = ("re", Rect(rest[0]).normalize(), rest[1])
elif cmd == "qu":
item = ("qu", Quad(rest[0]))
else:
Expand Down Expand Up @@ -6479,7 +6479,7 @@ def get_oc_items(self) -> list:
cmd = item[0]
rest = item[1:]
if cmd == "re":
item = ("re", Rect(rest[0]), rest[1])
item = ("re", Rect(rest[0]).normalize(), rest[1])
elif cmd == "qu":
item = ("qu", Quad(rest[0]))
else:
Expand Down

0 comments on commit 49b4334

Please sign in to comment.