o
    bV                     @  s|   d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ er4d dlmZ G d	d
 d
eZdS )    )annotations)TYPE_CHECKINGAny)	Transform)AbstractPointPen)	Component)Contour)Point)Glyphc                   @  sV   e Zd ZdZdZd!ddZd"d#ddZd$ddZ							d%d&ddZ		d"d'dd Z	d	S )(GlyphPointPenz|A point pen.

    See :mod:`fontTools.pens.basePen` and :mod:`fontTools.pens.pointPen` for an
    introduction to pens.
    _glyph_contourglyphr
   returnNonec                 C  s   || _ d | _d S Nr   )selfr    r   A/usr/lib/python3/dist-packages/ufoLib2/pointPens/glyphPointPen.py__init__   s   
zGlyphPointPen.__init__N
identifier
str | Nonekwargsr   c                 K  s   t |d| _d S N)r   )r   r   )r   r   r   r   r   r   	beginPath   s   zGlyphPointPen.beginPathc                 C  s,   | j d u r	td| jj| j  d | _ d S )NCall beginPath first.)r   
ValueErrorr   Zcontoursappend)r   r   r   r   endPath    s   

zGlyphPointPen.endPathFpttuple[float, float]segmentTypesmoothboolnamec           	   
   K  s:   | j d u r	td|\}}| j t||||||d d S )Nr   )typer#   r%   r   )r   r   r   r	   )	r   r    r"   r#   r%   r   r   xyr   r   r   addPoint&   s   
	zGlyphPointPen.addPoint	baseGlyphstrtransformationr   c                 K  s    t |||d}| jj| d S r   )r   r   Z
componentsr   )r   r*   r,   r   r   Z	componentr   r   r   addComponent8   s   zGlyphPointPen.addComponent)r   r
   r   r   r   )r   r   r   r   r   r   )r   r   )NFNN)r    r!   r"   r   r#   r$   r%   r   r   r   r   r   r   r   )
r*   r+   r,   r   r   r   r   r   r   r   )
__name__
__module____qualname____doc__	__slots__r   r   r   r)   r-   r   r   r   r   r      s    

	r   N)Z
__future__r   typingr   r   ZfontTools.misc.transformr   ZfontTools.pens.pointPenr   ZufoLib2.objects.componentr   ZufoLib2.objects.contourr   ZufoLib2.objects.pointr	   ZufoLib2.objects.glyphr
   r   r   r   r   r   <module>   s    