
    Csi	                     v    d dl Z d dlmZ d dlmZ d dlmZ ddgZ G d de j                        Z	 G d d      Z
y)	    N)Optional)generic)pdf_nameAnnotAppearancesCoordinateSystemc                       e Zd ZdZdZ	 dZy)r   z,
    Positioning convention for stamps.
          N)__name__
__module____qualname____doc__PAGE_DEFAULTAMBIENT     e/var/www/python-projects/worksol/worksolenv/lib/python3.12/site-packages/pyhanko/stamp/appearances.pyr   r   
   s     L Gr   c                       e Zd ZdZ	 	 d	dej
                  deej
                     deej
                     fdZdej                  fdZ	y)
r   up  
    Convenience abstraction to set up an appearance dictionary for a PDF
    annotation.

    Annotations can have three appearance streams, which can be roughly
    characterised as follows:

    * *normal*: the only required one, and the default one;
    * *rollover*: used when mousing over the annotation;
    * *down*: used when clicking the annotation.

    These are given as references to form XObjects.

    .. note::
        This class only covers the simple case of an appearance dictionary
        for an annotation with only one appearance state.

    See § 12.5.5 in ISO 32000-1 for further information.
    Nnormalrolloverdownc                 .    || _         || _        || _        y )N)r   r   r   )selfr   r   r   s       r   __init__zAnnotAppearances.__init__8   s      	r   returnc                     t        j                  t        d      | j                  i      }| j                  | j                  |t        d      <   | j
                  | j
                  |t        d      <   |S )a  
        Convert the :class:`.AnnotationAppearances` instance to a PDF
        dictionary.

        :return:
            A :class:`~.pdf_utils.generic.DictionaryObject` that can be plugged
            into the ``/AP`` entry of an annotation dictionary.
        z/Nz/Rz/D)r   DictionaryObjectr   r   r   r   )r   ress     r   as_pdf_objectzAnnotAppearances.as_pdf_objectB   s^     &&'DE==$"&--C99 "&))C
r   )NN)
r   r   r   r   r   IndirectObjectr   r   r   r   r   r   r   r   r   #   s^    . 6:15	&& 7112 w--.	w77 r   )enumtypingr   pyhanko.pdf_utilsr   pyhanko.pdf_utils.genericr   __all__Enumr   r   r   r   r   <module>r'      s6      % .1
2tyy 2. .r   