
    Q?h{                        S r SrSSKJr  SSK7  SSK7  SSKJrJr  SSK	J
r
  SSKJr  SSK	Jr   " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      rS+ r\ S,:X  a  \" 5         g-g-).z3.3.0a  This file is a collection of widgets to produce some common signs and symbols.

Widgets include:

- ETriangle (an equilateral triangle),
- RTriangle (a right angled triangle),
- Octagon,
- Crossbox,
- Tickbox,
- SmileyFace,
- StopSign,
- NoEntry,
- NotAllowed (the red roundel from 'no smoking' signs),
- NoSmoking,
- DangerSign (a black exclamation point in a yellow triangle),
- YesNo (returns a tickbox or a crossbox depending on a testvalue),
- FloppyDisk,
- ArrowOne, and
- ArrowTwo
- CrossHair
    )colors)*)isStr	asUnicode)shapes)Widget)	renderPDFc                       \ rS rSrSrSr\" \" \SS9\" \SS9\" \SS9\" \SS9\" \5      \" \	5      \" \	5      \" \5      S9r
S	 rS
 rSrg)_Symbol(   zWAbstract base widget
possible attributes:
'x', 'y', 'size', 'fillColor', 'strokeColor'
   zsymbol x coordinatedesczsymbol y coordinatezsymbol x coordinate adjustment)xydxdysize	fillColorstrokeColorstrokeWidthc                     U R                   R                  S:w  d   S5       eS=U l        =U l        =U l        U l        SU l        [        R                  U l	        S U l
        SU l        g )Nr   z#Abstract class _Symbol instantiatedr   d   皙?)	__class____name__r   r   r   r   r   r   redr   r   r   selfs    \/var/www/html/env/lib/python3.13/site-packages/reportlab/graphics/widgets/signsandsymbols.py__init___Symbol.__init__8   s^    ~~&&	1X3XX1.////$'DG	    c                    [         R                  " SS5      n[        U R                  5      nU R	                  5       nSUl        SUl        UR                  5         UR                  U5        UR                  [         R                  " UR
                  US-  -   UR                  S-
  UR                  R                  [        R                  SSS	95        U$ )
N   r   2   r         middle
   r   
textAnchorfontSize)r   Drawingfloatr   r   r   r   drawaddStringr   r   black)r   Dsobs       r    demo_Symbol.demo@   s    NN3$$))^^
		b		fmmBDD!A#JRLL11V\\V^%') 	* r#   )r   r   r   r   r   r   r   r   N)r   
__module____qualname____firstlineno____doc___nodocAttrMapAttrMapValueisNumberisColorOrNone_attrMapr!   r7   __static_attributes__ r#   r    r   r   (   sn     F'<='<=((HI((HIH% /"=1"8,	
Hr#   r   c                   $    \ rS rSrSrS rS rSrg)	ETriangleM   #This draws an equilateral triangle.c                 .    [         R                  U 5        g N)r   r!   r   s    r    r!   ETriangle.__init__P   s    r#   c           	      ~   [        U R                  5      n[        R                  " 5       nUS-  n[        R                  " U R
                  U R                  U R
                  U-   U R                  U R
                  US-  -   U R                  U-   /U R                  U R                  US-  S9nUR                  U5        U$ )N      ?r'         I@pointsr   r   r   
r/   r   r   GroupPolygonr   r   r   r   r1   r   r5   gaetriangles        r    r0   ETriangle.drawS   s    $))LLN uW>>FFDFFFF1HdffFFAaCL,#  >>!--S5" 	
hr#   rD   Nr   r9   r:   r;   r<   r!   r0   rC   rD   r#   r    rF   rF   M   s    -r#   rF   c                   $    \ rS rSrSrS rS rSrg)	RTriangler   zhThis draws a right-angled triangle.

possible attributes:
'x', 'y', 'size', 'fillColor', 'strokeColor'

c                 f    SU l         SU l        SU l        [        R                  U l        S U l        g Nr   r   )r   r   r   r   greenr   r   r   s    r    r!   RTriangle.__init__l   s*    	r#   c           	      r   [        U R                  5      n[        R                  " 5       nUS-  n[        R                  " U R
                  U R                  U R
                  U-   U R                  U R
                  U R                  U-   /U R                  U R                  US-  S9nUR                  U5        U$ )NrM   rN   rO   rQ   rT   s        r    r0   RTriangle.draws   s    $))LLN uW>>FFDFFFF1HdffFF466!8,  >>!--S5" 	
hr#   r   r   r   r   r   NrY   rD   r#   r    r[   r[   d   s     r#   r[   c                   $    \ rS rSrSrS rS rSrg)Octagon   zbThis widget draws an Octagon.

possible attributes:
'x', 'y', 'size', 'fillColor', 'strokeColor'

c                 f    SU l         SU l        SU l        [        R                  U l        S U l        g r]   )r   r   r   r   yellowr   r   r   s    r    r!   Octagon.__init__   s*    	r#   c                    [        U R                  5      n[        R                  " 5       nUS-  n[        R                  " U R
                  U-   U R                  U R
                  U R                  U-   U R
                  U R                  US-  -   U R
                  U-   U R                  U-   U R
                  US-  -   U R                  U-   U R
                  U-   U R                  US-  -   U R
                  U-   U R                  U-   U R
                  US-  -   U R                  /U R                  U R                  SS9nUR                  U5        U$ )N   r'   r*   rP   r   r   r   )
r/   r   r   rR   rS   r   r   r   r   r1   )r   r5   rU   athirdoctagons        r    r0   Octagon.draw   s   $))LLN s...2ffdffVm.2ffdfffQh6G.2ffVmTVVAX.2fffQh.?.2ffQhq8I.2ffQhv.2fffQh.?)I 594D4D26..24
6 	
gr#   rb   NrY   rD   r#   r    rd   rd      s     r#   rd   c                   L    \ rS rSrSr\" \\" \5      \" \	5      S9r
S rS rSrg)Crossbox   zThis draws a black box with a red cross in it - a 'checkbox'.

possible attributes:
'x', 'y', 'size', 'crossColor', 'strokeColor', 'crosswidth'

)BASE
crossColor
crosswidthc                     SU l         SU l        SU l        [        R                  U l        [        R                  U l        [        R                  U l	        SU l
        g Nr   r   r*   )r   r   r   r   whiter   r   rs   r3   r   rt   r   s    r    r!   Crossbox.__init__   s@    	 **!<<r#   c           
      <   [        U R                  5      n[        R                  " 5       n[        R                  " U R
                  S-   U R                  S-   US-
  US-
  U R                  U R                  SS9nUR                  U5        [        R                  " U R
                  US-  -   U R                  US-  -   U R
                  US-  -   U R                  US-  -   U R                  U R                  U R                  S9nUR                  U5        [        R                  " U R
                  US-  -   U R                  US-  -   U R
                  US-  -   U R                  US-  -   U R                  U R                  U R                  S9nUR                  U5        U$ )Nr   r'   r   r   r   333333?333333?)r/   r   r   rR   Rectr   r   r   r   r1   Liners   rt   )r   r5   rU   box
crossLine1
crossLine2s         r    r0   Crossbox.draw   sP   $))LLN kk$&&(DFF1Hac1Q3>>!-- 	
c
[[4$&&!D&/4661T6?TXTZTZ\]^b\bTc??!__!__.
 	
j[[4$&&!D&/4661T6?TXTZTZ\]^b\bTc??!__!__.
 	
jr#   )rs   rt   r   r   r   r   r   Nr   r9   r:   r;   r<   r>   r   r?   rA   r@   rB   r!   r0   rC   rD   r#   r    rp   rp      s/     G!-0!(+
H
r#   rp   c                   L    \ rS rSrSr\" \\" \5      \" \	5      S9r
S rS rSrg)Tickbox   zThis draws a black box with a red tick in it - another 'checkbox'.

possible attributes:
'x', 'y', 'size', 'tickColor', 'strokeColor', 'tickwidth'

)rr   	tickColor	tickwidthc                     SU l         SU l        SU l        [        R                  U l        [        R                  U l        [        R                  U l	        SU l
        g rv   )r   r   r   r   r   r   r3   r   rw   r   r   r   s    r    r!   Tickbox.__init__   s@    	!<<r#   c                    [        U R                  5      n[        R                  " 5       n[        R                  " U R
                  S-   U R                  S-   US-
  US-
  U R                  U R                  SS9nUR                  U5        [        R                  " U R
                  US-  -   U R                  US-  -   U R
                  US-  -   U R                  US-  -   U R
                  US-  -   U R                  US-  -   U R
                  US-  -   U R                  US-  -   /U R                  U R                  U R                  S9nUR                  U5        U$ )Nr   r'   rz   r{   ffffff?r|   rO   )r/   r   r   rR   r}   r   r   r   r   r1   PolyLiner   r   )r   r5   rU   r   tickLines        r    r0   Tickbox.draw   s+   $))LLN kk$&&(DFF1Hac1Q3>>!-- 	
c
??TVVQtV_dffafotvvWXY]W]`d`f`fhijnhn`o-1VVQtV_dffafotvvWXY]W]`d`f`fhijnhn`o-q>>!^^!^^	-
 	
hr#   )r   r   r   r   r   r   r   Nr   rD   r#   r    r   r      s/     G / *
H
r#   r   c                   $    \ rS rSrSrS rS rSrg)
SmileyFacei  zWThis draws a classic smiley face.

possible attributes:
'x', 'y', 'size', 'fillColor'

c                     [         R                  U 5        SU l        SU l        SU l        [
        R                  U l        [
        R                  U l	        g r]   )
r   r!   r   r   r   r   rg   r   r3   r   r   s    r    r!   SmileyFace.__init__  s<    	!<<r#   c                 f   [        U R                  5      n[        R                  " 5       nUR	                  [        R
                  " U R                  US-  -   U R                  US-  -   US-  U R                  U R                  [        US-  U R                  5      S95        S H  nUR	                  [        R                  " U R                  US-  U-  -   U R                  US-  S-  -   US-  US-  U R                  U R                  [        US-  U R                  5      S95        M     U R                  US-  -   nU R                  US-  -   nUS-  nUnUnS	n	S
n
Sn/ nUR                  nSSKJnJnJn  US-  nUU-  nU	U-  nU
U-  nUU:  a  USU-  -   nUU:  a  M  UnUU:  a7  XO" U5      U-  -   nX^" U5      U-  -   nU" U5        U" U5        UU-   nUU:  a  M7  [        R$                  " UU R                  U R                  [        US-  U R                  5      S9nUR	                  U5        U$ )Nr'   g      C@cxcyrr   r   r   )r   r'   rj      r*   rz   r%   iT  r   r   sincospi     f@)r/   r   r   rR   r1   Circler   r   r   r   maxr   Ellipseappendmathr   r   r   r   )r   r5   rU   icenterxcenteryradiusyradiusxradiusstartangledegreesendangledegreesdegreedelta
pointslistar   r   r   degreestoradiansradiansdelta
startangleendangleangler   r   smiles                            r    r0   SmileyFace.draw  s4   $))LLN 	
fmmtvvqs|!!..d6F6F#d&6&679 	: AEE&..1a!Qw"ad"..d>N>N #AcE$*:*: ;= >  !!s
%%e8"#33&'77
"#33z!!!B$h z!Hn#e*V++A#e*W,,AaD!A$,&E	 Hn 
++!-- 3t'7'78: 	
er#   rb   NrY   rD   r#   r    r   r     s    (0r#   r   c                   <    \ rS rSrSr\" \\" \SS9S9r	S r
S rSrg	)
StopSigniG  zJThis draws a (British) stop sign.

possible attributes:
'x', 'y', 'size'

zcolor of the word stopr   )rr   	stopColorc                     SU l         SU l        SU l        [        R                  U l        [        R                  U l        [        R                  U l	        g r]   )
r   r   r   r   r3   r   	orangeredr   
ghostwhiter   r   s    r    r!   StopSign.__init__R  s=    	!<<))**r#   c                 :   [        U R                  5      n[        R                  " 5       nUS-  n[        R                  " U R
                  U-   U R                  U R
                  U R                  U-   U R
                  U R                  US-  -   U R
                  U-   U R                  U-   U R
                  US-  -   U R                  U-   U R
                  U-   U R                  US-  -   U R
                  U-   U R                  U-   U R
                  US-  -   U R                  /U R                  S SS9nUR                  U5        [        R                  " U R
                  U-   US-  -   U R                  US-  -   U R
                  US-  -   U R                  U-   US-  -   U R
                  US-  -   U R                  US-  -   US-  -
  U R
                  U-   US-  -   U R                  U-   US-  -
  U R
                  US-  -   US-  -
  U R                  U-   US-  -
  U R
                  U-   US-  -
  U R                  US-  -   US-  -
  U R
                  U-   US-  -
  U R                  U-   US-  -   U R
                  US-  -   US-  -
  U R                  US-  -   /S U R                  SS9nUR                  U5        U R                  (       aV  UR                  [        R                  " U R
                  US-  -   U R                  US-  -   S	U R                  S
US-  SS95        U$ )Nrj   r'   r   rk   K   r         ?皙?STOPr)   zHelvetica-Bold)r   r,   r-   fontName)r/   r   r   rR   rS   r   r   r   r1   r   r   r2   )r   r5   rU   rl   outerOctagoninnerOctagons         r    r0   StopSign.drawZ  s   $))LLN s~~dffVmTVV.2ffdffVm.2ffdfffQh6G.2ffVmTVVAX.2fffQh.?.2ffQhq8I.2ffQhv.2fffQh.?.I 594D4D2623
5 	
l~~dffVmQrT.BDFFAbDM.2ffadmTVVF]AbD=Q.2ffadmTVVVAX=NPQRTPT=U.2ffVmQrT.BDFF1HaPRdO.2fffQh.?2.FPQTUVXTXHY/3vvax!B$.?PQARTUVXTXAY/3vvax!B$.?PQRTPTAU.2fffQh.?2.FPQRTPT.W 5926..23
5 	
l>>EE&--#tvvqu~"dnn%&qS3CE F r#   )r   r   r   r   r   r   Nr   r9   r:   r;   r<   r>   r   r?   rA   rB   r!   r0   rC   rD   r#   r    r   r   G  s*     G 4LM
H+'r#   r   c                   <    \ rS rSrSr\" \\" \SS9S9r	S r
S rSrg	)
NoEntryi  zuThis draws a (British) No Entry sign - a red circle with a white line on it.

possible attributes:
'x', 'y', 'size'

zcolor of the inner barr   )rr   innerBarColorc                     SU l         SU l        SU l        [        R                  U l        [        R                  U l        [        R                  U l	        g r]   )
r   r   r   r   r3   r   r   r   r   r   r   s    r    r!   NoEntry.__init__  s>    	!<<))#..r#   c                    [        U R                  5      n[        R                  " 5       nU R                  (       aU  UR                  [        R                  " U R                  US-  -   U R                  US-  -   US-  S U R                  SS95        U R                  (       a[  UR                  [        R                  " U R                  US-  -   U R                  US-  -   US-  US-  -
  U R                  S SS95        U R                  nU(       aO  UR                  [        R                  " U R                  US-  -   U R                  US-  -   US-  US	-  X3SSS
95        U$ )Nr'   r   r   r&   r   r   r   皙?皙?)widthheightr   r   strokeLineCapr   )r/   r   r   rR   r   r1   r   r   r   r   r   r}   )r   r5   rU   r   s       r    r0   NoEntry.draw  sJ   $))LLN EE&--dffacl4661Q3<aPQc_csw  tD  tD  RS  T  U>>EE&--dffacl$&&!A#,qQRsUVWYUYlimiwiw  HL  Z[  \  ]**EE&++dffaendffaenAcERSTWRWer  bc  st  u  vr#   )r   r   r   r   r   r   Nr   rD   r#   r    r   r     s*     G$]8PQ
H/r#   r   c                   0    \ rS rSrSr\" \S9rS rS r	Sr
g)
NotAllowedi  zkThis draws a 'forbidden' roundel (as used in the no-smoking sign).

possible attributes:
'x', 'y', 'size'

)rr   c                     SU l         SU l        SU l        [        R                  U l        [        R                  U l        g r]   )r   r   r   r   r   r   rw   r   r   s    r    r!   NotAllowed.__init__  s.    	!::r#   c           	         [        U R                  5      n[        R                  " 5       nU R                  n[        R
                  " U R                  US-  -   U R                  US-  -   US-  US-  -
  U R                  X1S-  S9nUR                  U5        U R                  U-   nU R                  US-  -   US-  -
  nXS-  -
  nUS-  nUS-  n	Sn
SnSn/ nUR                  nS	S
KJnJnJn  US-  nUU-  nU
U-  nUU-  nUU:  a  USU-  -   nUU:  a  M  UnUU:  a8  UU" U5      U-  -   nXo" U5      U-  -   nU" U5        U" U5        UU-   nUU:  a  M8  [        R                  " XX1S-  S9nUR                  U5        U$ )Nr'   r*   g      $@r      r   iZ   r   r   r   rz   )r/   r   r   rR   r   r   r   r   r   r1   r   r   r   r   r   r   )r   r5   rU   r   outerCircler   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   crossbars                             r    r0   NotAllowed.draw  s   $))LLN&& mm$&&!A#,tvvqs|STUVSVYZ[]Y]R^lplzlz  KV  fi  di  j	kq!ac"A#w((
%%e8"#33&'77
"#33z!"}H z!Hn#e*V++A#e*W,,AaD!A$,&E	 Hn
 ??:Vasvqvw	hr#   rb   N)r   r9   r:   r;   r<   r>   r   rB   r!   r0   rC   rD   r#   r    r   r     s     G 
H&#r#   r   c                   $    \ rS rSrSrS rS rSrg)	NoSmokingi  zFThis draws a no-smoking sign.

possible attributes:
'x', 'y', 'size'

c                 .    [         R                  U 5        g rJ   )r   r!   r   s    r    r!   NoSmoking.__init__  s    D!r#   c           
         [        U R                  5      n[        R                  U 5      nU R                  US-  -   US-  -
  nU R
                  US-  -   US-  -
  n[        R                  " X4US-  US-  [        R                  [        R                  SS9nX1S-  -   US-  -   nUR                  SU5        [        R                  " X4US	-  US-  [        R                  S SS9nX1S
-  -   nUR                  SU5        [        R                  " X4US	-  US-  [        R                  S SS9nX1S
-  -   nUR                  SU5        [        R                  " X4US	-  US-  [        R                  S SS9nX1S
-  -   nUR                  SU5        U$ )Nr'   g      @       r   r   r   r   r   r   r   r   @   P   #   )r/   r   r   r0   r   r   r   r}   r   r   grayinsertr   )	r   r5   rU   newxnewycigarrette1cigarrette2cigarrette3cigarrette4s	            r    r0   NoSmoking.draw  sw   $))OOD! vvqs|QsU#vvqs|QrT"kkdqsaPRd"--V[[VWYQ3Z2	K kkdqtqQSt",,DaQbDk	K kkdqtqQSt",,DaQbDk	K kkdqtqQSt",,DaQbDk	K r#   rD   NrY   rD   r#   r    r   r     s    "r#   r   c                   $    \ rS rSrSrS rS rSrg)
DangerSigni  zThis draws a 'danger' sign: a yellow box with a black exclamation point.

possible attributes:
'x', 'y', 'size', 'strokeColor', 'fillColor', 'strokeWidth'

c                     SU l         SU l        SU l        [        R                  U l        [        R                  U l        U R                  S-  U l        g )Nr   r   rM   )	r   r   r   r   r3   r   goldr   r   r   s    r    r!   DangerSign.__init__  s>    	!<<99U?r#   c                 *   [        U R                  5      n[        R                  " 5       nU R                  nUS-  nU R                  nUS-  n[        R
                  " U R                  U R                  U R                  U-   U R                  U R                  US-  -   U R                  U-   /S U R                  SS9nUR                  U5        [        R
                  " U R                  US-  -   U R                  US-  -   U R                  U-   US-  -
  U R                  US-  -   U R                  US-  -   U R                  U-   US-  -
  /U R                  S SS9nUR                  U5        [        R
                  " U R                  US-  -   US-  -
  U R                  US-  -   U R                  US-  -   US-  -   U R                  US-  -   U R                  US-  -   US-  -   US-  -   U R                  US	-  -   U R                  US-  -   US-  -
  US-  -
  U R                  US	-  -   /U R                  S S
9nUR                  U5        [        R
                  " U R                  US-  -   US-  -
  U R                  U-   U R                  US-  -   US-  -   U R                  U-   U R                  US-  -   US-  -   U R                  US-  -   U R                  US-  -   US-  -
  U R                  US-  -   /U R                  S S
9nUR                  U5        U$ )NrM   r'   r   rO   r&   r   g      @r   g      @)rP   r   r   )r/   r   r   rR   r   rS   r   r   r   r1   r   )	r   r5   rU   ewrV   outerTriangleinnerTriangleexmarkexdots	            r    r0   DangerSign.draw  s   $))LLNuW
 uWFFDFFFF1HdffFFAaCL1#  !-- 	
mFFAbDM4661R4=VVAX"tvvqt}FFAaCL$&&(QrT*1,  >>! 	
mffQqSj"Q$3ffQqSj"Q$3ffQqSjBqD"BqD)DFF2c6MffQqSjBqD"BqD)DFF2c6M	(;
  ++!# 	
fffQqSj"Q$ffQqSj"Q$ffQqSj"Q$1ffQqSj"Q$1	'.
  ++!# 	
er#   r   r   r   r   r   r   NrY   rD   r#   r    r   r     s    +1r#   r   c                   `    \ rS rSrSr\" \\" \5      \" \5      \" \	5      S9r
S rS rS rSrg)	YesNoiO  a!  This widget draw a tickbox or crossbox depending on 'testValue'.

If this widget is supplied with a 'True' or 1 as a value for
testValue, it will use the tickbox widget. Otherwise, it will
produce a crossbox.

possible attributes:
'x', 'y', 'size', 'tickcolor', 'crosscolor', 'testValue'

)rr   	tickcolor
crosscolor	testValuec                     SU l         SU l        SU l        [        R                  U l        [        R                  U l        SU l        g )Nr   r   r   )	r   r   r   r   r^   r  r   r  r  r   s    r    r!   YesNo.__init__a  s4    	 **r#   c                    U R                   (       a  [        5       nU R                  Ul        O[	        5       nU R
                  Ul        U R                  Ul        U R                  Ul        U R                  Ul	        UR                  5         U$ rJ   )r  r   r  r   rp   r  rs   r   r   r   r0   )r   yns     r    r0   
YesNo.drawi  s\    >>yBBLzB//BMVVVV		
		r#   c                    [         R                  " SS5      n[        5       nSUl        SUl        SUl        SUl        UR                  5         UR                  U5        [        5       nSUl        SUl        SUl        SUl        UR                  5         UR                  U5        S	nUR                  [         R                  " UR                  UR
                  S
-  -   UR                  SU-  -
  S[        R                  SUS95        UR                  [         R                  " UR                  UR
                  S
-  -   UR                  SU-  -
  S[        R                  SUS95        SnUR                  [         R                  " UR                  S-   UR                  S-
  U R                  R                  [        R                  SUS95        U$ )Nr%   r         F   r   x   r      r'   333333?ztestValue=0r)   r+   ztestValue=1r*   U      )r   r.   r   r   r   r   r  r0   r1   r2   r   r3   r   r   )r   r4   r  yn2labelFontSizes        r    r7   
YesNo.demow  si   NN3$W
		b	g
	c
	fmmBDD"''!),bddC4E.F)V\\h%24 	5 	
fmmCEE388A:.s=7H0I)V\\h%24 	5 	fmmBDDGRTT"W NN33v||X`%24 	5 r#   )r  r   r  r  r   r   N)r   r9   r:   r;   r<   r>   r   r?   isColor	isBooleanrB   r!   r0   r7   rC   rD   r#   r    r   r   O  s<    	 G )!'* +
Hr#   r   c                   >    \ rS rSrSr\" \\" \5      S9r	S r
S rSrg)
FloppyDiski  zaThis widget draws an icon of a floppy disk.

possible attributes:
'x', 'y', 'size', 'diskcolor'

)rr   	diskColorc                 X    SU l         SU l        SU l        [        R                  U l        g r]   )r   r   r   r   r3   r  r   s    r    r!   FloppyDisk.__init__  s"    	r#   c           
         [        U R                  5      n[        R                  " 5       n[        R                  " U R
                  U R                  US-  -   XUS-  -
  U R                  S SS9nUR                  U5        [        R                  " U R
                  US-  -   U R                  U-   US-  -
  US-  US-  [        R                  S SS9nUR                  U5        [        R                  " U R
                  US-  -   U R                  U-   US-  -
  US-  US-  [        R                  S SS9nUR                  U5        [        R                  " U R
                  US	-  -   U R                  S
U-  -   U R
                  US-  -   U R                  S
U-  -   [        R                  [        R                  SS9nUR                  U5        [        R                  " U R
                  US	-  -   U R                  SU-  -   U R
                  US-  -   U R                  SU-  -   [        R                  [        R                  SS9nUR                  U5        [        R                  " U R
                  US	-  -   U R                  SU-  -   U R
                  US-  -   U R                  SU-  -   [        R                  [        R                  SS9nUR                  U5        [        R                  " U R
                  US-  -   U R                  US-  US-  [        R                  S SS9n	UR                  U	5        [        R                  " U R
                  US-  -   U R                  US-  -   US-  US-  U R                  S SS9n
UR                  U
5        U$ )Nr   r   r   r   r   r   gQ?g{Gz?r{   g333333?r|   )x1y1x2y2r   r   r   gffffff?r   r   gQ?gQ?gQ?)r/   r   r   rR   r}   r   r   r  r1   r   
whitesmoke	royalbluer~   r3   silver)r   r5   rU   diskBodylabellabelsplashline1line2line3
metalcover	coverslots              r    r0   FloppyDisk.draw  s	   $))LLN ;;4661S5>aPSe9>>! 	
hdffaenAcE0B!C%XYZ^X^!,,! 	
ekkDFFAcENtvvax!C%6HPQRUPU^_`d^d!++! 	
k tvvqv4663q5>dffaPTfoZ^Z`Z`befgbgZh!<<#\\ 	
etvvqv4663q5>dffaPTfoZ^Z`Z`befgbgZh!<<#\\ 	
etvvqv4663q5>dffaPTfoZ^Z`Z`befgbgZh!<<#\\ 	
e[[4661S5>dffQsUSTUYSY!==!
 	
jKK$&&!D&/dffqw5GqQUv^_`d^d>>!	 	
ir#   )r  r   r   r   N)r   r9   r:   r;   r<   r>   r   r?   r  rB   r!   r0   rC   rD   r#   r    r  r    s'     G )
H&8r#   r  c                   $    \ rS rSrSrS rS rSrg)ArrowOnei  z]This widget draws an arrow (style one).

possible attributes:
'x', 'y', 'size', 'fillColor'

c                 t    SU l         SU l        SU l        [        R                  U l        SU l        S U l        g r]   )r   r   r   r   r   r   r   r   r   s    r    r!   ArrowOne.__init__  s2    	r#   c                    [        U R                  5      n[        R                  " 5       nU R                  nU R
                  nUS-  nUS-  nUS-  nUR                  [        R                  " X4U-   X4SU-  -   X5-   USU-  -   X5-   USU-  -   X1-   XE-   X5-   XG-   X5-   XF-   /U R                  U R                  U R                  S95        U$ )Nr'   rj         rO   r/   r   r   rR   r   r   r1   rS   r   r   r   )r   r5   rU   r   r   s2s3s5s           r    r0   ArrowOne.draw  s    $))LLNFFFFqSqSqS	fnn()B$()AbD&()QqtV()QqtV()AD()QT()QT') !NN"..".. 	 r#   r   NrY   rD   r#   r    r.  r.    s     r#   r.  c                   $    \ rS rSrSrS rS rSrg)ArrowTwoi	  z]This widget draws an arrow (style two).

possible attributes:
'x', 'y', 'size', 'fillColor'

c                 t    SU l         SU l        SU l        [        R                  U l        SU l        S U l        g r]   )r   r   r   r   bluer   r   r   r   s    r    r!   ArrowTwo.__init__  s2    	r#   c                    [        U R                  5      n[        R                  " 5       nU R                  nU R
                  nUS-  nUS-  nUS-  nUS-  nUR                  [        R                  " X4SU-  -   X4SU-  -   USU-  -   USU-  -   USU-  -   USU-  -   X1-   XE-   USU-  -   XF-   USU-  -   USU-  -   /U R                  U R                  U R                  S95        U$ )	Nr'   rj   r2           g     2@rO   r4  )	r   r5   rU   r   r   r5  r6  r7  s24s	            r    r0   ArrowTwo.draw  s    $))LLN FFFFqSqSqSd	fnn3h3heCiK2c6adFAadFCadFADeCiK2c6 ****, 	 r#   r   NrY   rD   r#   r    r:  r:  	  s     r#   r:  c            	       L    \ rS rSrSr\" \\" \" \	\
45      SS9S9rS rS rSrg	)
	CrossHairi7  rH   z( gap at centre as "x%" or points or Noner   )rr   innerGapc                     S=U l         =U l        =U l        U l        SU l        S U l        [        R                  U l        SU l	        SU l
        g )Nr   r*   r   z20%)r   r   r   r   r   r   r   r3   r   r   rF  r   s    r    r!   CrossHair.__init__=  sG    .////$'DG	!<<r#   c                    [        U R                  5      n[        R                  " 5       nU R                  nU R
                  U R                  -   nU R                  U R                  -   nSU R                  -  nU(       d  XF-
  XTU-   U4XEU-
  XEU-   4/nO[        U5      (       aE  [        U5      nUR                  S5      (       a  U[        US S 5      -  S-  nO[        U5      S-  nOUS-  nXF-
  XTU-
  U4XH-   XTU-   U4XEU-
  XEU-
  4XEU-   XEU-   4/n[        R                  " U R                  U R                  S9n	U H(  u  ppU	R                  X5        U	R!                  X5        M*     UR#                  U	5        U$ )Nr   %r   g      Y@)r   r   )r/   r   r   rR   rF  r   r   r   r   r   r   endswithPathr   r   moveTolineTor1   )r   r5   rU   igr   r   hsizeLgsPx0y0r  r  s                 r    r0   CrossHair.drawE  sc   $))LLN]]FF477NFF477NDII'!eGA&U71uW(=>ARyyr];;t$$uRW~-e3Br3BV'!bD#ad1uWQ%7!eGAd9KaRTPTUVY^W^M_`AKKD$4$4AQAQRKB"HHROHHRO  	
ar#   )	r   r   r   rF  r   r   r   r   r   N)r   r9   r:   r;   r<   r>   r   r?   EitherOrisStringisNumberOrNonerB   r!   r0   rC   rD   r#   r    rE  rE  7  s0    -G#Hh~-F$GMwx
Hr#   rE  c                     Sn [         R                  " SS5      n[        5       nSUl        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [        5       nS
Ul        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [        5       nSUl        SUl        UR                  U5        UR                  R                  S-   nUR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  U[        R                  SU S	95        UR                  [         R                  " SSS[        R                  SU S-  S	95        [        5       nSUl        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [        5       nS
Ul        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [!        5       nSUl        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [#        5       n	SU	l        SU	l        UR                  U	5        UR                  [         R                  " U	R                  U	R                  S-  -   U	R                  SU -  -
  U	R                  R                  [        R                  SU S	95        [%        5       n
S
U
l        SU
l        UR                  U
5        UR                  [         R                  " U
R                  U
R                  S-  -   U
R                  SU -  -
  U
R                  R                  [        R                  SU S	95        ['        5       nSUl        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [)        5       nSUl        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [+        5       nS
Ul        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [-        5       nSUl        SUl        UR                  U5        UR                  [         R                  " UR                  UR                  S-  -   UR                  SU -  -
  UR                  R                  [        R                  SU S	95        [.        R0                  " USS5        [3        S5        g)z\This function produces a pdf with examples of all the signs and symbols from this file.
    r*   i  i  r  i  r'   r  r)   r+      i@  r      r   zT(The 'YesNo' widget returns a tickbox if testvalue=1, and a crossbox if testvalue=0)g      ?i  i     zsignsandsymbols.pdfzsignsandsymbols.pyzwrote file: signsandsymbols.pdfN)r   r.   rp   r   r   r1   r2   r   r   r   r   r3   r   r   r   r   r   r   r   r   r.  r:  r  r	   
drawToFileprint)r  r4   cbtbr  
tempstringssnesfdsnansa1a2fds                  r    testrl  b  s    Ms3A	BBDBDEE"IEE&--bggai("$$M0A*B<<00FLLU]$13 4 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5
 
BBDBDEE"I&&,JEE&--bggai("$$M0A*B&&,,8%24 5 EE&--Ar  E  K  K  X`%24%79 :
 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 
BBDBDEE"IEE&--bggai("$$M0A*BLL11V\\V^%24 5 13GH	
+,r#   __main__N)!__version__r<   reportlab.libr   reportlab.lib.validatorsreportlab.lib.attrmapreportlab.lib.utilsr   r   reportlab.graphicsr   reportlab.graphics.widgetbaser   r	   r   rF   r[   rd   rp   r   r   r   r   r   r   r   r   r  r.  r:  rE  rl  r   rD   r#   r    <module>ru     s)   	, ! & # 0 % 0 (#f #J . @#g #J.w .b)g )V@ @D:w :z#g #J5 5p'
 'TA AHCG CJJ JX'w 'R,x ,\( (Vl-\ ZF r#   