Skip to content

Commit

Permalink
DOC: Add Polygon to a comment
Browse files Browse the repository at this point in the history
The annotations Polygon and Polyline automatically set /Rect.
  • Loading branch information
j-t-1 authored Nov 29, 2024
1 parent db460c0 commit 77d744d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pypdf/annotations/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class AnnotationDictionary(DictionaryObject, ABC):
def __init__(self) -> None:
from ..generic._base import NameObject

# "rect" should not be added here as PolyLine can automatically set it
# /Rect should not be added here as Polygon and PolyLine can automatically set it
self[NameObject("/Type")] = NameObject("/Annot")
# The flags were NOT added to the constructor on purpose: We expect that
# most users don't want to change the default. If they do, they
# can use the property. The default is 0.
# The flags were NOT added to the constructor on purpose:
# We expect that most users don't want to change the default.
# If they do, they can use the property. The default is 0.

@property
def flags(self) -> AnnotationFlag:
Expand Down

0 comments on commit 77d744d

Please sign in to comment.