+
    ŒvjSE ã                   ó  € R t RtRR.t^t^ RIt^ RIt^ RIHt ^ RIH	t	H
t
HtHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHtHt ^ RIHt ^ RIHtHtHt ^ RIHtHtHtHtH t  ^ RI!H"t"H#t#H$t$H%t%H&t&H't' ^ RI(H)t) ^ RI*H+t+H,t, ^ RI-H.t. ]P^                  ! R4      t0^ t1^t2^ ^ ]13R^ ^ ]23R^^ ]13R^^ ]23R^ ^]13R^ ^]23R^^]13R^^]23R/t3R$R lt4R t5R t6R t7 ! R R4      t8R t9 ! R  R4      t: ! R! R]4      t;]<R"8X  d   ]=! R#4       R# R# )%z3.3.0zz
The Canvas object is the primary interface for creating PDF files. See
doc/reportlab-userguide.pdf for copious examples.
ÚCanvasÚShowBoundaryValueN)Údigits)ÚsinÚcosÚtanÚpi)Ú	rl_config)Úpdfdoc)Ú
pdfmetrics)Ú	ShapedStrÚshapeFragWord)Ú
pathobject)ÚPDFTextObjectÚ_PDFColorSetterÚbidiShapedText)ÚblackÚ_chooseEnforceColorSpaceÚColorÚ	CMYKColorÚtoColor)ÚImageReaderÚisSeqÚisStrÚ	isUnicodeÚ	_digesterÚ	asUnicode)ÚABag)Úfp_strÚ	escapePDF)ÚaspectRatioFixz\dÚnÚSzf*ÚfzB*ÚBc                 ó
  € ^ RI Hp V'       d4   RV 9  d-   V! VP                  VP                  VP                  .4      V R&   RV 9  d;   YET;'       g    ^ .pV'       d   VP                  V! V4      4       V! V4      V R&   R# R# )é    )ÚPDFArrayÚCÚBorderN)Úreportlab.pdfbase.pdfdocr'   ÚredÚgreenÚblueÚappend)ÚDÚcolorÚ	thicknessÚ	dashArrayÚhradiusÚvradiusr'   Úborders   &&&&&&  Ú[/var/www/html/daimler-pipeline/venv/lib/python3.14/site-packages/reportlab/pdfgen/canvas.pyÚ
_annFormatr7   6   sn   € Ý1ß�˜A”Ù˜5Ÿ9™9 e§k¡k°5·:±:Ð>Ó?ˆˆ#‰Ø�qÔØ )§. .¨qÐ1ˆßØ�M‰M™( 9Ó-Ô.Ù˜vÓ&ˆˆ(‹ñ	 ó    c                 ó.  a€ \        V \        4      '       d^   V P                  oR \        ;QJ d&    . V3R lV P	                  4        4       F  NK  	  53# ! V3R lV P	                  4        4       4      3# \        V \
        4      '       d   RV P                  4       3# \        V \        \        34      '       d#   \        V 4      pV^8X  d   RV 3# V^8X  d   R V 3# M*\        V \        4      '       d   \        \        V 4      4      # \        RV ,          4      h)Ú
DeviceCMYKc              3   ó4   <"  € T F  qS,          x € K  	  R # 5i©N© )Ú.0ÚcÚds   & €r6   Ú	<genexpr>Ú"_normalizeColor.<locals>.<genexpr>L   s   øé € Ð">±¨1 Q§3¢3³ùs   ƒÚ	DeviceRGBzUnknown color %r)Ú
isinstancer   ÚdensityÚtupleÚcmykr   ÚrgbÚlistÚlenÚstrÚ_normalizeColorr   Ú
ValueError)ÚaColorÚlr@   s   & @r6   rL   rL   I   sÝ   ø€ Ü�&œ)×$Ò$Ø�N‰NˆØŸUœUÔ">°·±´Ó">ŸUÐ>Ð>˜UÔ">°·±´Ó">Ó>Ð>Ð>Ü	�FœE×	"Ò	"Ø˜FŸJ™J›LÐ(Ð(Ü	�FœU¤D˜M×	*Ò	*Ü�‹KˆØ�Œ6Ø Ð&Ð&Ø�!ŒVØ Ð'Ð'ð ä	�FœC×	 Ò	 Üœw v›Ó/Ð/Ü
Ð'¨&Õ0Ó
1Ð1r8   c                 óœ   € R p. pV  F@  p\        V4      w  rEVe   W8w  d   \        RV: RV: 24      hTpVP                  V4       KB  	  W3# )NzMismatch in color spaces: z and )rL   rM   r.   )ÚcolorsÚspaceÚ	outcolorsrN   ÚnspaceÚoutcolors   &     r6   Ú_normalizeColorsrV   Y   s[   € Ø€EØ€IÛˆÜ*¨6Ó2ÑˆØÒ ¤ÝÃeÊVÐTÓUÐUØˆØ×Ñ˜Ö"ñ ð ÐÐr8   c           	      ó  € ^ RI HpHp Ve%   \        V4      \        V 4      8w  d   \	        R4      h\        V 4      ^8X  d   V! ^V ^ ,          V ^ ,          R7      # \        V 4      ^8X  d:   Ve   V^ ,          ^ 8X  d(   V^,          ^8X  d   V! ^V ^ ,          V ^,          R7      # Vf>   \        V 4      p\        V4       Uu. uF  p\        V4      V^,
          ,          NK  	  ppM¨\        \        W4      4      pVP                  R R7       V^ ,          ^ ,          ^ 8w  d#   VP                  ^ RV^ ,          ^,          34       VR,          ^ ,          ^8w  d"   VP                  RVR,          ^,          34       \        \        V!  4      w  r. pV^R  Uu. uF  qˆNK  	  p	p. p
V ^ ,          pV R,           F@  pVP                  V! ^W¼R7      4       TpV
P                  R4       V
P                  R4       KB  	  V! WyV
R	R
7      # u upi u upi )r&   )ÚPDFExponentialFunctionÚPDFStitchingFunctionz4need to have the same number of colors and positions)ÚNÚC0ÚC1c                 ó   € V ^ ,          # ©r&   r=   )Úxs   &r6   Ú<lambda>Ú%_buildColorFunction.<locals>.<lambda>v   s   €  Q q¦Tr8   )Úkeyç        ç      ð?:é   NNz	[0.0 1.0])ÚDomainéÿÿÿÿ)r*   rX   rY   rJ   rM   ÚrangeÚfloatrI   ÚzipÚsortÚinsertr.   )rQ   Ú	positionsrX   rY   Úncr_   Ú	poscolorsÚ	functionsÚposÚboundsÚencodeÚ	lastcolorr0   s   &&           r6   Ú_buildColorFunctionru   d   sÔ  € ßUØÒ¤ Y£´3°v³;Ô!>ÜÐOÓPÐPä
ˆ6ƒ{�aÔá%¨¨f°Q­i¸FÀ1½IÔFÐFÜ
ˆ6ƒ{�aÔØÒ ¨1¥°Ô!2°yÀµ|ÀqÔ7HÙ)¨A°&¸µ)ÀÀqÅ	ÔJÐJàÒÜ�‹[ˆÜ.3°B¬iÓ8©i¨”U˜1“X˜r !�t—_�_©iˆ	Ð8ˆ	ô œ˜YÓ/Ó0ˆ	Ø�‰™>ˆÔ*à�Q�<˜�?˜aÔØ×Ñ˜Q  i°¥l°1¥oÐ 6Ô7Ø�R�=˜Õ˜qÔ Ø×Ñ˜c 9¨R¥=°Õ#3Ð4Ô5Ü ¤ i¡Ó1Ñˆ	à€IØ& q¨™_Ó-™_�cŠc™_€FÐ-Ø€FØ�q•	€IØ˜—�ˆØ×ÑÑ/°!¸	ÔLÔMØˆ	Ø�‰�cÔØ�‰�cÖñ	 ñ
   	°6À+ÔNÐNùò+ 9ùò .s   Â?"HÆ
H	c            	       ó¦   a € ] tR t^‰t o ]! ^^RR^ RR7      t]! 0 RmR7      tR0t]R 4       t	]R 4       t
]R 4       tR	 tR
 tR tR tR tRtV tR# )Ú	ExtGStateFÚNormal)ÚCAÚcaÚOPÚopÚOPMÚBM)r~   r~   c                ó4   € \        V 4      P                  4       # r<   )rK   Úlower©Úvs   &r6   Ú_boolTransformÚExtGState._boolTransformœ   s   € ä�1‹v�|‰|‹~Ðr8   c                ó   € V # r<   r=   r�   s   &r6   Ú_identityTransformÚExtGState._identityTransform    s   € àˆr8   c                ó   € R V ,           # )Ú/r=   r�   s   &r6   Ú_pdfNameTransformÚExtGState._pdfNameTransform¤   s   € à�1�uˆr8   c                ó"   € / V n         / V n        R # r<   )Ú_dÚ_c©Úselfs   &r6   Ú__init__ÚExtGState.__init__¨   s   € ØˆŒØˆŽr8   c           	     óø  € V P                   V,          p\        V\        4      '       d   \        V4      pV P                  pMhW P                  9   dM   W0P
                  V,          9  d)   \        R V: RV: RV P
                  V,          : 24      hV P                  pMV P                  pW0P                  P                  W$4      8w  g   VR8X  d«   V P                  R4      V8w  d“   W0P                  V&   W%! V4      3pW`P                  9   d   V P                  V,          pM3R\        \        V P                  4      4      ,           pWpP                  V&   VP                  P!                  RV,          4       R# R# R# )z
ExtGstate[z] = z not in allowed values r|   r{   ÚgRLsz/%s gsN)ÚdefaultsrD   Úboolrƒ   ÚpdfNameValuesÚallowedrM   rŠ   r†   r�   ÚgetÚgetValuerŽ   rK   rJ   Ú_coder.   )r�   ÚcanvÚar‚   r@   Ú
vTransformÚtÚnames   &&&&    r6   ÚsetÚExtGState.set¬   s  € Ø�M‰M˜!ÕˆÜ�aœ×ÒÜ�1‹gˆAØ×,Ñ,‰JØ×$Ñ$Ô$ØŸ™ Q�Ô'Ý Û“a˜Ÿ™ QŸð")ó *ð *à×/Ñ/‰Jà×0Ñ0ˆJØ�g‰g�k‰k˜!ÓÔ 1 d¤7¨t¯}©}¸TÓ/BÀAÔ/EØ�G‰G�A‰JØ�*˜Q“-�ˆAØ—G‘GŒ|Ø—w‘w˜q•z‘àœc¤# d§g¡g£,Ó/Õ/�Ø!—‘˜‘
Ø�J‰J×Ñ˜h¨�oÖ.ñ 0F¡7r8   c                óZ   € V P                   P                  WP                  V,          4      # r<   )r�   r™   r•   )r�   r�   s   &&r6   rš   ÚExtGState.getValueÂ   s   € Ø�w‰w�{‰{˜1Ÿ]™]¨1Õ-Ó.Ð.r8   c                óä   € / pV P                   P                  4        F'  w  r#\        P                  ! \	        V34      4      W&   K)  	  T;'       d    \        P                  ! V4      ;'       g    R # r<   )rŽ   Úitemsr
   ÚPDFDictionaryÚdict)r�   r"   rŸ   r    s   &   r6   ÚgetStateÚExtGState.getStateÅ   sV   € ØˆØ—g‘g—m‘m–o‰FˆAÜ×*Ò*¬4°°«:Ó6ˆA‹Gñ &à×,Ð,”V×)Ò)¨!Ó,×4Ð4°Ð4r8   c                ó†   € V P                  4       pV P                  P                  4       Vn        V P                  Vn        V# )z=the states must be shared across push/pop, but the values not)Ú	__class__r�   ÚcopyrŽ   )r�   r_   s   & r6   ÚpushCopyÚExtGState.pushCopyË   s/   € à�N‰NÓˆØ�w‰w�|‰|‹~ˆŒØ�w‰wˆŒØˆr8   )rŽ   r�   N>   ÚHuer   ÚDarkenrx   ÚScreenÚLightenÚOverlayÚMultiplyÚ	ColorBurnÚ	ExclusionÚ	HardLightÚ	SoftLightÚ
ColorDodgeÚ
DifferenceÚ
LuminosityÚ
Saturation)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r¨   r•   r˜   r—   Ústaticmethodrƒ   r†   rŠ   r‘   r¡   rš   r©   r®   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r6   rw   rw   ‰   s“   ø‡ € ÙØØØØØØô€Hñ òô€Gð �F€Màñó ðð ñó ðð ñó ðòò/ò,/ò5÷ð r8   rw   c                 óä   € \        V \        \        34      '       dE   \        V 4      ^8w  d   \	        RV ,          4      hRV  Uu. uF  q'       d   RMRNK  	  up,          # V '       d   R# R# u upi )é   z wrong length for extend argumentz[%s %s]ÚtrueÚfalsez[true true]z[false false])rD   rI   rF   rJ   rM   )ÚextendÚ_s   & r6   Ú_gradientExtendStrrÍ   Ò   sc   € Ü�&œ$œu˜×&Ò&Üˆv‹;˜Œ>ÜÐ?À&ÕHÓIÐIØ¹fÓE¹f¸¦a™F¨WÒ4¹fÑEÕEÐEß"ˆ=Ð7¨Ð7ùò Fs   ÁA-c                   ó0   a € ] tR t^Ùt o RR ltR tRtV tR# )r   Nc                ó*   € Wn         W n        W0n        R # r<   )r0   Úwidthr2   )r�   r0   rÐ   r2   s   &&&&r6   r‘   ÚShowBoundaryValue.__init__Ú   s   € ØŒ
ØŒ
Ø"Žr8   c                óL   € V P                   R J;'       d    V P                  ^ 8¬  # r<   )r0   rÐ   r�   s   &r6   Ú__bool__ÚShowBoundaryValue.__bool__ß   s!   € Ø�z‰z Ð%×7Ð7¨$¯*©*°a©-Ð7r8   )r0   r2   rÐ   )©r&   r&   r&   gš™™™™™¹?N)r¾   r¿   rÀ   rÁ   r‘   rÓ   rÃ   rÄ   rÅ   s   @r6   r   r   Ù   s   ø‡ € ô#÷
8ð 8r8   c                   óT  a € ] tR t^ât o RtR„R ltR tR tR tR t	RP                  4       t]! ]! ]! ]4      4      4      tR	 tR
 tR tR tR…R ltR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%R t&R  t'R! t(R" t)R# t*R$ t+R% t,R†R& lt-R‡R' lt.R( t/R) t0R* t1RˆR, lt2R‰R- lt3R. t4R/ t5R0 t6RŠR1 lt7R2 t8R‹R3 lt9RŒR4 lt:R�R5 lt;R�R6 lt<]<t=R. RŽO^R^ 3R7 lt>R�R8 lt?]?t@R�R9 ltAR‘R: ltBR’R; ltCR“R< ltDR= tER> tFR? tGR@ tHRA tIR”RB ltJRC tKRD tLRE tMRF tNR‹RG ltORH tPRI tQRJ tRRK tSRL tTRM tURN tVRO tWRP tXRQ tYRR tZR•RS lt[RT t\RU t]R–RV lt^R—RW lt_R—RX lt`R—RY ltaR—RZ ltbR—R[ ltcR\ tdR] teR˜R^ ltfR˜R_ ltgR™R` lthR™Ra ltiR™Rb ltj]kPØ                  R^ RRR+3Rc ltmRd tnRe toRšRf ltpR›Rg ltqR›Rh ltrRi tsRj ttRk tuRl tv. ^ 3Rm ltwRn txRœRo ltyRšRp ltzRœRq lt{R�Rr lt|Rs t}R‹Rt lt~RšRu ltRžRv lt€Rw t�Rx t‚Ry tƒRz t„R{ t…R| t†R} t‡RŸR~ ltˆ]‰R 4       tŠR€ t‹R� tŒR‚ t�RƒtŽV t�R# ) r   aÿ  This class is the programmer's interface to the PDF file format.  Methods
are (or will be) provided here to do just about everything PDF can do.

The underlying model to the canvas concept is that of a graphics state machine
that at any given point in time has a current font, fill color (for figure
interiors), stroke color (for figure borders), line width and geometric transform, among
many other characteristics.

Canvas methods generally either draw something (like canvas.line) using the
current state of the canvas or change some component of the canvas
state (like canvas.setFont).  The current state can be saved and restored
using the saveState/restoreState methods.

Objects are "painted" in the order they are drawn so if, for example
two rectangles overlap the last draw will appear "on top".  PDF form
objects (supported here) are used to draw complex drawings only once,
for possible repeated use.

There are other features of canvas which are not visible when printed,
such as outlines and bookmarks which are used for navigating a document
in a viewer.

Here is a very silly example usage which generates a Hello World pdf document.

Example:: 

   from reportlab.pdfgen import canvas
   c = canvas.Canvas("hello.pdf")
   from reportlab.lib.units import inch
   # move the origin up and to the left
   c.translate(inch,inch)
   # define a large font
   c.setFont("Helvetica", 80)
   # choose some colors
   c.setStrokeColorRGB(0.2,0.5,0.3)
   c.setFillColorRGB(1,0,1)
   # draw a rectangle
   c.rect(inch,inch,6*inch,9*inch, fill=1)
   # make text go straight up
   c.rotate(90)
   # change color
   c.setFillColorRGB(0,0,0.77)
   # say hello (note after rotate the y coord needs to be negative!)
   c.drawString(3*inch, -3*inch, "Hello World")
   c.showPage()
   c.save()

Nc                óz  € Vf   \         P                  pVf   \         P                  pV'       d   TM\         P                  V n        Ve   TM^V n        Ve   TMV P
                  R,          V n        Wn        \        P                  ! TYQT	;'       g    \        P                  VR7      V n        \        V
4      V n        W`n        RV n        W€n        W n        RV n        ^ V n        RV n        RV n        / V n        V P/                  V4       ^V n        . V n        V P5                  4        ^ V n        . V n        . V n        . V n        W0n        \         P@                  V n!        Wàn"        Wðn#        VV n$        VV n%        V PM                  4        V PO                  4        . V n(        V PS                  V4       / V n*        R# )a‚  Create a canvas of a given size. etc.

You may pass a file-like object to filename as an alternative to
a string.
For more information about the encrypt parameter refer to the setEncrypt method.

Most of the attributes are private - we will use set/get methods
as the preferred interface.  Default page size is A4.
cropMarks may be True/False or an object with parameters borderWidth, markColor, markWidth
and markLength

if enforceColorSpace is in ('cmyk', 'rgb', 'sep','sep_black','sep_cmyk') then one of
the standard _PDFColorSetter callables will be used to enforce appropriate color settings.
If it is a callable then that will be used.
Nç333333ó?)ÚcompressionÚ	invariantÚfilenameÚ
pdfVersionÚlang)+r	   ÚdefaultPageSizerÚ   Úcanvas_basefontnameÚ_initialFontNameÚ_initialFontSizeÚ_initialLeadingÚ	_filenamer
   ÚPDFDocumentÚPDF_VERSION_DEFAULTÚ_docr   Ú_enforceColorSpaceÚ
_verbosityÚ_onPageÚ
_cropMarksÚ	_pagesizeÚ_hanging_pagesizeÚ_pageRotationÚ_pageTransitionÚ_pageDurationÚ_destinationsÚsetPageCompressionÚ_pageNumberÚ
_codeStackÚ_restartAccumulatorsÚ_annotationCountÚ	_outlinesÚ_psCommandsBeforePageÚ_psCommandsAfterPageÚbottomupÚdefaultImageCachingÚimageCachingÚ_cropBoxÚ_artBoxÚ_trimBoxÚ	_bleedBoxÚinit_graphics_stateÚ_make_preambleÚstate_stackÚ
setEncryptÚ_namedCB)r�   rÛ   Úpagesizerù   ÚpageCompressionrÚ   Ú	verbosityÚencryptÚ	cropMarksrÜ   ÚenforceColorSpaceÚinitialFontNameÚinitialFontSizeÚinitialLeadingÚcropBoxÚartBoxÚtrimBoxÚbleedBoxrÝ   Úkwdss   &&&&&&&&&&&&&&&&&&&,r6   r‘   ÚCanvas.__init__  s�  € ðF Ò¬	×(AÑ(A˜XØÒ¬)×*=Ñ*=˜iç3B¡Ì	×HeÑHeˆÔØ3BÒ3N¡ÐTVˆÔØ1?Ò1K™~ÐQU×QfÑQfÐgjÕQjˆÔà!Œä×&Ò&°?Ø1:Ø2<×2ZÐ2ZÄ×@ZÑ@ZØ,0ô)ˆŒ	ô #;Ð;LÓ"MˆÔð $Œð ˆŒØ#Œà!ŒØ!%ˆÔØˆÔà#ˆÔØ!ˆÔØˆÔà×Ñ Ô0ØˆÔàˆŒØ×!Ñ!Ô#Ø !ˆÔàˆŒØ%'ˆÔ"Ø$&ˆÔ!ð !ŒÜ%×9Ñ9ˆÔàŒØŒØˆŒØ!ˆŒà× Ñ Ô"Ø×ÑÔØˆÔà�‰˜Ô ØˆŽr8   c                óŠ  € V'       dœ   ^ RI Hp \        V4      '       dF   \        V4      '       d   VP	                  R4      pVP                  V4      pVP                  ^4       M-\        WP
                  4      '       g   \        RV,          4      hWP                  n
        R#  V P                  =
R#   \         d     R# i ; i)a@  
Set the encryption used for the pdf generated by this canvas.
If encrypt is a string object, it is used as the user password for the pdf.
If encrypt is an instance of reportlab.lib.pdfencrypt.StandardEncryption, this object is
used to encrypt the pdf. This allows more finegrained control over the encryption settings.
)Ú
pdfencryptúutf-8zjExpected string or instance of reportlab.lib.pdfencrypt.StandardEncryption as encrypt parameter but got %rN)Úreportlab.libr  r   r   rs   ÚStandardEncryptionÚsetAllPermissionsrD   Ú	TypeErrorræ   r  ÚAttributeError)r�   r  r  s   && r6   r  ÚCanvas.setEncryptv  s¨   € ÷ Ý0Ü�W�~Š~Ü˜W×%Ò%Ø%Ÿn™n¨WÓ5�GØ$×7Ñ7¸Ó@�Ø×)Ñ)¨!Õ,Ü ×)FÑ)F×GÒGÜð  !Mð  PWõ  !Wó  Xð  XØ '�I‰IÖðØ—I‘IÒ%øÜ!ô Úðús   Â%B3 Â3CÃCc                óÌ  € ^ V n         ^ V n        V P                  V n        V P                  V n        ^ V n        V P                  V n        RV n	        \        V n        ^ V n        ^ V n        ^dV n        ^ V n        ^ V n        RV n        RV n        ^ V n        ^ V n        RV n        ^V n        ^ V n        \0        P2                  ;'       g    R;V n        V n        \9        4       V n        R# )r&   N)rd   rc   rc   rd   rc   rc   rÕ   )Ú_xÚ_yrà   Ú	_fontnamerá   Ú	_fontsizeÚ	_textModerâ   Ú_leadingÚ_currentMatrixÚFILL_EVEN_ODDÚ	_fillModeÚ
_charSpaceÚ
_wordSpaceÚ_horizScaleÚ_textRenderModeÚ_riseÚ_textLineMatrixÚ_textMatrixÚ_lineCapÚ	_lineJoinÚ	_lineDashÚ
_lineWidthÚ_mitreLimitr	   Úcanvas_baseColorÚ_fillColorObjÚ_strokeColorObjrw   Ú
_extgstater�   s   &r6   r   ÚCanvas.init_graphics_state�  sÒ   € àˆŒØˆŒØ×.Ñ.ˆŒØ×.Ñ.ˆŒàˆŒØ×,Ñ,ˆŒØ6ˆÔÜ&ˆŒð ˆŒØˆŒØˆÔØ ˆÔØˆŒ
Ø7ˆÔØ3ˆÔð ˆŒØˆŒØˆŒØˆŒØˆÔä4=×4NÑ4N×4YÐ4YÐRYÐYˆÔ˜TÔ1Ü#›+ˆŽr8   c                óÐ   € / pV P                   pV P                   F  pW#,          W&   K  	  V P                  P                  V4       V P                  P                  4       V n        R # r<   )Ú__dict__ÚSTATE_ATTRIBUTESr  r.   r6  r®   )r�   Ústater@   r    s   &   r6   Úpush_state_stackÚCanvas.push_state_stack¬  sQ   € ØˆØ�M‰MˆØ×)Ô)ˆDØ�'ˆE‹Kñ *à×Ñ×Ñ Ô&ØŸ/™/×2Ñ2Ó4ˆŽr8   c                ól   € V P                   P                  V P                  P                  4       4       R # r<   )r9  Úupdater  Úpopr�   s   &r6   Úpop_state_stackÚCanvas.pop_state_stack´  s#   € Ø�‰×Ñ˜T×-Ñ-×1Ñ1Ó3Ö4r8   a  _x _y _fontname _fontsize _textMode _leading _currentMatrix _fillMode
     _charSpace _wordSpace _horizScale _textRenderMode _rise _textLineMatrix
     _textMatrix _lineCap _lineJoin _lineDash _lineWidth _mitreLimit _fillColorObj
     _strokeColorObj _extgstatec                ó$  € . P                   pV P                  '       d
   V! R 4       M)V! R\        V P                  ^,          4      ,          4       V P                  p\        V4      pV P                  R8w  d   V P                  V P                  4       V P                  R8w  d   V P                  V P                  4       V! RP                  W#R 4      4       W#R1 \        P                  ! V P                  4      pVP                  '       gb   VP                  P                   '       g   \#        V RR4      '       g3   V! RV P$                  P'                  V P                  4      ,          4       RP                  VP(                  4      V n        R# )z1 0 0 1 0 0 cmz1 0 0 -1 0 %s cmÚ NÚ_drawTextAsPathFzBT %s 12 Tf 14.4 TL ETrÕ   )r.   rù   r   rë   r›   rJ   r4  ÚsetFillColorr5  ÚsetStrokeColorÚjoinr   ÚgetFontr   Ú_dynamicFontÚfaceÚbuiltInÚgetattrræ   ÚgetInternalFontNameÚ__self__Ú	_preamble)r�   ÚPr(   r!   Úfonts   &    r6   r  ÚCanvas._make_preamble¿  s  € Ø�I‰IˆØ�=�=ˆ=ÙÐÕáÐ ¤6¨$¯.©.¸Õ*;Ó#<Õ<Ô=Ø�J‰JˆÜ�‹FˆØ×Ñ Ô(Ø×Ñ˜d×0Ñ0Ô1Ø×Ñ 7Ô*Ø×Ñ × 4Ñ 4Ô5Ù	ˆ#�(‰(�1�R�5‹/ÔØ‰bˆEÜ×!Ò! $§.¡.Ó1ˆØ× × Ð à�y‰y× × Ð ¬°Ð5FÀu×(MÒ(MÙÐ*¨T¯Y©Y×-JÑ-JÈ4Ï>É>Ó-ZÕZÔ[ØŸ™ !§*¡*Ó-ˆŽr8   c                ó   € \        V4      # r<   )r   ©r�   Úss   &&r6   Ú_escapeÚCanvas._escapeÔ  s   € Ü˜‹|Ðr8   c                ó<   € V P                   P                  V4       R# )zñidentify the author for invisible embedding inside the PDF document.
the author annotation will appear in the the text of the file but will
not automatically be seen when the document is viewed, but is visible
in document properties etc etc.N)ræ   Ú	setAuthor)r�   Úauthors   &&r6   rZ  ÚCanvas.setAuthorØ  s   € ð
 	�	‰	×Ñ˜FÖ#r8   c                ó<   € V P                   P                  V4       R# )zHaccepts a func(yyyy,mm,dd,hh,m,s) used to create embedded formatted dateN)ræ   ÚsetDateFormatter)r�   ÚdateFormatters   &&r6   r^  ÚCanvas.setDateFormatterß  s   € à�	‰	×"Ñ" =Ö1r8   c                óT   € V P                   P                  P                  W#WR7       R# )a2  Adds a new entry to the outline at given level.  If LEVEL not specified,
entry goes at the top level.  If level specified, it must be
no more than 1 greater than the outline level in the last call.

The key must be the (unique) name of a bookmark.
the title is the (non-unique) name to be displayed for the entry.

If closed is set then the entry should show no subsections by default
when displayed.

Example::

   c.addOutlineEntry("first section", "section1")
   c.addOutlineEntry("introduction", "s1s1", 1, closed=1)
   c.addOutlineEntry("body", "s1s2", 1)
   c.addOutlineEntry("detail1", "s1s2s1", 2)
   c.addOutlineEntry("detail2", "s1s2s2", 2)
   c.addOutlineEntry("conclusion", "s1s3", 1)
   c.addOutlineEntry("further reading", "s1s3s1", 2)
   c.addOutlineEntry("second section", "section1")
   c.addOutlineEntry("introduction", "s2s1", 1)
   c.addOutlineEntry("body", "s2s2", 1, closed=1)
   c.addOutlineEntry("detail1", "s2s2s1", 2)
   c.addOutlineEntry("detail2", "s2s2s2", 2)
   c.addOutlineEntry("conclusion", "s2s3", 1)
   c.addOutlineEntry("further reading", "s2s3s1", 2)

generated outline looks like::

    - first section
    |- introduction
    |- body
    |  |- detail1
    |  |- detail2
    |- conclusion
    |  |- further reading
    - second section
    |- introduction
    |+ body
    |- conclusion
    |  |- further reading

Note that the second "body" is closed.

Note that you can jump from level 5 to level 3 but not
from 3 to 5: instead you need to provide all intervening
levels going down (4 in this case).  Note that titles can
collide but keys cannot.
)ÚclosedN)ræ   ÚoutlineÚaddOutlineEntry)r�   Útitlerb   Úlevelrb  s   &&&&&r6   rd  ÚCanvas.addOutlineEntryã  s"   € ðh 	�	‰	×Ñ×)Ñ)¨#°eÐ)ÖKr8   c                ó^   € V P                   P                  P                  ! V 3V,           !   R# )a²  nametree should can be a recursive tree like so::
  
     c.setOutlineNames(
       "chapter1dest",
       ("chapter2dest",
        ["chapter2section1dest",
         "chapter2section2dest",
         "chapter2conclusiondest"]
       ), # end of chapter2 description
       "chapter3dest",
       ("chapter4dest", ["c4s1", "c4s2"])
       )

each of the string names inside must be bound to a bookmark
before the document is generated.
N)ræ   rc  ÚsetNames)r�   Únametrees   &*r6   ÚsetOutlineNames0ÚCanvas.setOutlineNames0  s#   € ð" 	�	‰	×Ñ×"Ò" d W¨XÕ%5Ô7r8   c                ó<   € V P                   P                  V4       R# )zXwrite a title into the PDF file that won't automatically display
in the document itself.N)ræ   ÚsetTitle)r�   re  s   &&r6   rn  ÚCanvas.setTitle,  s   € ð 	�	‰	×Ñ˜5Ö!r8   c                ó<   € V P                   P                  V4       R# )zZwrite a subject into the PDF file that won't automatically display
in the document itself.N)ræ   Ú
setSubject)r�   Úsubjects   &&r6   rq  ÚCanvas.setSubject1  s   € ð 	�	‰	×Ñ˜WÖ%r8   c                ó<   € V P                   P                  V4       R# )zÅwrite a creator into the PDF file that won't automatically display
in the document itself. This should be used to name the original app
which is passing data into ReportLab, if you wish to name it.N)ræ   Ú
setCreator)r�   Úcreators   &&r6   ru  ÚCanvas.setCreator6  s   € ð 	�	‰	×Ñ˜WÖ%r8   c                ó<   € V P                   P                  V4       R# )z!change the default producer valueN)ræ   ÚsetProducer)r�   Úproducers   &&r6   ry  ÚCanvas.setProducer<  s   € à�	‰	×Ñ˜hÖ'r8   c                ó–   € \        V\        \        34      '       d   RP                  V4      pV P                  P                  V4       R# )z|write a list of keywords into the PDF file which shows in document properties.
Either submit a single string or a list/tuplez, N)rD   rI   rF   rH  ræ   ÚsetKeywords)r�   Úkeywordss   &&r6   r}  ÚCanvas.setKeywords@  s5   € ô �h¤¤U˜|×,Ò,Ø—y‘y Ó*ˆHØ�	‰	×Ñ˜hÖ'r8   c                ó2   € \        V P                  4      ^ 8H  # )zHInfo function - app can call it after showPage to see if it needs a save)rJ   r›   r�   s   &r6   ÚpageHasDataÚCanvas.pageHasDataG  s   € ä�4—:‘:‹ !Ñ#Ð#r8   c                óN   € V P                   P                  P                  4        R# )zŽSpecify that Acrobat Reader should start with the outline tree visible.
showFullScreen() and showOutline() conflict; the one called last
wins.N)ræ   Ú_catalogÚshowOutliner�   s   &r6   r…  ÚCanvas.showOutlineK  s   € ð 	�	‰	×Ñ×&Ñ&Ö(r8   c                óN   € V P                   P                  P                  4        R# )z„Specify that Acrobat Reader should start in full screen mode.
showFullScreen() and showOutline() conflict; the one called last
wins.N)ræ   r„  ÚshowFullScreenr�   s   &r6   ÚshowFullScreen0ÚCanvas.showFullScreen0Q  s   € ð 	�	‰	×Ñ×)Ñ)Ö+r8   c                óv   € V P                   P                  R4       V P                  P                  V RV4       R# )z¹
Define the transparency/opacity of strokes. 0 is fully
transparent, 1 is fully opaque.

Note that calling this function will cause a version 1.4 PDF
to be generated (rather than 1.3).
Útransparencyry   N©ræ   ÚensureMinPdfVersionr6  r¡   ©r�   r‚   s   &&r6   Ú_setStrokeAlphaÚCanvas._setStrokeAlphaW  ó,   € ð 	�	‰	×%Ñ% nÔ5Ø�‰×Ñ˜D  aÖ(r8   c                óv   € V P                   P                  R4       V P                  P                  V RV4       R# )z½
Define the transparency/opacity of non-strokes. 0 is fully
transparent, 1 is fully opaque.

Note that calling this function will cause a version 1.4 PDF
to be generated (rather than 1.3).
rŒ  rz   Nr�  r�  s   &&r6   Ú_setFillAlphaÚCanvas._setFillAlphab  r’  r8   c                ó@   € V P                   P                  V R V4       R# )r{   N©r6  r¡   r�  s   &&r6   Ú_setStrokeOverprintÚCanvas._setStrokeOverprintm  ó   € Ø�‰×Ñ˜D  aÖ(r8   c                ó@   € V P                   P                  V R V4       R# )r|   Nr—  r�  s   &&r6   Ú_setFillOverprintÚCanvas._setFillOverprintp  rš  r8   c                óh   € V P                   P                  T R T;'       d    ^;'       g    ^ 4       R# )r}   Nr—  r�  s   &&r6   Ú_setOverprintMaskÚCanvas._setOverprintMasks  s$   € Ø�‰×Ñ˜D  q§w w¨Q§| |°!Ö4r8   c                ó@   € V P                   P                  V R V4       R# )r~   Nr—  r�  s   &&r6   ÚsetBlendModeÚCanvas.setBlendModev  rš  r8   c                ó®   € V P                   pV'       dA   \        ^ \        VR^ 4      4      p\        ^ \        VR^$4      4      pV'       d	   W2,          pV# R# )r&   Ú
bleedWidthÚborderWidthN)rê   ÚmaxrM  )r�   ÚcMÚbleedWÚbws   &   r6   Ú_getCmShiftÚCanvas._getCmShifty  sL   € Ø�_‰_ˆßÜ˜œ7 2 l°1Ó5Ó6ˆFÜ�Q”w˜r -°Ó3Ó4ˆBßØ•�ØˆIñ r8   c                óš	  € V P                   ^ ,          pV P                   ^,          pV P                  pV P                  pV'       EdŠ   \        ^ \	        VR^$4      4      pV'       Edj   \	        VR^4      p\        V\        ^ \	        VR^4      4      4      p\	        VRR4      p\	        VR\        4      p	^V,          V,
          p
\        V4      pV'       Ed   V	'       Ed   V P                  4        V P                  V	4       V P                  V4       V P                  V^ WW3W,           ^ W,           V3WRV
,           WR^V,          ,           3W,           W*,           W,           V^V,          ,           3^ WWV3W,           WQ^V,          ,           V3^ W%,           WrV,           3W,           W%,           V^V,          ,           W%,           3.4       V P                  4        V'       d   WKR pWKR1 \        V4      p\        ^ \	        VR^ 4      4      pV P                  4        V P                  W],
          W],
          4       V'       d=   V P                  ^R	V,          V,          ,           ^R	V,          V,          ,           4       WKR pWKR1 WäR
&   V P                  4        V'       d   VP                  X4       ^V,          V,           p^V,          V,           pVP!                  R4       \"        P$                  ! 4       pWn        W/n        V P*                  Vn        V P.                  Vn        VP3                  V P4                  4       VP7                  V P8                  4       R FW  p\	        V RV,          R4      pV'       g   K!  \;        VVP=                  4       R,           \"        P>                  ! V4      4       KY  	  V P@                  e   V P@                  Vn!        V PD                  V PF                  .,           V,           V PH                  ,           pVPK                  V4       V PM                  V4       V PO                  V4       V PQ                  V4       V PS                  V4       V PU                  V4       V PV                  PY                  V4       V PZ                  '       d   V P[                  V P\                  4       V P_                  4        R# )z8Close the current page and possibly start on a new page.r¦  ÚmarkLastÚ
markLengthÚ	markWidthç      à?Ú	markColorNr¥  g       @:r&   r&   NrD  ú_%sBoxÚBox)ÚcropÚartÚbleedÚtrim)0rë   rê   r›   r§  rM  Úminr   rJ   Ú	saveStaterG  ÚsetLineWidthÚlinesÚrestoreStateÚ	translateÚscalerË   r.   r
   ÚPDFPageÚ	pagewidthÚ
pageheightrí   ÚRotateÚ_currentPageHasImagesÚ	hasImagesÚsetPageTransitionrî   ÚsetCompressionÚ_pageCompressionÚsetattrÚ
capitalizer'   rï   ÚDurr÷   rP  rø   Ú	setStreamÚ_setColorSpaceÚ_setExtGStateÚ_setXObjectsÚ_setShadingUsedÚ_setAnnotationsræ   ÚaddPageré   rò   Ú
_startPage)r�   Ú	pageWidthÚ
pageHeightr¨  Úcoderª  r®  ÚmlÚmwÚmcÚmgÚcx0ÚLr©  r(   ÚpageÚboxÚsizeÚstrms   &                  r6   ÚshowPageÚCanvas.showPage‚  sÄ  € ð —N‘N 1Õ%ˆ	Ø—^‘^ AÕ&ˆ
Ø�_‰_ˆØ�z‰zˆßˆ2Ü�Q”w˜r -°Ó3Ó4ˆBßˆrÜ" 2 j°Ó3�Ü˜œC ¤'¨"¨\¸"Ó"=Ó>Ó?�Ü˜R ¨CÓ0�Ü˜R ¬EÓ2�Ø�r•T˜"•W�Ü˜$“i�ß�2Ÿ"˜"Ø—N‘NÔ$Ø×'Ñ'¨Ô+Ø×%Ñ% bÔ)Ø—J‘JØ˜A˜b˜Ø"� a¨	­°RÐ8Ø r�M¨"¸¸"½­_Ð=Ø"� j¥m°IµLÀÈAÈbÍDÅÐQØ˜2 ˜Ø"� b°1°Rµ4­¸Ð;Ø˜:�=¨°r­MÐ:Ø"� j¥m°I¸aÀ½dµNÀ:Å=ÐQð	 ô 	ð ×%Ñ%Ô'ßð ! ˜J˜Ø ¡˜JÜ! $›i˜ä˜Qœw r¨,°qÓ9Ó:�Ø—‘Ô Ø—‘˜r�y¨­Ô3ßà—J‘J˜q # f¥*¨iÕ!7Õ7¸¸3¸v½:ÀzÕ:QÕ8QÔRð ˜�J�Ø™�JØ�S‘	Ø×!Ñ!Ô#ßØ—K‘K ”NØ˜b�D 9Õ,�	Ø˜r�T JÕ.�
à�‰�CÔÜ�~Š~ÓˆØ"ŒØ$ŒØ×(Ñ(ˆŒØ×3Ñ3ˆŒØ×Ñ˜t×3Ñ3Ô4Ø×Ñ˜D×1Ñ1Ô2Û0ˆCÜ˜4 ¨¥¨TÓ2ˆDß‰tÜ˜˜SŸ^™^Ó-¨eÕ3´F·O²OÀDÓ4IÖJñ 1ð ×ÑÒ)Ø×)Ñ)ˆDŒHà×*Ñ*¨d¯n©nÐ-=Õ=ÀÕDÀt×G`ÑG`Õ`ˆØ�‰�tÔØ×Ñ˜DÔ!Ø×Ñ˜4Ô Ø×Ñ˜$ÔØ×Ñ˜TÔ"Ø×Ñ˜TÔ"Ø�	‰	×Ñ˜$Ôà�<�<ˆ<˜Ÿ™ d×&6Ñ&6Ô7Ø�‰Ör8   c                óî   € V P                   '       d#   V P                  V P                   4       R V n         V ;P                  ^,          un        V P                  4        V P	                  4        . V n        R # r<   )rì   ÚsetPageSizerò   rô   r   r  r�   s   &r6   rÓ  ÚCanvas._startPage×  s[   € à×!×!Ð!Ø×Ñ˜T×3Ñ3Ô4Ø%)ˆDÔ"Ø×Ò˜AÕÕØ×!Ñ!Ô#Ø× Ñ Ô"ØˆÖr8   c                ó   € Wn         R# )z�func(pageNum) will be called on each page end.

This is mainly a hook for progress monitoring.
 Call setPageCallback(None) to clear a callback.N)ré   )r�   Úfuncs   &&r6   ÚsetPageCallBackÚCanvas.setPageCallBacká  s	   € ð
 Žr8   c                ó(   € V P                   Vn        R # r<   )Ú_annotationrefsÚAnnots©r�   rÝ  s   &&r6   rÑ  ÚCanvas._setAnnotationsè  s   € Ø×*Ñ*ˆŽr8   c                ó(   € V P                   Vn         R # r<   )Ú_colorsUsed©r�   Úobjs   &&r6   rÍ  ÚCanvas._setColorSpaceë  s   € Ø×*Ñ*ˆŽr8   c                ó(   € V P                   Vn         R # r<   )Ú_shadingUsedrí  s   &&r6   rÐ  ÚCanvas._setShadingUsedî  s   € Ø ×-Ñ-ˆÖr8   c                ó‚   € V P                   pV'       d$   V P                  P                  V4      pW1n        R# RVn        R# )zKfor pages and forms, define the XObject dictionary for resources, if neededN)Ú_formsinuseræ   ÚxobjDictÚXObjects)r�   ÚthingÚformsÚxobjectsdicts   &&  r6   rÏ  ÚCanvas._setXObjectsñ  s0   € à× Ñ ˆßØŸ9™9×-Ñ-¨eÓ4ˆLØ)ŽNà!ˆEŽNr8   c                óp   € V P                   p W!,          #    \        P                  ! T4      ;q2T&    T# ; i)zDget a reference to a (possibly undefined, possibly unbound) bookmark)rð   r
   ÚDestination)r�   r    r@   Úresults   &&  r6   Ú_bookmarkReferenceÚCanvas._bookmarkReferenceú  s<   € à×Ñˆð	8Ø•7ˆNøð	8Ü%×1Ò1°$Ó7Ð7ˆF�t’WØˆús   Ž –5c                ó´  € V P                  V4      pV P                  P                  4        V P                  P                  4       p	Vf   RpVf   RpVf   RpVf   RpVf   RpVR8X  d   VP	                  W4V4       MÉVR8X  d   VP                  4        M±VR8X  d   VP                  V4       M˜VR8X  d   VP                  V4       MVR8X  d   VP                  W5Wd4       MeVR8X  d   VP                  4        MMVR8X  d   VP                  V4       M4VR	8X  d   VP                  V4       M\        R
\        V4      ,          4      hVP                  V	4       V# )a­  
This creates a bookmark to the current page which can
be referred to with the given key elsewhere.

PDF offers very fine grained control over how Acrobat
reader is zoomed when people link to this. The default
is to keep the user's current zoom settings. the last
arguments may or may not be needed depending on the
choice of 'fitType'.

Fit types and the other arguments they use are:

- XYZ left top zoom - fine grained control.  null
  or zero for any of the parameters means 'leave
  as is', so "0,0,0" will keep the reader's settings.
  NB. Adobe Reader appears to prefer "null" to 0's.

- Fit - entire page fits in window

- FitH top - top coord at top of window, width scaled
  to fit.

- FitV left - left coord at left of window, height
  scaled to fit

- FitR left bottom right top - scale window to fit
  the specified rectangle

(question: do we support /FitB, FitBH and /FitBV
which are hangovers from version 1.1 / Acrobat 3.0?)ÚnullÚXYZÚFitÚFitHÚFitVÚFitRÚFitBÚFitBHÚFitBVzUnknown Fit type %s)r  ræ   ÚinPageÚthisPageRefÚxyzÚfitÚfithÚfitvÚfitrÚfitbÚfitbhÚfitbvrM   ÚasciiÚsetPage)
r�   rb   r  ÚleftÚtopÚbottomÚrightÚzoomÚdestÚpagerefs
   &&&&&&&&  r6   ÚbookmarkPageÚCanvas.bookmarkPage  s$  € ðL ×&Ñ& sÓ+ˆØ�	‰	×ÑÔØ—)‘)×'Ñ'Ó)ˆð Š<ØˆDØŠ;ØˆCØŠ>ØˆFØŠ=ØˆEØŠ<ØˆDà�%Œ<Ø�H‰H�T˜dÕ#Ø�EŒ\Ø�H‰H�JØ�FŒ]Ø�I‰I�c�NØ�FŒ]Ø�I‰I�d�OØ�FŒ]Ø�I‰I�d %Õ,à�FŒ]Ø�I‰I�KØ�GŒ^Ø�J‰J�s�OØ�GŒ^Ø�J‰J�tÕäÐ2´U¸3³ZÕ?Ó@Ð@à�‰�WÔØˆr8   c                ó*   € V P                  WW#^ R7      # )a¾  Bind a bookmark (destination) to the current page at a horizontal position.
Note that the yhorizontal of the book mark is with respect to the default
user space (where the origin is at the lower left corner of the page)
and completely ignores any transform (translation, scale, skew, rotation,
etcetera) in effect for the current graphics state.  The programmer is
responsible for making sure the bookmark matches an appropriate item on
the page.)r  r  r  r  )r!  )r�   rb   r  r  r  Úkws   &&&&&,r6   ÚbookmarkHorizontalAbsoluteÚ!Canvas.bookmarkHorizontalAbsoluteP  s   € ð × Ñ  °3ÈÐ ÓJÐJr8   c                óV   € V P                  W#4      w  rVV P                  ! W3RV/VB  R# )z<w.r.t. the current transformation, bookmark this horizontal.r  N)ÚabsolutePositionr%  )r�   rb   Ú	relativeXÚ	relativeYr$  r  r  s   &&&&,  r6   ÚbookmarkHorizontalÚCanvas.bookmarkHorizontal[  s,   € à×+Ñ+¨IÓ@‰ˆØ×'Ò'¨ÑB°tÐB¸rÔBr8   c                ó²   € V P                   P                  RV P                  P                  V4      ,          4       V P                  P                  V4       R# )a!  use a form XObj in current operation stream.

The form should either have been defined previously using
beginForm ... endForm, or may be defined later.  If it is not
defined at save time, an exception will be raised. The form
will be drawn within the context of the current graphics
state.ú/%s DoN)r›   r.   ræ   ÚgetXObjectNamerø  ©r�   r    s   &&r6   ÚdoFormÚCanvas.doFormh  s>   € ð 	�
‰
×Ñ˜( T§Y¡Y×%=Ñ%=¸dÓ%CÕCÔDØ×Ñ×Ñ Ö%r8   c                ó8   € V P                   P                  V4      # )z*Query whether form XObj really exists yet.)ræ   ÚhasFormr0  s   &&r6   r4  ÚCanvas.hasForms  s   € à�y‰y× Ñ  Ó&Ð&r8   Fc           	     óŒ   € ^V n         ^ RIHp V! WW4V4      pVP                  V VWxV	V
R7       VP                  VP
                  3# )a,  See drawImage, which should normally be used instead... 

drawInlineImage behaves like drawImage, but stores the image content
within the graphics stream for the page.  This means that the mask
parameter for transparency is not available.  It also means that there 
is no saving in file size or time if the same image is reused.  

In theory it allows images to be displayed slightly faster; however, 
we doubt if the difference is noticeable to any human user these days.
Only use this if you have studied the PDF specification and know the
implications.
)ÚPDFImage)ÚpreserveAspectRatioÚanchorÚ
anchorAtXYÚshowBoundaryÚextraReturn)rÄ  Úreportlab.pdfgen.pdfimagesr7  ÚdrawInlineImagerÐ   Úheight)r�   Úimager_   ÚyrÐ   r?  r8  r9  r:  r;  r<  r7  Úimg_objs   &&&&&&&&&&&  r6   r>  ÚCanvas.drawInlineImage|  sR   € ð  &'ˆÔ"Ý7Ù˜5 A¨fÓ5ˆØ×Ñ Ø 3Ø¸\Ø#ð 	 ô 	%ð —‘˜wŸ~™~Ð.Ð.r8   c                óŠ  € ^V n         \        V\        4      '       d|   VP                  4       pVP                  pVR8X  d   V'       d   VP                  4       pM\        V4      p\        V4      '       d   VP                  R4      p\        WÎ,           4      pM5V: V: 2p\        V4      '       d   VP                  R4      p\        V4      pV P                  P                  V4      pV P                  P                  P                  VR4      pV'       Eg!   \        P                  ! WñVR7      pVVn        V P!                  V4       V P                  P#                  VV4       V P                  P%                  VV4       \'        VRR4      pV'       d¤   V P                  P                  VP                  4      pV P                  P                  P                  VR4      pV'       g4   V P!                  V4       V P                  P#                  VV4      Vn        M\        P*                  ! V4      Vn        V=\/        WxW#WEVP0                  VP2                  V	4	      w  r#rEpV P5                  4        V P7                  W#4       V P9                  WE4       V P:                  P=                  RV,          4       V P?                  4        V
'       d   V PA                  W¢W4V4       V PB                  P=                  V4       V'       d,   VPE                  4        F  p\G        4       V,          VV&   K  	  VP0                  VP2                  3# )aà	  Draws the image (ImageReader object or filename) as specified.

"image" may be an image filename or an ImageReader object. 

x and y define the lower left corner of the image you wish to
draw (or of its bounding box, if using preserveAspectRation below).
 
If width and height are not given, the width and height of the
image in pixels is used at a scale of 1 point to 1 pixel.  

If width and height are given, the image will be stretched to fill 
the given rectangle bounded by (x, y, x+width, y-height).  

If you supply negative widths and/or heights, it inverts them and adjusts
x and y accordingly.

The method returns the width and height of the underlying image, since
this is often useful for layout algorithms and saves you work if you have
not specified them yourself.

The mask parameter supports transparent backgrounds. It takes 6 numbers
and defines the range of RGB values which will be masked out or treated
as transparent.  For example with [0,2,40,42,136,139], it will mask out
any pixels with a Red value from 0-2, Green from 40-42 and
Blue from 136-139  (on a scale of 0-255).

New post version 2.0:  drawImage can center an image in a box you
provide, while preserving its aspect ratio.  For example, you might
have a fixed square box in your design, and a collection of photos
which might be landscape or portrait that you want to appear within 
the box.  If preserveAspectRatio is true, your image will appear within
the box specified.


If preserveAspectRatio is True, the anchor property can be used to
specify how images should fit into the given box.  It should 
be set to one of the following values, taken from the points of
the compass (plus 'c' for 'centre'):

        nw   n   ne
        w    c    e
        sw   s   se

The default value is 'c' for 'centre'.  Thus, if you want your
bitmaps to always be centred and appear at the top of the given box,
set anchor='n'.      There are good examples of this in the output
of test_pdfgen_general.py

Unlike drawInlineImage, this creates 'external images' which
are only stored once in the PDF file but can be drawn many times.
If you give it the same filename twice, even at different locations
and sizes, it will reuse the first occurrence, resulting in a saving
in file size and generation time.  If you use ImageReader objects,
it tests whether the image content has changed before deciding
whether to reuse it.

In general you should use drawImage in preference to drawInlineImage
unless you have read the PDF Spec and understand the tradeoffs.ÚautoÚutf8r  N)ÚmaskÚ_smaskr.  )$rÄ  rD   r   Ú
getRGBDataÚ_dataArK   r   rs   r   ræ   r/  Ú
idToObjectr™   r
   ÚPDFImageXObjectr    rÏ  Ú	ReferenceÚaddFormrM  ÚsmaskÚPDFObjectReferencerH  r    rÐ   r?  rº  r¾  r¿  r›   r.   r½  ÚdrawBoundaryrø  ÚkeysÚvars)r�   r@  r_   rA  rÐ   r?  rG  r8  r9  r:  r;  r<  ÚrawdatarO  Úmdatar    rV  ÚregNameÚimgObjÚmRegNameÚmImgObjÚscaledÚks   &&&&&&&&&&&&           r6   Ú	drawImageÚCanvas.drawImage•  s�  € ð| &'ˆÔ"ô �eœK×(Ò(Ø×&Ñ&Ó(ˆGØ—L‘LˆEØ�VŒ|§Ø×(Ñ(Ó*‘ä˜D›	�Ü˜×ÒØŸ™ VÓ,�Ü˜W�]Ó+‰Dò  ¢Ð&ˆAÜ˜�|Š|Ø—H‘H˜WÓ%�Ü˜Q“<ˆDð —)‘)×*Ñ*¨4Ó0ˆØ—‘×%Ñ%×)Ñ)¨'°4Ó8ˆßˆvä×+Ò+¨D¸dÔCˆFØˆFŒKØ×Ñ˜fÔ%Ø�I‰I×Ñ ¨Ô0Ø�I‰I×Ñ˜d FÔ+Ü˜F 8¨DÓ1ˆEßØŸ9™9×3Ñ3°E·J±JÓ?�ØŸ)™)×.Ñ.×2Ñ2°8¸TÓB�ßØ×%Ñ% eÔ,Ø#'§9¡9×#6Ñ#6°u¸XÓ#F�F•Lä#)×#<Ò#<¸XÓ#F�F”LØ�Mô #1Ð1DÈAÐPUÐ]c×]iÑ]iÐjp×jwÑjwð  yCó  #DÑˆˆE˜ð 	�‰ÔØ�‰�qÔØ�
‰
�5Ô!Ø�
‰
×Ñ˜( WÕ,Ô-Ø×ÑÔßà×Ñ˜l¨Q°VÔ<ð 	×Ñ×Ñ Ô%ßØ ×%Ñ%Ö'�Ü!%£¨¥�˜A“ñ (ð —‘˜fŸm™mÐ,Ð,r8   c                ó,  € V P                   '       dC   V P                   P                  R4      w  V n        V n        V n        V n        V n        V n        R# . V n        . V n        . V n	        ^V n
        . V n        . V n        RV n        / V n        / V n        R# )re   Nrg   )ró   r@  r›   rø  rë  Ú	_formDatarð  rõ  rø   r÷   rÄ  r�   s   &r6   rô   ÚCanvas._restartAccumulators  sž   € Ø�?�?ˆ?àuy÷  vEñ  vE÷  vIñ  vIð  JLó  vMÑrˆDŒJ˜Ô(¨$Ô*>ÀÄÈtÔO_ÐaeÖaràˆDŒJØ(*ˆDÔ%Ø)+ˆDÔ&Ø)*ˆDÔ&Ø!ˆDÔØ#%ˆDÔ Ø!ˆDŒNØ!ˆDÔØ "ˆDÖr8   c                ó&  € V P                   V P                  V P                  V P                  V P                  V P
                  3pV P                  P                  V4       . V n         ^V n        . V n        . V n        RV n        / V n        / V n        R# )zVwhen you enter a form, save accumulator info not related to the form for page (if any)N)	r›   rø  rë  r_  rð  rõ  ró   r.   rÄ  )r�   Úsaveds   & r6   Ú_pushAccumulatorsÚCanvas._pushAccumulators"  s~   € à—‘˜T×-Ñ-¨t×/CÑ/CÀTÇ^Á^ÐUY×UeÑUeÐgk×gxÑgxÐyˆØ�‰×Ñ˜uÔ%ØˆŒ
Ø%&ˆÔ"ØˆÔØ!ˆÔØˆŒØˆÔØˆÖr8   c                óD   € V P                   P                  4       Vn        R # r<   )r6  r©   rw   rñ  s   &&r6   rÎ  ÚCanvas._setExtGState.  s   € ØŸ™×0Ñ0Ó2ˆŽr8   c                óö   € V P                  4        V P                  4        V P                  '       g   V P                  '       d   V P	                  4        WW4V3V n        V P
                  P                  4        R# )aF  declare the current graphics stream to be a named form.
A graphics stream can either be a page or a form, not both.
Some operations (like bookmarking) are permitted for pages
but not forms.  The form will not automatically be shown in the
document but must be explicitly referenced using doForm in pages
that require the form.N)r<  r   r›   r_  rc  ræ   ÚinForm)r�   r    ÚlowerxÚloweryÚupperxÚupperys   &&&&&&r6   Ú	beginFormÚCanvas.beginForm1  sY   € ð 	×ÑÔØ× Ñ Ô"Ø�:�:ˆ:˜ŸŸ˜à×"Ñ"Ô$ð ¨¸Ð?ˆŒØ�	‰	×ÑÖr8   c                óP  € V P                   w  r#rEp V P                  w  rxVf   TpVf   Tp\        P                  ! W4WVR7      p	V P                  V	n        V	P                  V P                  .V P                  ,           4       VP                  4        F  w  r«\        WšV4       K  	  V P                  V	4       V P                  V	4       V P                  V	4       V P                  V	4       V P                  P!                  W)4       V P#                  4        V P%                  4        R# )zaemit the current collection of graphics operations as a Form
as declared previously in beginForm.N)ri  rj  rk  rl  )r_  rë   r
   ÚPDFFormXObjectrÈ  rÙ   ÚsetStreamListrP  r›   r¦   rÉ  rÍ  rÎ  rÏ  rÑ  ræ   rN  rô   rA  )r�   Úextra_attributesr    ri  rj  rk  rl  ÚwÚhÚformr[  r‚   s   &,          r6   ÚendFormÚCanvas.endFormC  sö   € ð 26·±Ñ.ˆ�v vð 	Rà—‘‰ˆØŠ> !˜6ØŠ> !˜6Ü×$Ò$¨FÈ&Ô`ˆØ×0Ñ0ˆÔØ×Ñ˜DŸN™NÐ+¨d¯j©jÕ8Ô9Ø$×*Ñ*Ö,‰DˆAÜ�D˜1Öñ -à×Ñ˜DÔ!Ø×Ñ˜4Ô Ø×Ñ˜$ÔØ×Ñ˜TÔ"Ø�	‰	×Ñ˜$Ô%Ø×!Ñ!Ô#Ø×ÑÖr8   c                óx  € \        V4      '       d>   R\        P                  ! VP                  R4      RR7      P	                  4       ,           pM-R\        P                  ! VRR7      P	                  4       ,           pV P
                  P                  V4      pV P
                  P                  P                  VR4      pV'       ge   \        P                  ! VR,           4      pV P                  V4       V P
                  P                  WT4       V P
                  P                  W54       V^ 8X  d$   V P                  P                  RV,          4       MLV^8X  d$   V P                   P                  RV,          4       M"V P"                  P                  RV,          4       V P$                  P                  V4       R# )a'  Embed literal Postscript in the document.

With position=0, it goes at very beginning of page stream;
with position=1, at current point; and
with position=2, at very end of page stream.  What that does
to the resulting Postscript depends on Adobe's header :-)

Use with extreme caution, but sometimes needed for printer tray commands.
Acrobat 4.0 will export Postscript to a printer or file containing
the given commands.  Adobe Reader 6.0 no longer does as this feature is
deprecated.  5.0, I don't know about (please let us know!). This was
funded by Bob Marshall of Vector.co.uk and tested on a Lexmark 750.
See test_pdfbase_postscript.py for 2 test cases - one will work on
any Postscript device, the other uses a 'setpapertray' command which
will error in Distiller but work on printers supporting it.
ÚPSr  F)ÚusedforsecurityNÚ
r.  )r   ÚhashlibÚmd5rs   Ú	hexdigestræ   r/  rK  r™   r
   ÚPDFPostScriptXObjectrÏ  rM  rN  r÷   r.   r›   rø   rø  )r�   ÚcommandÚpositionÚrawNamerV  ÚpsObjs   &&&   r6   ÚaddPostScriptCommandÚCanvas.addPostScriptCommand\  s9  € ô$ �W×ÒØœWŸ[š[¨¯©¸Ó)@ÐQVÔW×aÑaÓcÕc‰GàœWŸ[š[¨ÀÔG×QÑQÓSÕSˆGØ—)‘)×*Ñ*¨7Ó3ˆØ—	‘	×$Ñ$×(Ñ(¨°$Ó7ˆßä×/Ò/°¸$µÓ?ˆEØ×Ñ˜eÔ$Ø�I‰I×Ñ Ô/Ø�I‰I×Ñ˜gÔ-Ø�qŒ=Ø×&Ñ&×-Ñ-¨h¸Õ.@ÕAØ�qŒ[Ø�J‰J×Ñ˜h¨Õ0Õ1à×%Ñ%×,Ñ,¨X¸Õ-?Ô@à×Ñ×Ñ Ö(r8   c                ó  € V'       g   V P                   w  r4^ ^ W43pM•V'       dŽ   Vw  rVrxV P                  WV4      w  ršV P                  Wx4      w  r¼V P                  WX4      w  rÞV P                  Wv4      w  ppW›Wß3pW¬VV3p\        V4      \        V4      pp\        V4      \        V4      ppVVVV3pV P	                  4       pV'       d?   V^ ,          V,           V^,          V,           V^,          V,           V^,          V,           3pV# r^   )rë   r(  r¹  r§  r«  )r�   ÚrectÚrelativers  rt  ÚlxÚlyÚuxÚuyÚxllÚyllÚxurÚyurÚxulÚyulÚxlrÚylrÚxsÚysÚxminÚyminÚxmaxÚymaxrª  s   &&&                     r6   Ú_absRectÚCanvas._absRectƒ  sû   € ßØ—.‘.‰CˆAØ�a˜�9‰DßØ!‰NˆB�BØ×+Ñ+¨BÓ2‰GˆCØ×+Ñ+¨BÓ3‰GˆCØ×+Ñ+¨BÓ3‰GˆCØ×+Ñ+¨BÓ3‰GˆC�Ø˜3Ð#ˆBØ˜3 Ð#ˆBÜ˜R›¤# b£'�$ˆDÜ˜R›¤# b£'�$ˆDØ˜˜t TÐ)ˆDØ×ÑÓˆßØ˜•7˜2•:˜d 1�g b�j¨¨a­°­°D¸µG¸BµJÐ>ˆDØˆr8   c                óx   € V P                  W64      pV P                  \        P                  ! W1V3/ VB WT4       R# )z&DA is the default appearance string???N)r›  Ú_addAnnotationr
   ÚFreeTextAnnotation)r�   ÚcontentsÚDAÚRectÚ	addtopager    rˆ  r$  s   &&&&&&&,r6   ÚfreeTextAnnotationÚCanvas.freeTextAnnotation—  s3   € à�}‰}˜TÓ+ˆØ×ÑœF×5Ò5°dÀbÑOÈBÑOÐQUÖar8   c                óv   € V P                  W%4      pV P                  \        P                  ! W!3/ VB WC4       R# )z!Experimental, but works.
        N)r›  rž  r
   ÚTextAnnotation)r�   r   r¢  r£  r    rˆ  r$  s   &&&&&&,r6   ÚtextAnnotationÚCanvas.textAnnotationœ  s2   € ð �}‰}˜TÓ+ˆØ×ÑœF×1Ò1°$ÑGÀBÑGÈÖYr8   c                ó´   € V P                  W'4      pV'       g   \        P                  ! V4      pV P                  \        P                  ! W!W43/ VB We4       R# )aé  
Allows adding of a highlighted annotation.

Rect: Mouseover area to show contents of annotation
QuadPoints: List of four x/y points [TOP-LEFT, TOP-RIGHT, BOTTOM-LEFT, BOTTOM-RIGHT]
  These points outline the areas to highlight.
  You can have multiple groups of four to allow multiple highlighted areas.
  Is in the format [x1, y1, x2, y2, x3, y3, x4, y4, x1, y1, x2, y2, x3, y3, x4, y4] etc
  QuadPoints defaults to be area inside of passed in Rect
Color: The color of the highlighting.
N)r›  r
   Úrect_to_quadrž  ÚHighlightAnnotation)	r�   r   r¢  Ú
QuadPointsr   r£  r    rˆ  r$  s	   &&&&&&&&,r6   ÚhighlightAnnotationÚCanvas.highlightAnnotation£  sI   € ð �}‰}˜TÓ,ˆßÜ×,Ò,¨TÓ2ˆJØ×ÑœF×6Ò6°tÀzÑ_Ð\^Ñ_ÐaeÖqr8   c                ó   € \         h)éd   )ÚNotImplementedErrorr›  rt  rs  rž  r
   ÚInkAnnotation)r�   r   ÚInkListr¢  r£  r    rˆ  r$  s   &&&&&&&,r6   ÚinkAnnotationÚCanvas.inkAnnotationµ  s   € Ü!Ð!r8   c	                ó<   € V P                   ! WW4V3R^ RVRVRV/V	B # )aÀ  rectangular link annotation positioned wrt the default user space.
The identified rectangle on the page becomes a "hot link" which
when clicked will send the viewer to the page and position identified
by the destination.

Rect identifies (lowerx, lowery, upperx, uppery) for lower left
and upperright points of the rectangle.  Translations and other transforms
are IGNORED (the rectangular position is given with respect
to the default user space.
destinationname should be the name of a bookmark (which may be defined later
but must be defined before the document is generated).

You may want to use the keyword argument Border='[0 0 0]' to
suppress the visible rectangle around the during viewing link.rˆ  r1   r0   r2   )ÚlinkRect)
r�   r   Údestinationnamer¢  r£  r    r1   r0   r2   r$  s
   &&&&&&&&&,r6   ÚlinkAbsoluteÚCanvas.linkAbsolute¾  sJ   € ð  �}Š}˜X¸Èñ MÐXYð MØ#ðMØ+0ðMØ<EðMØIKñMð 	Mr8   c
                óÂ   € V P                  V4      pV P                  W64      pW:R&   WR&   WºR&   \        W¨Wy4       V P                  \        P
                  ! R/ V
B WT4      # )z‘rectangular link annotation w.r.t the current user transform.
if the transform is skewed/rotated the absolute rectangle will use the max/min x/y
r¢  ÚContentsr   r=   )r  r›  r7   rž  r
   ÚLinkAnnotation)r�   r   r¹  r¢  r£  r    rˆ  r1   r0   r2   r$  Údestinations   &&&&&&&&&&, r6   r¸  ÚCanvas.linkRectÑ  sc   € ð
 ×-Ñ-¨oÓ>ˆØ�}‰}˜TÓ+ˆØˆ6‰
Ø!ˆ:‰Ø'ˆ=ÑÜ�2˜IÔ0Ø×"Ñ"¤6×#8Ò#8Ñ#>¸2Ñ#>ÀÓPÐPr8   c                óz  € ^ RI Hp	Hp
HpHp V	! VR7      pV
! R4      VR&   V
! R4      VR&   V! V P                  W#4      4      VR&   V	! 4       pV
! R4      VR&   V! V4      pV
! V4      VR	&   VR
8X  d   WþR
&   M#VR8X  d   WþR&   RVR&   M\        RV,          4      hWíR&   \        WÕWF4       V P                  V4       R# )a­  Create a rectangular URL 'hotspot' in the given rectangle.

if relative=1, this is in the current coord system, otherwise
in absolute page space.
The remaining options affect the border appearance; the border is
drawn by Acrobat, not us.  Set thickness to zero to hide it.
Any border drawn this way is NOT part of the page stream and
will not show when printed to a Postscript printer or distilled;
it is safest to draw your own.)r§   ÚPDFNamer'   Ú	PDFString)r¨   ÚAnnotÚTypeÚLinkÚSubtyper¢  ÚActionr"   ÚURIÚGoToRÚFz[ 0 /XYZ null null null ]r/   zUnknown linkURI kind '%s'ÚAN)	r*   r§   rÂ  r'   rÃ  r›  rM   r7   rž  )r�   Úurlr‡  rˆ  r1   r0   r2   Úkindr$  r§   rÂ  r'   rÃ  ÚannrÌ  Úuris   &&&&&&&&,       r6   ÚlinkURLÚCanvas.linkURLÞ  sË   € ÷ 	YÓXñ  Ô$ˆÙ˜gÓ&ˆˆF‰Ù  ›ˆˆI‰Ù˜tŸ}™}¨TÓ;Ó<ˆˆF‰ñ ‹OˆÙ˜HÓ%ˆˆ&‰	Ù˜‹nˆÙ˜“ˆˆ#‰Ø�Œ;ØˆeŠHØ�7Œ]Øˆc‰FØ0ˆAˆcŠFäÐ8¸4Õ?Ó@Ð@àˆC‰Ü�3˜YÔ1Ø×Ñ˜CÖ r8   c                óØ   € V P                   ^,           ;q@n         V'       g   R\        V4      ,           pV P                  P                  W!4       V'       d   V P	                  V4       R# R# )re   ÚNUMBERN)rõ   Úreprræ   ÚaddAnnotationÚ_annotatePage)r�   Ú
annotationr    r£  Úcounts   &&&& r6   rž  ÚCanvas._addAnnotation  sP   € Ø(,×(=Ñ(=¸aÕ(?Ð?ˆÔ%ß˜(¤4¨£;Õ.�TØ�	‰	×Ñ Ô1ßØ×Ñ˜tÖ$ñ r8   c                ór   € V P                   P                  V4      pV P                  P                  V4       R # r<   )ræ   ÚrefAnnotationrë  r.   )r�   r    Úrefs   && r6   r×  ÚCanvas._annotatePage	  s*   € Ø�i‰i×%Ñ% dÓ+ˆØ×Ñ×#Ñ# CÖ(r8   c                ó   € V P                   # )z9get the page number for the current page being generated.)rò   r�   s   &r6   ÚgetPageNumberÚCanvas.getPageNumber  s   € à×ÑÐr8   c                ó¨   € \        V P                  4      '       d   V P                  4        V P                  P	                  V P
                  V 4       R# )z¦Saves and close the PDF document in the file.
If there is current data a ShowPage is executed automatically.
After this operation the canvas must not be used further.N)rJ   r›   rá  ræ   Ú
SaveToFilerã   r�   s   &r6   ÚsaveÚCanvas.save  s1   € ô ˆt�z‰z�?Š?˜DŸM™MœOØ�	‰	×Ñ˜TŸ^™^¨TÖ2r8   c                óÖ   € \        V P                  4      '       d   V P                  4        V P                  P	                  V 4      p\        V4      '       d   VP                  R4      pV# )z·Returns the PDF data that would normally be written to a file.
If there is current data a ShowPage is executed automatically.
After this operation the canvas must not be used further.r  )rJ   r›   rá  ræ   Ú
GetPDFDatar   rs   rU  s   & r6   Ú
getpdfdataÚCanvas.getpdfdata  sI   € ô ˆt�z‰z�?Š?˜DŸM™MœOØ�I‰I× Ñ  Ó&ˆÜ�Q�<Š<Ø—‘˜Ó!ˆAØˆr8   c                ó2   € Wn         V P                  4        R# )zHaccepts a 2-tuple in points for paper size for this
and subsequent pagesN)rë   r  ©r�   rß  s   &&r6   rä  ÚCanvas.setPageSize"  s   € ð ŒØ×ÑÖr8   c                ó¸   € VP                  4       pVP                  R4      '       d   VRR pVR9  d   \        RV,          4      h\        V RV,          V4       R# )zMaccepts a 2-tuple in points for name+'Box' size for this and subsequent pagesrÞ  Nzunknown box name: %rr³  éýÿÿÿ)rµ  r¶  r¸  r·  )r€   ÚendswithrM   rÉ  )r�   rß  r    s   &&&r6   Ú
setCropBoxÚCanvas.setCropBox(  sP   € à�z‰z‹|ˆØ�=‰=˜×Ò¨¨S¨b¨	 ØÐ4Ô4ÜÐ3°dÕ:Ó;Ð;Ü��X •_ dÖ+r8   c                ó,   € V P                  VR R7       R# )r¸  ©r    N©rð  rë  s   &&r6   Ú
setTrimBoxÚCanvas.setTrimBox0  s   € Ø�‰˜ &ˆÖ)r8   c                ó,   € V P                  VR R7       R# )r¶  ró  Nrô  rë  s   &&r6   Ú	setArtBoxÚCanvas.setArtBox3  s   € Ø�‰˜ %ˆÖ(r8   c                ó,   € V P                  VR R7       R# )r·  ró  Nrô  rë  s   &&r6   ÚsetBleedBoxÚCanvas.setBleedBox6  s   € Ø�‰˜ 'ˆÖ*r8   c                ó<   € VR,          R8X  g   Q R4       hWn         R# )z7Instruct display device that this page is to be rotatedg     €V@rc   z)Rotation must be a multiple of 90 degreesN)rí   )r�   Úrots   &&r6   ÚsetPageRotationÚCanvas.setPageRotation9  s    € à�T�z˜SÔ ÐMÐ"MÓMÐ Ø Ör8   c                ó‚   € \        V4      pV^ 8X  d   V P                  V4      pV P                  P                  V4       R# )z‚introduce the literal text of PDF operations s into the current stream.
Only use this if you are an expert in the PDF file format.N)rK   rW  r›   r.   )r�   rV  Úescapeds   &&&r6   Ú
addLiteralÚCanvas.addLiteral>  s3   € ô �‹FˆØ�AŒ:Ø—‘˜Q“ˆAØ�
‰
×Ñ˜!Ör8   c                ó.  € V P                   w  rr4rVW,          W2,          ,
          pWG,          pV) V,          p	W6,          WE,          ,
          V,          p
W,          pV) V,          pWR,          Wa,          ,
          V,          pV P                  WŒW›W­4       R# )a  I want to draw something (eg, string underlines) w.r.t. the default user space.
Reset the matrix! This should be used usually as follows::

   canv.saveState()
   canv.resetTransforms()
   #...draw some stuff in default space coords...
   canv.restoreState() # go back!
N)r$  Ú	transform)r�   ÚselfaÚselfbÚselfcÚselfdÚselfeÚselffÚdetÚresultaÚresultcÚresulteÚresultdÚresultbÚresultfs   &             r6   ÚresetTransformsÚCanvas.resetTransformsK  s~   € ð 6:×5HÑ5HÑ2ˆ�u UØ�k˜E�KÕ'ˆØ•)ˆØ�&˜•*ˆØ•; ¥Õ,¨cÕ1ˆØ•)ˆØ�&˜•*ˆØ•; ¥Õ,¨cÕ1ˆØ�‰�w¨¸7ÖLr8   c                óB  € \         '       dž   V P                  w  rxršr¼Wq,          W’,          ,           W�,          W¢,          ,           Ws,          W”,          ,           Wƒ,          W¤,          ,           Wu,          W–,          ,           V,           W…,          W¦,          ,           V,           3V n        V P                  '       Ed6   V P                  R,          RR R8X  Ed   V P                  R,          P                  4       p\	        \        \        VRR 4      4      w  rxršr¼\        V4      ^8„  ;'       d    \        V4      R,           ;'       g    RpV\        Wq,          W’,          ,           W�,          W¢,          ,           Ws,          W”,          ,           Wƒ,          W¤,          ,           Wu,          W–,          ,           V,           W…,          W¦,          ,           V,           4      ,          V P                  R&   R# V P                  P                  R\        WW4WV4      ,          4       R# )zdadjoin a mathematical transform to the current graphics state matrix.
Not recommended for beginners.Nz cmz %s cmz%s cmrg   rî  iùÿÿÿ)ÚENABLE_TRACKINGr$  r›   ÚsplitrI   Úmapri   rJ   rH  r   r.   )r�   r�   Úbr?   r@   Úer#   Úa0Úb0Úc0Úd0Úe0Úf0rÜ  rV  s   &&&&&&&        r6   r  ÚCanvas.transform_  sn  € ÷ ‹?Ø $× 3Ñ 3ÑˆB�"˜Ø#%¥4¨­¥9°µ°bµdµØ#%¥4¨­¥9°µ°bµdµØ#%¥4¨­¥9¨R¥<°µ°bµdµ¸2µð#?ˆDÔð �:�:‰:˜$Ÿ*™* R�.¨¨Ð-¨uÕ4Ø—
‘
˜2•×$Ñ$Ó&ˆAÜ%)¬#¬e°A°b¸°HÓ*=Ó%>Ñ"ˆB�B˜BÜ�A“�q‘×.Ð.œT !›W hÕ.×9Ð9°'ˆAØ¤¨­¨R­T­	°"µ$°rµtµ)¸B½DÀÅ½IÀbÅdÈ2Í4ÅiÐPRÕPTÐUWÕUYÕPYÐZ\ÕP\Ð]_Õ]aÐbdÕbfÕ]fÐgiÕ]iÓ!jÕjˆD�J‰J�r‹Nà�J‰J×Ñ˜g¬¨q°1°qÓ(;Õ;Ö<r8   c                óÆ   € \         '       g   \        R4      hV P                  w  r4rVrxW1,          WR,          ,           V,           p	WA,          Wb,          ,           V,           p
Wš3# )zKreturn the absolute position of x,y in user space w.r.t. default user spacez0tracking not enabled! (canvas.ENABLE_TRACKING=0))r  rM   r$  )r�   r_   rA  r�   r  r?   r@   r  r#   ÚxpÚyps   &&&        r6   r(  ÚCanvas.absolutePositionp  sM   € ç‹ÜÐOÓPÐPØ×+Ñ+‰ˆˆQ�Ø�S�1•3�Y˜�]ˆØ�S�1•3�Y˜�]ˆØˆxˆr8   c                ó0   € V P                  ^^ ^ ^W4       R# )zomove the origin from the current (0,0) point to the (dx,dy) point
(with respect to the current graphics state).N©r  )r�   ÚdxÚdys   &&&r6   r¾  ÚCanvas.translatey  s   € ð 	�‰�q˜˜1˜Q˜rÖ%r8   c                ó2   € V P                  V^ ^ V^ ^ 4       R# )z®Scale the horizontal dimension by x and the vertical by y
(with respect to the current graphics state).
For example canvas.scale(2.0, 0.5) will make everything short and fat.Nr(  )r�   r_   rA  s   &&&r6   r¿  ÚCanvas.scale~  s   € ð 	�‰�q˜˜1˜Q˜q Ö#r8   c                ó¦   € \        V\        ,          ^´,          4      p\        V\        ,          ^´,          4      pV P                  W#V) V^ ^ 4       R# )zHCanvas.rotate(theta)

Rotate the canvas by the angle theta (in degrees).N)r   r   r   r  )r�   Úthetar?   rV  s   &&  r6   ÚrotateÚCanvas.rotate„  s@   € ô �œ•
˜SÕ Ó!ˆÜ�œ•
˜SÕ Ó!ˆØ�‰�q˜a˜R  A qÖ)r8   c                ó¤   € \        V\        ,          ^´,          4      p\        V\        ,          ^´,          4      pV P                  ^W4^^ ^ 4       R# )é´   N)r   r   r  )r�   ÚalphaÚbetaÚtanAlphaÚtanBetas   &&&  r6   ÚskewÚCanvas.skewŒ  s<   € Ü�uœr•z CÕ'Ó(ˆÜ�tœr•z CÕ'Ó(ˆØ�‰�q˜(¨Q°°1Ö5r8   c                ó\   € V P                  4        V P                  P                  R4       R# )a!  Save the current graphics state to be restored later by restoreState.

For example:
    canvas.setFont("Helvetica", 20)
    canvas.saveState()
    ...
    canvas.setFont("Courier", 9)
    ...
    canvas.restoreState()
    # if the save/restore pairs match then font is Helvetica 20 again.
ÚqN)r<  r›   r.   r�   s   &r6   rº  ÚCanvas.saveState—  s"   € ð 	×ÑÔØ�
‰
×Ñ˜#Ör8   c                ó\   € V P                   P                  R4       V P                  4        R# )zGrestore the graphics state to the matching saved state (see saveState).ÚQN)r›   r.   rA  r�   s   &r6   r½  ÚCanvas.restoreState¦  s    € à�
‰
×Ñ˜#ÔØ×ÑÖr8   c           	     ór   € V P                   P                  R\        W4      : R\        W44      : R24       R# )z‚draw a line segment from (x1,y1) to (x2,y2) (with color, thickness and
other attributes determined by the current graphics state).ún ú m z l SN©r›   r.   r   )r�   Úx1Úy1Úx2Úy2s   &&&&&r6   ÚlineÚCanvas.line¿  s#   € ð 	�
‰
×Ò¬V°B®^¼VÀB¾^ÐLÖMr8   c           	     óô   € V P                   P                  R4       V F;  w  r#rEV P                   P                  \        W#4      : R\        WE4      : R24       K=  	  V P                   P                  R4       R# )zÑLike line(), permits many lines to be drawn in one call.
for example for the figure::

    |
  -- --
    |

  crosshairs = [(20,0,20,10), (20,30,20,40), (0,20,10,20), (30,20,40,20)]
  canvas.lines(crosshairs)
r!   rB  z lr"   NrC  )r�   ÚlinelistrD  rE  rF  rG  s   &&    r6   r¼  ÚCanvas.linesÄ  sU   € ð 	�
‰
×Ñ˜#ÔÛ%‰MˆR�2Ø�J‰J×Ñ¬V°B®^¼VÀB¾^ÐLÖMñ &à�
‰
×Ñ˜#Ör8   c	                ó  € VR ,          pVR ,          pWV,
          WV,
          3WV,           WV,           3W,
          W!V,
          V3W,           W!V,           V3.p	V P                  4        V'       d+   V P                  V4       V'       d   V P                  V4       V'       d   V P                  V4       V P	                  V	4       V'       d.   Ve   V P                  V4       V P                  W,
          W%4       V P                  4        R# )r±  N)rº  rG  rF  r»  r¼  ÚsetFontSizeÚdrawRightStringr½  )
r�   r_   rA  rß  ÚgapÚtextÚstrokeColorÚstrokeWidthÚfontSizeÚ
crosshairss
   &&&&&&&&& r6   ÚcrossÚCanvas.crossÔ  sÙ   € Ø��ˆØˆs�
ˆØ˜4�  C¥%Ð(¨!¨c­E°!°dµFÐ);¸a½fÀQÈÅuÈQÐ=OÐQRÕQVÐWXÐ[_ÕY_Ð`aÐPbÐcˆ
Ø�‰ÔßØ×Ñ Ô,ßØ×!Ñ! +Ô.ßØ×Ñ˜kÔ*Ø�
‰
�:ÔßØÒ# T×%5Ñ%5°hÔ%?Ø× Ñ  ¥¨Ô1Ø×ÑÖr8   c                ó<  € \        V4      ^8”  g   Q R4       h\        V4      ^8”  g   Q R4       h. pV^ ,          VR,          rTV^ ,          VR,          rvV F  pVP                  W„W…34       K  	  V F  p	VP                  WiWy34       K  	  V P                  V4       R# )zHLays out a grid in current line style.  Supply list of
x an y positions.z$x coordinate list must have 2+ itemsz$y coordinate list must have 2+ itemsNrg   )rJ   r.   r¼  )
r�   ÚxlistÚylistr¼  Úy0rE  Úx0rD  r_   rA  s
   &&&       r6   ÚgridÚCanvas.gridå  s“   € ô �5‹z˜AŒ~ÐEÐEÓEˆ~Ü�5‹z˜AŒ~ÐEÐEÓEˆ~ØˆØ�q•˜5 �9ˆBØ�q•˜5 �9ˆBÛˆAØ�L‰L˜!˜q˜Ö%ñ ãˆAØ�L‰L˜"˜r˜Ö%ñ à�
‰
�5Ör8   c	                óv   € V P                   P                  R\        W4      : R\        W4WVWx4      : R24       R# )z/Bezier curve with the four given control pointsrA  rB  z c SNrC  )	r�   rD  rE  rF  rG  Úx3Úy3Úx4Úy4s	   &&&&&&&&&r6   ÚbezierÚCanvas.bezieró  s,   € à�
‰
×ÒÜ! "ž>¬6°"¸"À"Ö+IðKö 	r8   c                óŽ   € \         P                  ! V P                  R7      P                  WW4WV4       V P	                  ^^ 4       R# )zçDraw a partial ellipse inscribed within the rectangle x1,y1,x2,y2,
starting at startAng degrees and covering extent degrees.   Angles
start with 0 to the right (+x) and increase counter-clockwise.
These should have x1<x2 and y1<y2.©rÖ  N)r   ÚPDFPathObjectr›   ÚarcÚ_strokeAndFill)r�   rD  rE  rF  rG  ÚstartAngÚextents   &&&&&&&r6   ri  Ú
Canvas.arcø  s5   € ô
 	× Ò  d§j¡jÔ1×5Ñ5°b¸BÀ(ÔRØ×Ñ˜A˜aÖ r8   c           	     óš   € V P                   P                  R\        WW44      ,          \        WVV P                  3,          ,           4       R# )zPdraws a rectangle with lower left corner at (x,y) and width and height as given.zn %s re N)r›   r.   r   ÚPATH_OPSr&  )r�   r_   rA  rÐ   r?  ÚstrokeÚfills   &&&&&&&r6   r‡  ÚCanvas.rect  s:   € à�
‰
×Ñ˜*¤v¨a°EÓ'BÕBÜ$ V°4·>±>Ð%AÕBõCö 	Dr8   c                ó¤   € \         P                  ! V P                  R7      P                  WW1,
          WB,
          4       V P	                  WV4       R# )z„Draw an ellipse defined by an enclosing rectangle.

Note that (x1,y1) and (x2,y2) are the corner points of
the enclosing rectangle.
rg  N)r   rh  r›   Úellipserj  )r�   rD  rE  rF  rG  rp  rq  s   &&&&&&&r6   rt  ÚCanvas.ellipse  s7   € ô 	× Ò  d§j¡jÔ1×9Ñ9¸"À"Å%ÈÍÔOØ×Ñ˜FÖ)r8   c	                ó  € \         P                  ! V P                  R7      p	V	P                  RW,           ,          RW$,           ,          4       V	P	                  WW4WV4       V	P                  4        V P                  Wx4       R# )z[Like arc, but connects to the centre of the ellipse.
Most useful for pie charts and PacMan!rg  r±  N)r   rh  r›   ÚmoveToÚarcToÚcloserj  )
r�   rD  rE  rF  rG  rk  rl  rp  rq  Úps
   &&&&&&&&& r6   ÚwedgeÚCanvas.wedge  sY   € ô ×$Ò$¨$¯*©*Ô5ˆØ	�‰��b•e•˜S "¥%�[Ô)Ø	�‰��b˜HÔ,Ø	�‰Œ	Ø×Ñ˜FÖ(r8   c                ól   € W,
          pW,           pW#,
          pW#,           p	V P                  WhWyWE4       R# )zNdraw a cirle centered at (x_cen,y_cen) with radius r (special case of ellipse)N)rt  )
r�   Úx_cenÚy_cenÚrrp  rq  rD  rF  rE  rG  s
   &&&&&&    r6   ÚcircleÚCanvas.circle  s0   € ð �YˆØ�YˆØ�YˆØ�YˆØ�‰�R˜R VÖ2r8   c                óŒ   € \         P                  ! V P                  R7      P                  WW4V4       V P	                  Wg4       R# )ztDraws a rectangle with rounded corners.  The corners are
approximately quadrants of a circle, with the given radius.rg  N)r   rh  r›   Ú	roundRectrj  )r�   r_   rA  rÐ   r?  Úradiusrp  rq  s   &&&&&&&&r6   r„  ÚCanvas.roundRect!  s4   € ô 	× Ò  d§j¡jÔ1×;Ñ;¸AÀ%ÐQWÔXØ×Ñ˜FÖ(r8   c                óX   € V P                   P                  V4      pW P                  V&   V# r<   )ræ   Ú
addShadingrõ  ©r�   Úshadingr    s   && r6   Ú_addShadingÚCanvas._addShading(  s)   € Ø�y‰y×#Ñ# GÓ,ˆØ"&×Ñ˜$ÑØˆr8   c                ól   € V P                  V4      pV P                  P                  R V,          4       R# )z/%s shN)r‹  r›   r.   r‰  s   && r6   ÚshadeÚCanvas.shade-  s(   € Ø×Ñ Ó(ˆØ�
‰
×Ñ˜( T�/Ö*r8   c                ó�   € ^ RI Hp \        V4      w  rš\        W¦4      pV! WW4VV	\	        V4      R7      pV P                  V4       R# )r&   )ÚPDFAxialShading©ÚFunctionÚ
ColorSpaceÚExtendN)r*   r‘  rV   ru   rÍ   rŽ  )r�   r\  r[  rD  rE  rQ   rm   rË   r‘  Ú
colorSpaceÚncolorsÚfcnrŠ  s   &&&&&&&&     r6   ÚlinearGradientÚCanvas.linearGradient1  sD   € å<Ü.¨vÓ6Ñˆ
Ü! 'Ó5ˆÙ! "¨"¸3Ø%Ô.@ÀÓ.HôJˆà�
‰
�7Ör8   c                ó’   € ^ RI Hp \        V4      w  r‰\        W•4      p
V! WRWW:V\	        V4      R7	      pV P                  V4       R# )r&   )ÚPDFRadialShadingrc   r’  N)r*   rœ  rV   ru   rÍ   rŽ  )r�   r_   rA  r…  rQ   rm   rË   rœ  r–  r—  r˜  rŠ  s   &&&&&&&     r6   ÚradialGradientÚCanvas.radialGradient:  sF   € å=Ü.¨vÓ6Ñˆ
Ü! 'Ó5ˆÙ" 1¨¨a°FØ%Ô.@ÀÓ.HôJˆà�
‰
�7Ör8   c	                óÖ  € \        W6V P                  V P                  VR7      w  r9V P                  WVR7      p
Ve   V
P	                  V4       V'       d   V
P                  V4       V'       d   V
P                  V4       V
P                  V4       V'       d   V
P                  ^ 4       V'       d   V
P                  ^ 4       Ve   V
P	                  ^ 4       V P                  V
4       R# )z*Draws a string in the current text styles.©ÚfontNamerT  Úshaping©Ú	directionN)	r   r   r!  Ú	beginTextÚsetTextRenderModeÚsetCharSpaceÚsetWordSpaceÚtextLineÚdrawText©r�   r_   rA  rQ  ÚmodeÚ	charSpacer¤  Ú	wordSpacer¢  rÐ   rŸ   s   &&&&&&&&&  r6   Ú
drawStringÚCanvas.drawStringM  s¨   € ä$ T¸T¿^¹^ÐUY×UcÑUcÐmtÔu‰ˆà�N‰N˜1¨9ˆNÓ5ˆØÒ˜Q×0Ñ0°Ô6ß�a—n‘n YÔ/ß�a—n‘n YÔ/Ø	�
‰
�4Ôß�a—n‘n QÔ'ß�a—n‘n QÔ'ØÒ˜Q×0Ñ0°Ô3Ø�‰�aÖr8   c	                ó¶  € \        W6V P                  V P                  VR7      w  r9V'       d!   V	\        V4      ^,
          V,          ,          p	V'       d<   W“P	                  R4      VP	                  R4      ,           ^,
          V,          ,          p	V P                  W,
          V4      p
Ve   V
P                  V4       V'       d   V
P                  V4       V'       d   V
P                  V4       V
P                  V4       V'       d   V
P                  ^ 4       V'       d   V
P                  ^ 4       Ve   V
P                  ^ 4       V P                  V
4       R# )z2Draws a string right-aligned with the x coordinater   rD  ô   Â N©r   r   r!  rJ   rÙ  r¥  r¦  r§  r¨  r©  rª  r«  s   &&&&&&&&&  r6   rO  ÚCanvas.drawRightString[  sì   € ä$ T¸T¿^¹^ÐUY×UcÑUcÐmtÔu‰ˆß�e¤ D£	¨!¥¨YÕ6Õ6�eß�e§
¡
¨4Ó 0°·±¸GÓ1DÕ DÀQÕ FÈ	ÕQÕQ�eØ�N‰N˜1�9 aÓ(ˆØÒ˜Q×0Ñ0°Ô6ß�a—n‘n YÔ/ß�a—n‘n YÔ/Ø	�
‰
�4Ôß�a—n‘n QÔ'ß�a—n‘n QÔ'ØÒ˜Q×0Ñ0°Ô3Ø�‰�aÖr8   c	                óÆ  € \        W6V P                  V P                  VR7      w  r9V'       d!   V	\        V4      ^,
          V,          ,          p	V'       d<   W“P	                  R4      VP	                  R4      ,           ^,
          V,          ,          p	V P                  VRV	,          ,
          V4      p
Ve   V
P                  V4       V'       d   V
P                  V4       V'       d   V
P                  V4       V
P                  V4       V'       d   V
P                  ^ 4       V'       d   V
P                  ^ 4       Ve   V
P                  ^ 4       V P                  V
4       R# )z_Draws a string centred on the x coordinate. 

We're British, dammit, and proud of our spelling!r   rD  r²  r±  Nr³  r«  s   &&&&&&&&&  r6   ÚdrawCentredStringÚCanvas.drawCentredStringj  sô   € ô % T¸T¿^¹^ÐUY×UcÑUcÐmtÔu‰ˆß�e¤ D£	¨!¥¨YÕ6Õ6�eß�e§
¡
¨4Ó 0°·±¸GÓ1DÕ DÀQÕ FÈ	ÕQÕQ�eØ�N‰N˜1˜s 5�y�=¨!Ó,ˆØÒ˜Q×0Ñ0°Ô6ß�a—n‘n YÔ/ß�a—n‘n YÔ/Ø	�
‰
�4Ôß�a—n‘n QÔ'ß�a—n‘n QÔ'ØÒ˜Q×0Ñ0°Ô3Ø�‰�aÖr8   c
                óê  € VP                  V^4      p
V P                  W@P                  V P                  4      p\	        V
4      ^8X  d¹   \
        P                  V4      e¢   VR,          \        9  d�   V
^ ,          ^ R pV
^ ,          R,          pVR,          \        9  d   VR,          V,           pV^ R pK)  V P                  VRV,          ,
          W,WVWxV	R7       V P                  VRV,          ,
          W-WVWxV	R7       R# V
^ ,          pV P                  VRV,          ,
          W,WVWxV	R7       \	        V
4      ^8”  d6   WJ^,          ,           pV P                  VRV,          ,
          W-WVWxV	R7       R# R# )aT  Draws a string aligned on the first '.' (or other pivot character).

The centre position of the pivot character will be used as x.
So, you could draw a straight line down through all the decimals in a
column of numbers, and anything without a decimal should be
optically aligned with those that have.

There is one special rule to help with accounting formatting.  Here's
how normal numbers should be aligned on the 'dot'. Look at the
LAST two::

   12,345,67
      987.15
       42
   -1,234.56
     (456.78)
     (456)
       27 inches
       13cm

Since the last three do not contain a dot, a crude dot-finding
rule would place them wrong. So we test for the special case
where no pivot is found, digits are present, but the last character
is not a digit.  We then work back from the end of the string
This case is a tad slower but hopefully rare.

Nr±  )r¬  r­  r¤  r®  r¢  rg   )
r  ÚstringWidthr   r!  rJ   ÚdigitPatÚsearchr   rO  r¯  )r�   r_   rA  rQ  Ú	pivotCharr¬  r­  r¤  r®  r¢  ÚpartsÚpivWÚleftTextÚ	rightTexts   &&&&&&&&&&    r6   ÚdrawAlignedStringÚCanvas.drawAlignedString{  sU  € ð8 —
‘
˜9 QÓ'ˆØ×Ñ 	¯>©>¸4¿>¹>ÓJˆäˆu‹:˜Œ?œxŸ™¨tÓ4Ò@ÀTÈ"ÅXÔU[ÔE[ð ˜Q•x  "�~ˆHØ˜a� �ˆIà˜2•,¤fÔ,Ø$ R�L¨9Õ4�	Ø# A b˜>’à× Ñ   3 t¥8¥¨Q¸tØ'Àgð !ô Oà�O‰O˜A˜c $�h�J¨¸4Ø'Àgð ö Oð
 ˜Q•xˆHØ× Ñ   3 t¥8¥¨Q¸tØ'Àgð !ô Oä�5‹z˜AŒ~Ø%¨a­Õ0�	Ø—‘  # d¥(¥
¨A¸tØ"+È'ð  ö Sñ r8   c                ó:   € V P                   P                  4       pV# )zsReturns the list of PostScript font names available.

Standard set now, but may grow in future with font embedding.)ræ   ÚgetAvailableFonts)r�   Ú	fontnamess   & r6   rÄ  ÚCanvas.getAvailableFonts³  s   € ð —I‘I×/Ñ/Ó1ˆ	ØÐr8   c                ót   € \        \        P                  P                  4       4      pVP	                  4        V# )z-Convenience function to list all loaded fonts)rI   r   ÚwidthsrR  rk   )r�   Únamess   & r6   ÚlistLoadedFonts0ÚCanvas.listLoadedFonts0º  s)   € ä”Z×&Ñ&×+Ñ+Ó-Ó.ˆØ�
‰
ŒØˆr8   c           
     ó¸  € Wn         W n        Vf
   VR,          pW0n        \        P                  ! V P                   4      pVP
                  '       g‰   VP                  P                  '       g   \        V RR4      '       gX   V P                  P                  V4      pV P                  P                  RV: R\        V4      : R\        V4      : R24       R# R# R# )	zÑSets the font.  If leading not specified, defaults to 1.2 x
font size. Raises a readable exception if an illegal font
is supplied.  Font names are case-sensitive! Keeps track
of font name and size for metrics.NrØ   rE  FzBT rD  z Tf z TL ET)r   r!  r#  r   rI  rJ  rK  rL  rM  ræ   rN  r›   r.   r   )r�   Ú
psfontnamerß  ÚleadingrR  Úpdffontnames   &&&&  r6   ÚsetFontÚCanvas.setFontÀ  s¤   € ð
 $ŒØŒØŠ?Ø˜S•jˆGØŒÜ×!Ò! $§.¡.Ó1ˆØ× × Ð Ø�y‰y× × Ð ¬°Ð5FÀu×(MÒ(MØ"Ÿi™i×;Ñ;¸JÓG�Ø—
‘
×!Ò!»KÌÐPTÎÔW]Ð^eÖWfÐ"gÖhñ )Nñ !r8   c                ó~   € Vf   V P                   pVf   V P                  pV P                  V P                  W4       R# )z7Sets font size or leading without knowing the font faceN)r!  r#  rÐ  r   )r�   rß  rÎ  s   &&&r6   rN  ÚCanvas.setFontSizeÐ  s.   € àŠ< §¡˜ØŠ? d§m¡m˜GØ�‰�T—^‘^ TÖ3r8   c                ó€   € \         P                  ! Y;'       g    V P                  W0P                  3VRJ ,          4      # )z1gets width of a string in the given font and sizeN)r   r¹  r   r!  )r�   rQ  r¡  rT  s   &&&&r6   r¹  ÚCanvas.stringWidthÖ  s9   € ä×%Ò% d×,FÐ,F¸¿¹Ø%-¯n©nÐ$=¸hÈ$Ð>NÕ$OóQð 	Qr8   c                óh   € Wn         V P                  P                  R \        V4      ,          4       R# )z%s wN)r1  r›   r.   r   )r�   rÐ   s   &&r6   r»  ÚCanvas.setLineWidthÝ  s"   € ØŒØ�
‰
×Ñ˜&¤6¨%£=Õ0Ö1r8   c                ór   € VR9   g   Q R4       hWn         V P                  P                  RV,          4       R# )z0=butt,1=round,2=squarez*Line caps allowed: 0=butt,1=round,2=squarez%d JN©r&   re   rÈ   )r.  r›   r.   ©r�   r¬  s   &&r6   Ú
setLineCapÚCanvas.setLineCapá  s/   € à�wŒÐLÐ LÓLˆØŒØ�
‰
×Ñ˜& 4�-Ö(r8   c                ór   € VR9   g   Q R4       hWn         V P                  P                  RV,          4       R# )z0=mitre, 1=round, 2=bevelz-Line Joins allowed: 0=mitre, 1=round, 2=bevelz%d jNrÙ  )r/  r›   r.   rÚ  s   &&r6   ÚsetLineJoinÚCanvas.setLineJoinç  s/   € à�wŒÐOÐ OÓOˆØŒØ�
‰
×Ñ˜& 4�-Ö(r8   c                óh   € Wn         V P                  P                  R \        V4      ,          4       R# )z%s MN)Ú_miterLimitr›   r.   r   )r�   Úlimits   &&r6   ÚsetMiterLimitÚCanvas.setMiterLimití  s#   € Ø ÔØ�
‰
×Ñ˜&¤6¨%£=Õ0Ö1r8   c                ó  € Rp\        V\        \        34      '       d   W3p^ pM\        V4      '       g   RpV Uu. uF*  p\        V\        \        34      '       d
   V^ 8  g   K(  VNK,  	  ppV'       g$   \        V\        \        34      '       d   V^ 8  d   RpMV'       d   \	        V4      ^ 8:  d   RpV'       d   \        RV: RV: RV: 24      hV P                  P                  R\        V4      : R	V: R
24       R# u upi )z7Two notations.  pass two numbers, or an array and phaseÚ z1array should be a sequence of numbers or a numberz,array & phase should be non-negative numbersz%dash cycle should be larger than zerozsetDash: array=z phase=r{  Ú[z] z dN)	rD   Úintri   r   ÚsumrM   r›   r.   r   )r�   ÚarrayÚphaseÚreasonrÌ   Úbads   &&&   r6   ÚsetDashÚCanvas.setDashñ  sÄ   € àˆÜ�eœS¤˜K×(Ò(Ø�NˆEØ‰EÜ�u—’ØHˆFÙÓJ™%�Q¤z°!´S¼°K×'@Ò'@ÀAÈÁE�qˆq™%ˆÐJß”j ¬¬E {×3Ò3°u¸Q´wØC‰Fß”s˜5“z 1”}Ø<ˆFßÝÃËÊvÐVÓWÐWØ�
‰
×Ò¬°®»Ð>Ö?ùò Ks   ¼%DÁ&Dc                ó,   € \         P                  ! 4       # )z—Returns a fresh path object.  Paths are used to draw
complex figures.  The object returned follows the protocol
for a pathobject.PDFPathObject instance)r   rh  r�   s   &r6   Ú	beginPathÚCanvas.beginPath  s   € ô ×'Ò'Ó)Ð)r8   c                óÄ   € Vf   \        VRV P                  4      pV P                  P                  \	        VP                  4       4      4       V P                  W#V4       R# )z*Draw the path object in the mode indicatedNr&  )rM  r&  r›   r.   rK   ÚgetCoderj  )r�   ÚaPathrp  rq  ÚfillModes   &&&&&r6   ÚdrawPathÚCanvas.drawPath
  sG   € àÒÜ˜u [°·±Ó@ˆHØ�
‰
×Ñœ#˜eŸm™m›oÓ.Ô/Ø×Ñ˜F¨Ö1r8   c                óv   € V P                   P                  \        YVe   TMV P                  3,          4       R # r<   )r›   r.   ro  r&  )r�   rp  rq  rö  s   &&&&r6   rj  ÚCanvas._strokeAndFill  s,   € Ø�
‰
×Ñœ( 6¸XÒ=Q±ÐW[×WeÑWeÐ#eÕfÖgr8   c                ó   € Vf   \        VRV P                  4      pVP                  4       p\        W#V3,          pV\        8H  ;'       d    R;'       g    RpV: V: V: 2pV P
                  P                  V4       R# )zclip as well as drawingNr&  z W* z W )rM  r&  rô  ro  r%  r›   r.   )	r�   rõ  rp  rq  rö  ÚgcÚpathopsÚclipÚitems	   &&&&&    r6   ÚclipPathÚCanvas.clipPath  sk   € àÒÜ˜u [°·±Ó@ˆHØ�]‰]‹_ˆ¬°¸xÐ1GÕ(H˜gØœMÑ)×4Ð4¨f×=Ð=¸ˆÚšt¢WÐ-ˆØ�
‰
×Ñ˜$Ör8   c                ó   € \        WW#R7      # )zdReturns a fresh text object.  Text objects are used
to add large amounts of text.  See PDFTextObjectr£  )r   )r�   r_   rA  r¤  s   &&&&r6   r¥  ÚCanvas.beginText   s   € ô ˜T aÔ=Ð=r8   c                ój   € V P                   P                  \        VP                  4       4      4       R# )zDraws a text objectN)r›   r.   rK   rô  )r�   ÚaTextObjects   &&r6   rª  ÚCanvas.drawText%  s"   € à�
‰
×Ñœ#˜k×1Ñ1Ó3Ó4Ö5r8   c                ó„   € Vf   \         P                  pWn        V P                  P	                  V P                  4       R# )a  Possible values None, 1 or 0
If None the value from rl_config will be used.
If on, the page data will be compressed, leading to much
smaller files, but takes a little longer to create the files.
This applies to all subsequent pages, or until setPageCompression()
is next called.N)r	   r  rÈ  ræ   rÇ  )r�   r  s   &&r6   rñ   ÚCanvas.setPageCompression)  s2   € ð Ò"´i×6OÑ6O OØ /ÔØ�	‰	× Ñ  ×!6Ñ!6Ö7r8   c                ó   € Wn         R# )a  Allows hands-off animation of presentations :-)

If this is set to a number, in full screen mode, Acrobat Reader
will advance to the next page after this many seconds. The
duration of the transition itself (fade/flicker etc.) is controlled
by the 'duration' argument to setPageTransition; this controls
the time spent looking at the page.  This is effective for all
subsequent pages.N)rï   )r�   Údurations   &&r6   ÚsetPageDurationÚCanvas.setPageDuration4  s
   € ð &Ör8   c                ó  € / V n         V'       g   R# VR9   d   RRV,          3pM\        P                  ! R4      hVR9   d   RRV,           3pM\        P                  ! R4      hVR9   d   RRV,           3pM\        P                  ! R	4      hR
Wh.RV.RV.RV.R. RV./p	 W‘,          p
/ pRTR&   RT,          TR&   RT,           TR&   T
 F	  w  rÍYÛT&   K  	  Y°n         R#   \         d    \        P                  ! RT,          4      hi ; i)aË  PDF allows page transition effects for use when giving
presentations.  There are six possible effects.  You can
just guive the effect name, or supply more advanced options
to refine the way it works.  There are three types of extra
argument permitted, and here are the allowed values::

    direction_arg = [0,90,180,270]
    dimension_arg = ['H', 'V']
    motion_arg = ['I','O'] (start at inside or outside)

This table says which ones take which arguments::

    PageTransitionEffects = {
        'Split': [direction_arg, motion_arg],
        'Blinds': [dimension_arg],
        'Box': [motion_arg],
        'Wipe' : [direction_arg],
        'Dissolve' : [],
        'Glitter':[direction_arg]
        }

Have fun!
NÚDiz/%dz$ directions allowed are 0,90,180,270ÚDmr‰   z$dimension values allowed are H and VÚMz!motion values allowed are I and OÚSplitÚBlindsr´  ÚWipeÚDissolveÚGlitterzUnknown Effect Name "%s"z/TransrÅ  z%dr/   r"   )r&   éZ   r3  i  )ÚHÚV)ÚIÚO)rî   r
   ÚPDFErrorÚKeyError)r�   Ú
effectnamer
  r¤  Ú	dimensionÚmotionÚdirection_argÚdimension_argÚ
motion_argÚPageTransitionEffectsÚargsÚ	transDictrb   Úvalues   &&&&&&        r6   rÆ  ÚCanvas.setPageTransition@  s5  € ð<  "ˆÔßÙð ˜Ô&Ø! 5¨9Õ#4Ð5‰Mä—/’/Ð"HÓIÐIà˜
Ô"Ø! 3¨¥?Ð3‰Mä—/’/Ð"HÓIÐIà�YÔØ˜s V�|Ð,‰Jä—/’/Ð"EÓFÐFð �mÐ0Ø�}�oØ�J�<Ø�m�_Ø˜Ø�}�oð!Ðð	KØ(Õ4ˆDð
 ˆ	Ø$ˆ	�&ÑØ �ˆ	�#‰Ø˜zÕ)ˆ	�#‰Û ‰LˆSØ"�c‹Nñ !à(Öøô ô 	KÜ—/’/Ð"<¸zÕ"IÓJÐJð	Kús   Â!C Ã)Dc                ó8   € RP                  V P                  4      # )z¦Return uncompressed contents of current page buffer.

This is useful in creating test cases and assertions of what
got drawn, without necessarily saving pages to diskr{  )rH  r›   r�   s   &r6   ÚgetCurrentPageContentÚCanvas.getCurrentPageContentŠ  s   € ð
 �y‰y˜Ÿ™Ó$Ð$r8   c                ó‚   € V P                   P                  p\        VRR4      pVf   ^ RIHp V! 4       ;qCn        W$V&   R# )zCset one of the allowed enbtries in the documents viewer preferencesÚViewerPreferencesN)ÚViewerPreferencesPDFDictionary)ræ   ÚCatalogrM  r*   r-  r,  )r�   Úprefr&  ÚcatalogÚVPr-  s   &&&   r6   ÚsetViewerPreferenceÚCanvas.setViewerPreference‘  s=   € à—)‘)×#Ñ#ˆÜ�WÐ0°Ó6ˆØŠ:ÝOÙ-KÓ-MÐMˆBÔ*Øˆ4‹r8   c                óP   € V P                   P                  P                  V,          # )ú.you'll get an error here if none have been set©ræ   r.  r,  ©r�   r/  s   &&r6   ÚgetViewerPreferenceÚCanvas.getViewerPreferenceš  s   € à�y‰y× Ñ ×2Ñ2°4Õ8Ð8r8   c                óH   € V P                   P                  P                  V R# )r5  Nr6  r7  s   &&r6   ÚdelViewerPreferenceÚCanvas.delViewerPreferencež  s   € à�I‰I×Ñ×/Ñ/°Ò5r8   c                ó  € ^ RI HpHpHp \	        V4      '       d
   V! V4      pMC\        V\        \        34      '       d
   V! V4      pM\        V\        4      '       d	   V! V4      p\        V P                  P                  W4       R# )r&   )r§   r'   rÃ  N)r*   r§   r'   rÃ  r   rD   rI   rF   r¨   rÉ  ræ   r.  )r�   rb   r&  r§   r'   rÃ  s   &&&   r6   ÚsetCatalogEntryÚCanvas.setCatalogEntry¢  s`   € ßOÑOÜ��<Š<Ù˜eÓ$‰EÜ˜œt¤E˜l×+Ò+Ù˜U“O‰EÜ˜œd×#Ò#Ù! %Ó(ˆEÜ�—	‘	×!Ñ! #Ö,r8   c                óB   € \        V P                  P                  V4      # r<   )rM  ræ   r.  ©r�   rb   s   &&r6   ÚgetCatalogEntryÚCanvas.getCatalogEntry¬  s   € Ü�t—y‘y×(Ñ(¨Ó-Ð-r8   c                óF   € \        V P                  P                  V4       R# )z-you'll get an error here if it's not been setN)Údelattrræ   r.  rA  s   &&r6   ÚdelCatalogEntryÚCanvas.delCatalogEntry¯  s   € ä�—	‘	×!Ñ! #Ö&r8   c                ó¶   € V P                   P                  p\        VRR4      pVf   ^ RIHp V! 4       ;qen        ^ RIHp VP                  W! W#V4      4       R# )zadd a PDFPageLabel for pageNumÚ
PageLabelsN)ÚPDFPageLabels)ÚPDFPageLabel)ræ   r.  rM  r*   rJ  rI  rK  ÚaddPageLabel)	r�   ÚpageNumÚstyleÚstartÚprefixr0  ÚPLrJ  rK  s	   &&&&&    r6   rL  ÚCanvas.addPageLabel³  sL   € à—)‘)×#Ñ#ˆÜ�W˜\¨$Ó/ˆØŠ:Ý>Ù&3£oÐ5ˆBÔ#å9Ø
�‰˜ ¨U¸Ó @ÖAr8   c                ó²   €  V P                   #   \         d>    ^ RIH p T! T 4      ;T P                  P                  n         T n         T P                   u # i ; i)z/get form from canvas, create the form if needed)ÚAcroForm)rT  r  Úreportlab.pdfbase.acroformræ   r„  )r�   rT  s   & r6   ÚacroFormÚCanvas.acroForm¾  sJ   € ð	!Ø—=‘=Ð øÜô 	!Ý;Ù:BÀ4».ÐHˆD�I‰I×ÑÔ'¨$¬-Ø—=‘=Ò ð	!ús   ‚ ŽAAÁAc                óf  € \        V\        \        \        34      ;'       g    \        V\        4      pRpRpV'       d   \        VR4      p	V	R8g  pMY\        V\        4      '       dD   V'       d<   \        VP                  R4      p	V	R8g  pV'       d   VP                  pVP                  pV'       dS   V P                  4        V P                  X	4       V^ 8¼  d   V P                  V4       V'       d   V P                  V4       V P                  W#WE4       V'       d   V P                  4        R# R# )z9draw a boundary as a rectangle (primarily for debugging).Nrg   )rD   rK   rF   rI   r   r   r   r0   rÐ   r2   rº  rG  r»  rî  r‡  r½  )
r�   ÚsbrD  rE  rÐ   r?  Ússrs  Údar?   s
   &&&&&&    r6   rQ  ÚCanvas.drawBoundaryÈ  sÞ   € ä˜œC¤¤dÐ+Ó,×DÐD´
¸2¼eÓ0DˆØˆØˆßÜ˜˜2“ˆAØ�b‘‰BÜ˜Ô,×-Ò-·"Ü˜Ÿ™ Ó$ˆAØ�b‘ˆBßØ—H‘H�Ø—\‘\�ßØ�N‰NÔØ×Ñ Ô"Ø�!Œt�T×&Ñ& qÔ)ß�4—<‘< Ô#Ø�	‰	�"˜Ô%ßˆt× Ñ Ö"‰2r8   c                ó"   € W P                   V&   R # r<   )r  )r�   r    Úcbs   &&&r6   Ú
setNamedCBÚCanvas.setNamedCBÞ  s   € Ø �‰�dÓr8   c                ó:   € V P                   P                  VR 4      # r<   )r  r™   r0  s   &&r6   Ú
getNamedCBÚCanvas.getNamedCBá  s   € Ø�}‰}× Ñ   dÓ+Ð+r8   )?rT  rõ   rë  rý   rÿ   r'  r›   ró   rð  rü   rê   r$  rÄ  rð   ræ   rç   r6  rã   r4  r&  r   r!  r_  rø  rì   r)  rà   rá   râ   r#  r.  r0  r/  r1  rá  r2  r  ré   rö   rÈ  rï   rò   rí   rî   rë   rP  rø   r÷   r+  rõ  r5  r,  r-  r"  r*  rþ   rè   r(  r  r  rù   rû   r  )Nre   NNr&   NNNNNNNNNNNN)r&   N)r  NNNNN)r&   r  )NNFr?   FFN)NNNFr?   FFN)r&   r&   NN)re   r^   )Nre   Nr&   )g�Âõ(\�ê?g{®Gázì?gffffffî?)NNre   Nr&   )Nre   Nr&   NN)Nre   Nre   r&   NN)r&   r&   NNrÉ  )Nre   )rµ  )é   re   NNNé   )r&   r  )re   r&   )NT)Nr&   NNFr<   )NN)re   r&   N)r&   r&   N)Nre   r&   r  r  )NNN)�r¾   r¿   rÀ   rÁ   Ú__doc__r‘   r  r   r<  rA  r  r:  rI   rh   rJ   ÚSTATE_RANGEr  rW  rZ  r^  rd  rk  rn  rq  ru  ry  r}  r�  r…  r‰  r�  r”  r˜  rœ  rŸ  r¢  r«  rá  rÓ  rè  rÑ  rÍ  rÐ  rÏ  r  r!  r%  r+  r1  r4  r>  r\  rô   rc  rÎ  rm  rv  r„  r›  r¤  r¨  ÚtextAnnotation0r®  rµ  ÚinkAnnotation0rº  r¸  rÑ  rž  r×  rà  rä  rè  rä  rð  rõ  rø  rû  rÿ  r  r  r  r(  r¾  r¿  r0  r8  rº  r½  rH  r¼  rV  r]  rd  ri  r‡  rt  r{  r�  r„  r‹  rŽ  r™  r�  r¯  rO  r¶  r	   ÚdecimalSymbolrÁ  rÄ  rÊ  rÐ  rN  r¹  r»  rÛ  rÞ  rã  rî  rñ  r÷  rj  r   r¥  rª  rñ   r  rÆ  r)  r2  r8  r;  r>  rB  rF  rL  ÚpropertyrV  rQ  r_  rb  rÃ   rÄ   rÅ   s   @r6   r   r   â   s%  ø‡ € ñ/ôb`òDò.&ò>5ò5ð#÷ $)¡5£7ð ñ ‘u™SÐ!1Ó2Ó3Ó4€Kò.ò*ò$ò2ô4Lòl8ò&"ò
&ò
&ò(ò(ò$ò)ò,ò	)ò	)ò)ò)ò5ò)òòSòjòò+ò+ò.ò"òôKôZ	KòCò	&ò'ô/ô2|-ò|#ò
ò3ôò$ô2%)ôNô(bô
Zð
 %€Oà=AÒI[ÐghØ!%°ôrô$bð #€NôMô&Qô"!ôH%ò)ò ò3òòô,ò*ò)ò+ò!ô
òMò(=ò"ò&ò
$ò*ò6òòò2Nò
ô ò"òô
!ôDô
*ô)ô3ô)òò
+ôôô&ôôð" 7@×6MÑ6MÐTXÐdeÐquð  BFð  PUô 6Sòpòôiô 4ôQò2ò)ò)ò2ð  aô @ò&*ô2ôhô ô>ò
6ô	8ô
&ôH)òT%òò9ò6ò-ò.ò'ô	Bð ñ!ó ð!ò#ò,!÷,ð ,r8   Ú__main__zFor test scripts, look in tests)r&   r&   )>Ú__version__rf  Ú__all__r  Úrer|  Ústringr   Úmathr   r   r   r   Ú	reportlabr	   Úreportlab.pdfbaser
   r   Úreportlab.pdfbase.ttfontsr   r   Úreportlab.pdfgenr   Úreportlab.pdfgen.textobjectr   r   r   Úreportlab.lib.colorsr   r   r   r   r   Úreportlab.lib.utilsr   r   r   r   r   r   Úreportlab.lib.abagr   Úreportlab.lib.rl_accelr   r   Úreportlab.lib.boxstuffr    Úcompilerº  r%  ÚFILL_NON_ZEROro  r7   rL   rV   ru   rw   rÍ   r   r   r¾   Úprintr=   r8   r6   Ú<module>r     s>  ðð €ð	€ð 	Øð
€ð €ã 	Û Ý ß "Ó "Ý Ý $Ý (ß >Ý (ß VÑ Vß [Õ [ß Z× ZÝ #ß 4Ý 1à�:Š:�eÓ€ð €Ø€ð ��=Ð! CØ��=Ð! CØ��=Ð! CØ��=Ð! CØ��=Ð! DØ��=Ð! CØ��=Ð! DØ��=Ð! Cð€ô'ò&2ò 	ò#O÷JGñ GòR8÷8ñ 8ô@,ˆ_ô @,ðD8 ˆzÔÙ	Ð
+Ö,ñ r8   