Skip to content

ENH: Add circle annotation support#1556

Merged
MartinThoma merged 7 commits intomainfrom
circle-annotation
Jan 18, 2023
Merged

ENH: Add circle annotation support#1556
MartinThoma merged 7 commits intomainfrom
circle-annotation

Conversation

@MartinThoma
Copy link
Copy Markdown
Member

See #107

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 15, 2023

Codecov Report

Base: 91.86% // Head: 91.87% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (647f5f2) compared to base (c293b95).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1556   +/-   ##
=======================================
  Coverage   91.86%   91.87%           
=======================================
  Files          33       33           
  Lines        6124     6130    +6     
  Branches     1208     1210    +2     
=======================================
+ Hits         5626     5632    +6     
  Misses        322      322           
  Partials      176      176           
Impacted Files Coverage Δ
pypdf/generic/_annotations.py 97.61% <100.00%> (+0.18%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MartinThoma
Copy link
Copy Markdown
Member Author

@pubpub-zz / @MasterOdin Should we call it "ellipse" instead of circle? (similar to the fact that we called it "square" instead of rectangle? https://pypdf.readthedocs.io/en/latest/modules/AnnotationBuilder.html#pypdf.generic.AnnotationBuilder.rectangle

@pubpub-zz
Copy link
Copy Markdown
Collaborator

pubpub-zz commented Jan 15, 2023

@pubpub-zz / @MasterOdin Should we call it "ellipse" instead of circle? (similar to the fact that we called it "square" instead of rectangle? https://pypdf.readthedocs.io/en/latest/modules/AnnotationBuilder.html#pypdf.generic.AnnotationBuilder.rectangle

ellipse is more consistent with rectangle. we must not forget the note:
This method uses the "circle" annotation type of the PDF format.

@MasterOdin
Copy link
Copy Markdown
Member

I agree that ellipse is more consistent with the existing rectangle method and that like using rectangle instead of square, using ellipse instead of circle is more mathematically accurate as you cannot draw a circle where the distance between the centre and the perimeter is different at some point in the circle, as then it wouldn't be a circle.

All circles are ellipses, but not all ellipses are circles.

@MartinThoma MartinThoma merged commit 3560550 into main Jan 18, 2023
@MartinThoma MartinThoma deleted the circle-annotation branch January 18, 2023 23:52
MartinThoma added a commit that referenced this pull request Jan 22, 2023
New Features (ENH):
-  Add page label support to PdfWriter (#1558)
-  Accept inline images with space before EI (#1552)
-  Add circle annotation support (#1556)
-  Add polygon annotation support (#1557)
-  Make merging pages produce a deterministic PDF (#1542, #1543)

Bug Fixes (BUG):
-  Fix error in cmap extraction (#1544)
-  Remove erroneous assertion check (#1564)
-  Fix dictionary access of optional page label keys (#1562)

Robustness (ROB):
-  Set ignore_eof=True for read_until_regex (#1521)

Documentation (DOC):
-  Paper size (#1550)

Developer Experience (DEV):
-  Fix broken combination of dependencies of docs.txt
-  Annotate tests appropriately (#1551)

[Full Changelog](3.2.1...3.3.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants