Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions remarks/conversion/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def draw_annotations_on_pdf(data, page, inplace=False):

# Scribbles
else:
if seg_data == "Eraser":
# Overwrite eraser color to always be white.
seg_data['color-code'] = 2
for seg_points in seg_data["points"]:
# https://pymupdf.readthedocs.io/en/latest/recipes-annotations.html#how-to-use-ink-annotations
annot = page.add_ink_annot([seg_points])
Expand Down
2 changes: 1 addition & 1 deletion remarks/conversion/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def process_tool(pen, dims, w, opc):
opc = 0.6
# cc = 3
elif tool == "Eraser":
w = 1280 * w * w - 4800 * w + 4510
w = w * 6 * 2.3
# cc = 2
elif tool == "SharpPencil" or tool == "TiltPencil":
w = 16 * w - 27
Expand Down