ó
    “’¤j  ã                   ó0   • S r SSKJrJrJr  SS jrSS jrg)zE
Helper module for the *bbox_inches* parameter in `.Figure.savefig`.
é    )ÚBboxÚTransformedBboxÚAffine2DNc                 óº  ^ ^^^^^^• T R                   mT R                  mT R                  R                  m/ m/ m[	        5       mT R
                   H·  nUR                  5       nUb  UR                  U" XB5      5        TR                  U5        UR                  SS9R                  5       nUR                  U4S j5        SUR                  ;   a  TR                  UR                  5        OTR                  T5        SS jUl        M¹     UU UUUUU4S jnUc  T R                  n[        5       R                  U5      nUT R                  -  n	[         R"                  " SS/UR$                  Q76 T l        UR'                  UR(                  5      u  p«T R                   R$                  U	-  u  pÍ[         R"                  " U
* U* XÍ5      T R                  l        T R                  R+                  5         [-        T R                  U5      T l         T R.                  R1                  X¬-  X½-  T R                   R2                  U-  T R                   R4                  U-  5        U$ )	a3  
Temporarily adjust the figure so that only the specified area
(bbox_inches) is saved.

It modifies fig.bbox, fig.bbox_inches,
fig.transFigure._boxout, and fig.patch.  While the figure size
changes, the scale of the original figure is conserved.  A
function which restores the original values are returned.
F)Úoriginalc                 ó   • U$ ©N© )ÚaÚrÚ_poss      Ú¤C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\matplotlib/_tight_bbox.pyÚ<lambda>Úadjust_bbox.<locals>.<lambda>   s   € ¹4ó    Úapply_aspectc                 ó   • g r	   r
   )Úposs    r   r   r   %   s   € ¨4r   c                  ó6  >• [        TR                  TT5       H&  u  pnU R                  U5        UT	L a  U ?M   X l        M(     TTl        TTl        TTR                  l        TR                  R                  5         TR                  R                  SSSS5        g )Nr   é   )ÚzipÚaxesÚset_axes_locatorr   ÚbboxÚbbox_inchesÚtransFigureÚ_boxoutÚ
invalidateÚpatchÚ
set_bounds)
ÚaxÚlocÚaspectr   ÚfigÚlocator_listÚ
old_aspectÚorigBboxÚorigBboxInchesÚsentinels
      €€€€€€€r   Úrestore_bboxÚ!adjust_bbox.<locals>.restore_bbox'   sƒ   ø€ Ü" 3§8¡8¨\¸:ÖF‰OˆB�VØ×Ñ Ô$Ø˜Ò!à’Oà"(–ñ  Gð ˆŒØ(ˆŒØ")ˆ�‰ÔØ�‰×"Ñ"Ô$Ø�	‰	×Ñ˜Q  1 aÕ(r   r   r	   )r   r   r   r   Úobjectr   Úget_axes_locatorr   ÚappendÚget_positionÚfrozenr   Ú__dict__Údpir   Úscaler   Úfrom_boundsÚsizeÚ	transformÚp0r   r   r   r    ÚwidthÚheight)r$   r   ÚrendererÚ	fixed_dpir!   ÚlocatorÚcurrent_posr*   ÚtrÚ	dpi_scaleÚx0Úy0Úw1Úh1r   r%   r&   r'   r(   r)   s   `             @@@@@@r   Úadjust_bboxrD      sÚ  þ€ ð �x‰x€HØ—_‘_€NØ�o‰o×%Ñ%€Gà€JØ€LÜ‹x€HØ�hŒhˆØ×%Ñ%Ó'ˆØÑØ�O‰O™G BÓ1Ô2Ø×Ñ˜GÔ$Ø—o‘o¨u�oÐ5×<Ñ<Ó>ˆØ
×Ñ¨kÓ?Ô@à˜RŸ[™[Ó(Ø×Ñ˜bŸo™oÕ.à×Ñ˜hÔ'Û/ˆŽñ ÷)ó )ð ÑØ—G‘Gˆ	Ü	‹×	Ñ	˜)Ó	$€BØ˜CŸG™GÑ#€Iä×&Ò& q¨!Ð?¨k×.>Ñ.>Ò?€C„OØ�\‰\˜+Ÿ.™.Ó)�F€BØ�X‰X�]‰]˜YÑ&�F€BÜ"×.Ò.°¨s°R°C¸Ó@€C‡O�OÔØ‡O�O×ÑÔ ä˜sŸ™°Ó3€C„Hà‡I�I×Ñ˜™ "¡'ØŸ™Ÿ™¨"Ñ,¨c¯h©h¯o©oÀÑ.BôDð Ðr   c                 ó6   • Uu  pEU" 5         [        XX#5      nXF4$ )z�
A function that needs to be called when figure dpi changes during the
drawing (e.g., rasterizing).  It recovers the bbox and re-adjust it with
the new dpi.
)rD   )r$   Úbbox_inches_restorer:   r;   r   r*   r   s          r   Úprocess_figure_for_rasterizingrG   I   s%   € ð !4Ñ€KÙ„NÜ�C hÓ:€Aàˆ>Ðr   r	   )Ú__doc__Úmatplotlib.transformsr   r   r   rD   rG   r
   r   r   Ú<module>rJ      s   ðñ÷ BÑ Aô>õBr   