ó
±éRc           @  s1  d  d l  m Z m Z d  d l Z d  d l Z d  d l Z d  d l j	 Z	 d  d l
 j Z d  d l
 m Z d  d l j Z d  d l m Z d  d l j Z d  d l m Z d  d l m Z e j j d d ƒ d e j f d	 „  ƒ  YZ e j e ƒ Z xL d
 d d d d d d d d d d d d f D] Z e j j i e e 6ƒ qWe j e j ƒ d e f d „  ƒ  YZ d
 e f d „  ƒ  YZ d e f d „  ƒ  YZ  d e f d „  ƒ  YZ! d e f d „  ƒ  YZ" d e f d „  ƒ  YZ# d e f d „  ƒ  YZ$ d e" f d „  ƒ  YZ% e j j i e% j j& d 6ƒ e j j i e% j j& d 6ƒ d e f d  „  ƒ  YZ' d e  f d! „  ƒ  YZ( d e f d" „  ƒ  YZ) d e) f d# „  ƒ  YZ* d e) f d$ „  ƒ  YZ+ e, e- d% „ Z. d& e, d' „ Z/ d( d) „ Z0 d* „  Z1 d+ e2 f d, „  ƒ  YZ3 d- e3 f d. „  ƒ  YZ4 e j j d/ e1 e4 j5 ƒ ƒ d e f d0 „  ƒ  YZ6 d  d1 l7 m8 Z8 d  d2 l7 m9 Z9 m: Z: m; Z; d  d3 l7 m< Z< d  d4 l7 m= Z= m> Z> d  d5 l7 m? Z? m@ Z@ d6 e3 f d7 „  ƒ  YZA d8 „  ZB d9 e3 f d: „  ƒ  YZC e j j d; e1 eC j5 ƒ d< e1 eA j5 ƒ ƒ d= e f d> „  ƒ  YZD d? eD f d@ „  ƒ  YZE d S(A   iÿÿÿÿ(   t   divisiont   print_functionN(   t   allow_rasterization(   t	   docstring(   t   Path(   t   mplDeprecationt   Patchs$  

          =================   ==============================================
          Property            Description
          =================   ==============================================
          alpha               float
          animated            [True | False]
          antialiased or aa   [True | False]
          clip_box            a matplotlib.transform.Bbox instance
          clip_on             [True | False]
          edgecolor or ec     any matplotlib color
          facecolor or fc     any matplotlib color
          figure              a matplotlib.figure.Figure instance
          fill                [True | False]
          hatch               unknown
          label               any string
          linewidth or lw     float
          lod                 [True | False]
          transform           a matplotlib.transform transformation instance
          visible             [True | False]
          zorder              any number
          =================   ==============================================

          c        	   B  sš  e  Z d  Z d Z d „  Z d$ d$ d$ d$ d$ d$ d$ e d „ Z d „  Z d$ d „ Z	 d$ d „ Z
 d „  Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z e Z d „  Z e Z d „  Z e Z d „  Z e Z d „  Z e Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z  d „  Z! d „  Z" d „  Z# d „  Z$ d „  Z% d „  Z& d „  Z' e( e' e& ƒ Z) d „  Z* d  „  Z+ e, d! „  ƒ Z- d" „  Z. d$ d# „ Z/ RS(%   sÅ   
    A patch is a 2D artist with a face color and an edge color.

    If any of *edgecolor*, *facecolor*, *linewidth*, or *antialiased*
    are *None*, they default to their rc params setting.
    i   c         C  s   t  |  j ƒ j d ƒ d S(   Nt   .iÿÿÿÿ(   t   strt	   __class__t   split(   t   self(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   __str__7   s    c	         K  sC  t  j j |  ƒ | d k r, t j d } n  | d k rA d } n  | d k r] t j d } n  t |  _ | d k	 r¶ | d k	 sŠ | d k	 r¦ d d l }
 |
 j	 d ƒ n  |  j
 | ƒ n |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ t j ƒ  |  _ t |	 ƒ r?t  j |  |	 � n  d S(   sQ   
        The following kwarg properties are supported

        %(Patch)s
        s   patch.linewidtht   solids   patch.antialiasediÿÿÿÿNsQ   Setting the 'color' property will overridethe edgecolor or facecolor properties. (   t   artistt   Artistt   __init__t   Nonet   mplt   rcParamst   Truet   _fillt   warningst   warnt	   set_colort   set_edgecolort   set_facecolort   set_linewidtht   set_linestylet   set_antialiasedt	   set_hatcht   set_fillt
   transformst   IdentityTransformt   _combined_transformt   lent   setp(   R   t	   edgecolort	   facecolort   colort	   linewidtht	   linestylet   antialiasedt   hatcht   fillt   kwargsR   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   :   s0    		c         C  s?   |  j  ƒ  } |  j ƒ  } | j | ƒ } t | ƒ r; | d Sg  S(   sé   
        Return a copy of the vertices used in this patch

        If the patch contains Bezier curves, the curves will be
        interpolated by line segments.  To access the curves as
        curves, use :meth:`get_path`.
        i    (   t   get_transformt   get_patht   to_polygonsR#   (   R   t   transt   patht   polygons(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt	   get_vertsg   s    c         C  sq   t  |  j ƒ r |  j |  | ƒ S| d k r: |  j ƒ  } n  |  j ƒ  j | j | j f |  j ƒ  | ƒ } | i  f S(   sU   Test whether the mouse event occurred in the patch.

        Returns T/F, {}
        N(	   t   callablet	   _containsR   t   get_linewidthR/   t   contains_pointt   xt   yR.   (   R   t
   mouseeventt   radiust   inside(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   containsv   s    	!c         C  s:   | d k r |  j ƒ  } n  |  j ƒ  j | |  j ƒ  | ƒ S(   sz   
        Returns *True* if the given point is inside the path
        (transformed with its transform attribute).
        N(   R   R7   R/   R8   R.   (   R   t   pointR<   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR8   ‡   s
    	c         C  sÂ   t  j j |  | ƒ |  j | j ƒ  ƒ |  j | j ƒ  ƒ |  j | j ƒ  ƒ |  j	 | j
 ƒ  ƒ |  j | j ƒ  ƒ |  j | j ƒ  ƒ |  j | j ƒ  ƒ |  j | j ƒ  ƒ |  j | j ƒ  ƒ d S(   sM   
        Updates this :class:`Patch` from the properties of *other*.
        N(   R   R   t   update_fromR   t   get_edgecolorR   t   get_facecolorR   t   get_fillR   t	   get_hatchR   R7   R   t   get_linestylet   set_transformt   get_data_transformt
   set_figuret
   get_figuret	   set_alphat	   get_alpha(   R   t   other(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR@   ’   s    c         C  s   |  j  ƒ  j |  j ƒ  ƒ S(   s‡   
        Return a :class:`~matplotlib.transforms.Bbox` object defining
        the axis-aligned extents of the :class:`Patch`.
        (   R/   t   get_extentsR.   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRM   ¡   s    c         C  s   |  j  ƒ  t j j |  ƒ S(   sm   
        Return the :class:`~matplotlib.transforms.Transform` applied
        to the :class:`Patch`.
        (   t   get_patch_transformR   R   R.   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR.   ¨   s    c         C  s   t  j j |  ƒ S(   sŒ   
        Return the :class:`~matplotlib.transforms.Transform` instance which
        maps data coordinates to physical coordinates.
        (   R   R   R.   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRG   ¯   s    c         C  s
   t  j ƒ  S(   sh  
        Return the :class:`~matplotlib.transforms.Transform` instance which
        takes patch coordinates to data coordinates.

        For example, one may define a patch of a circle which represents a
        radius of 5 by providing coordinates for a unit circle, and a
        transform which scales the coordinates (the patch coordinate) by 5.
        (   R    R!   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRN   ¶   s    	c         C  s   |  j  S(   sV   
        Returns True if the :class:`Patch` is to be drawn with antialiasing.
        (   t   _antialiased(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_antialiasedÁ   s    c         C  s   |  j  S(   s>   
        Return the edge color of the :class:`Patch`.
        (   t
   _edgecolor(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRA   È   s    c         C  s   |  j  S(   s>   
        Return the face color of the :class:`Patch`.
        (   t
   _facecolor(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRB   Ï   s    c         C  s   |  j  S(   s2   
        Return the line width in points.
        (   t
   _linewidth(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR7   Ö   s    c         C  s   |  j  S(   sk   
        Return the linestyle.  Will be one of ['solid' | 'dashed' |
        'dashdot' | 'dotted']
        (   t
   _linestyle(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRE   Ý   s    c         C  s)   | d k r t j d } n  | |  _ d S(   sp   
        Set whether to use antialiased rendering

        ACCEPTS: [True | False]  or None for default
        s   patch.antialiasedN(   R   R   R   RO   (   R   t   aa(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   å   s    c         C  s   |  j  | ƒ S(   s   alias for set_antialiased(   R   (   R   RU   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_aaï   s    c         C  sD   | d k r t j d } n  | |  _ t j j | |  j ƒ |  _ d S(   sx   
        Set the patch edge color

        ACCEPTS: mpl color spec, or None for default, or 'none' for no color
        s   patch.edgecolorN(	   R   R   R   t   _original_edgecolort   colorst   colorConvertert   to_rgbat   _alphaRQ   (   R   R'   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ó   s    	c         C  s   |  j  | ƒ S(   s   alias for set_edgecolor(   R   (   R   R'   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_ecþ   s    c         C  so   | d k r t j d } n  | |  _ t j j | |  j ƒ |  _ |  j	 sk t
 |  j ƒ |  _ d |  j d <n  d S(   sx   
        Set the patch face color

        ACCEPTS: mpl color spec, or None for default, or 'none' for no color
        s   patch.facecolori    i   N(   R   R   R   t   _original_facecolorRX   RY   RZ   R[   RR   R   t   list(   R   R'   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    		c         C  s   |  j  | ƒ S(   s   alias for set_facecolor(   R   (   R   R'   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_fc  s    c         C  s   |  j  | ƒ |  j | ƒ d S(   só   
        Set both the edgecolor and the facecolor.

        ACCEPTS: matplotlib color spec

        .. seealso::

            :meth:`set_facecolor`, :meth:`set_edgecolor`
               For setting the edge or face color individually.
        N(   R   R   (   R   t   c(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    c         C  st   | d k	 r= y t | ƒ Wq= t k
 r9 t d ƒ ‚ q= Xn  t j j |  | ƒ |  j |  j ƒ |  j |  j	 ƒ d S(   sY   
        Set the alpha tranparency of the patch.

        ACCEPTS: float or None
        s   alpha must be a float or NoneN(
   R   t   floatt	   TypeErrorR   R   RJ   R   R]   R   RW   (   R   t   alpha(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRJ   #  s    c         C  s)   | d k r t j d } n  | |  _ d S(   s_   
        Set the patch linewidth in points

        ACCEPTS: float or None for default
        s   patch.linewidthN(   R   R   R   RS   (   R   t   w(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   3  s    c         C  s   |  j  | ƒ S(   s   alias for set_linewidth(   R   (   R   t   lw(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_lw=  s    c         C  s"   | d k r d } n  | |  _ d S(   sg   
        Set the patch linestyle

        ACCEPTS: ['solid' | 'dashed' | 'dashdot' | 'dotted']
        R   N(   R   RT   (   R   t   ls(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   A  s    	c         C  s   |  j  | ƒ S(   s   alias for set_linestyle(   R   (   R   Rg   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_lsK  s    c         C  s#   t  | ƒ |  _ |  j |  j ƒ d S(   sP   
        Set whether to fill the patch

        ACCEPTS: [True | False]
        N(   t   boolR   R   R]   (   R   t   b(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   O  s    c         C  s   |  j  S(   s   return whether fill is set(   R   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRC   X  s    c         C  s   | |  _  d S(   s¼  
        Set the hatching pattern

        *hatch* can be one of::

          /   - diagonal hatching
          \   - back diagonal
          |   - vertical
          -   - horizontal
          +   - crossed
          x   - crossed diagonal
          o   - small circle
          O   - large circle
          .   - dots
          *   - stars

        Letters can be combined, in which case all the specified
        hatchings are done.  If same letter repeats, it increases the
        density of hatching of that pattern.

        Hatching is supported in the PostScript, PDF, SVG and Agg
        backends only.

        ACCEPTS: ['/' | '\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*']
        N(   t   _hatch(   R   R+   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   a  s    c         C  s   |  j  S(   s#   Return the current hatching pattern(   Rk   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRD   }  s    c   
      C  sþ  |  j  ƒ  s d S| j d |  j ƒ  ƒ | j ƒ  } | j |  j d t ƒ|  j } |  j d d k rm d } n  | j | ƒ | j	 |  j
 ƒ | j |  j ƒ |  j | ƒ | j |  j ƒ | j |  j ƒ  ƒ |  j } | d d k rì d } n  | j |  j ƒ |  j r| j |  j ƒ n  |  j ƒ  d k	 r@| j |  j ƒ  Œ  n  |  j ƒ  } |  j ƒ  } | j | ƒ } | j ƒ  } |  j ƒ  rÍ| j ƒ  s—| d k	 rãx0 |  j ƒ  D] }	 |	 j  | | | | | ƒ q¤Wqãn | j  | | | | ƒ | j! ƒ  | j" d ƒ d S(   s0   Draw the :class:`Patch` to the given *renderer*.Nt   patcht   isRGBAi   i    (#   t   get_visiblet
   open_groupt   get_gidt   new_gct   set_foregroundRQ   R   RS   R   R   RT   R   RO   t   _set_gc_clipt   set_urlt   _urlt   set_snapt   get_snapRR   R   RJ   R[   Rk   R   t   get_sketch_paramst   set_sketch_paramsR/   R.   t   transform_path_non_affinet
   get_affinet   get_path_effectsR7   t	   draw_patht   restoret   close_group(
   R   t   renderert   gcRe   t   rgbFaceR2   t	   transformt   tpatht   affinet   path_effect(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   draw�  sB    					#
c         C  s   t  d ƒ ‚ d S(   s/   
        Return the path of this patch
        s   Derived must overrideN(   t   NotImplementedError(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   ²  s    c         C  s   |  j  ƒ  j |  j ƒ  ƒ S(   N(   R/   RM   R.   (   R   R€   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_window_extent¸  s    N(0   t   __name__t
   __module__t   __doc__t   zorderR   R   R   R   R4   R>   R8   R@   RM   R.   RG   RN   RP   t   get_aaRA   t   get_ecRB   t   get_fcR7   t   get_lwRE   t   get_lsR   RV   R   R\   R   R_   R   RJ   R   Rf   R   Rh   R   RC   t   propertyR,   R   RD   R   R‡   R/   R‰   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   .   sb   	%												
								
		
						1	t	   Rectanglet   Circlet   RegularPolygont   Polygont   Wedget   Arrowt
   FancyArrowt   YAArrowt   CirclePolygont   Ellipset   Arct   FancyBboxPatcht   Shadowc           B  sw   e  Z d  „  Z e j d d „ ƒ Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d	 „  Z d
 „  Z RS(   c         C  s   d t  |  j ƒ S(   Ns
   Shadow(%s)(   R   Rl   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ç  s    c         K  sO   t  j |  ƒ | |  _ | |  _ | | |  _ |  _ t j ƒ  |  _ |  j	 ƒ  d S(   s  
        Create a shadow of the given *patch* offset by *ox*, *oy*.
        *props*, if not *None*, is a patch property update dictionary.
        If *None*, the shadow will have have the same color as the face,
        but darkened.

        kwargs are
        %(Patch)s
        N(
   R   R   Rl   t   propst   _oxt   _oyR    t   Affine2Dt   _shadow_transformt   _update(   R   Rl   t   oxt   oyR¡   R-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ê  s    		c         C  sÀ   |  j  |  j ƒ |  j d  k	 r2 |  j |  j ƒ nŠ t j j |  j j ƒ  ƒ \ } } } } d } | | } | | } | | } |  j	 | | | d f ƒ |  j
 | | | d f ƒ |  j d ƒ d  S(   Ng333333Ó?g      à?(   R@   Rl   R¡   R   t   updateRX   RY   RZ   RB   R   R   RJ   (   R   t   rt   gRj   t   at   rho(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR¦   Ü  s    	


c         C  sA   | j  |  j ƒ } | j  |  j ƒ } |  j j ƒ  j | | ƒ d  S(   N(   t   points_to_pixelsR¢   R£   R¥   t   cleart	   translate(   R   R€   R§   R¨   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _update_transformì  s    c         C  s   |  j  S(   N(   R¢   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_oxñ  s    c         C  s   | |  _  d  S(   N(   R¢   (   R   R§   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _set_oxô  s    c         C  s   |  j  S(   N(   R£   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_oy÷  s    c         C  s   | |  _  d  S(   N(   R£   (   R   R¨   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _set_oyú  s    c         C  s   |  j  j ƒ  S(   N(   Rl   R/   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   ý  s    c         C  s   |  j  j ƒ  |  j S(   N(   Rl   RN   R¥   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRN      s    c         C  s!   |  j  | ƒ t j |  | ƒ d  S(   N(   R±   R   R‡   (   R   R€   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR‡     s    N(   RŠ   R‹   R   R   t   dedent_interpdR   R   R¦   R±   R²   R³   R´   Rµ   R/   RN   R‡   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR    Æ  s   									c           B  sË   e  Z d  Z d „  Z e j d d „ ƒ Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e e e ƒ Z RS(   sh   
    Draw a rectangle with lower left at *xy* = (*x*, *y*) with
    specified *width* and *height*.
    c         C  s*   |  j  j d |  j |  j |  j |  j f S(   Ns   (%g,%g;%gx%g)(   R	   RŠ   t   _xt   _yt   _widtht   _height(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    	g        c         K  sX   t  j |  | � | d |  _ | d |  _ | |  _ | |  _ | |  _ t j ƒ  |  _	 d S(   s¼   

        *angle*
          rotation in degrees (anti-clockwise)

        *fill* is a boolean indicating whether to fill the rectangle

        Valid kwargs are:
        %(Patch)s
        i    i   N(
   R   R   R·   R¸   R¹   Rº   t   _angleR    R!   t   _rect_transform(   R   t   xyt   widtht   heightt   angleR-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    			c         C  s
   t  j ƒ  S(   s6   
        Return the vertices of the rectangle
        (   R   t   unit_rectangle(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   )  s    c         C  sª   |  j  |  j ƒ } |  j |  j ƒ } |  j  |  j ƒ } |  j |  j ƒ } t j j | | | | ƒ } t j	 ƒ  } | j
 | | |  j ƒ t j | ƒ |  _ |  j | 7_ d S(   s  NOTE: This cannot be called until after this has been added
                 to an Axes, otherwise unit conversion will fail. This
                 maxes it very important to call the accessor method and
                 not directly access the transformation member variable.
        N(   t   convert_xunitsR·   t   convert_yunitsR¸   R¹   Rº   R    t   Bboxt   from_boundsR¤   t   rotate_deg_aroundR»   t   BboxTransformToR¼   (   R   R9   R:   R¾   R¿   t   bboxt	   rot_trans(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _update_patch_transform/  s    c         C  s   |  j  ƒ  |  j S(   N(   RÊ   R¼   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRN   ?  s    
c         C  s‰   |  j  d k s |  j d k r( t i  f S|  j ƒ  j ƒ  j | j | j f ƒ \ } } | d k o‚ | d k o‚ | d k o‚ | d k i  f S(   Ni    g        g      ð?(   R¹   Rº   t   FalseR.   t   invertedt   transform_pointR9   R:   (   R   R;   R9   R:   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR>   C  s
    
c         C  s   |  j  S(   s&   Return the left coord of the rectangle(   R·   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_xL  s    c         C  s   |  j  S(   s(   Return the bottom coord of the rectangle(   R¸   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_yP  s    c         C  s   |  j  |  j f S(   s2   Return the left and bottom coords of the rectangle(   R·   R¸   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_xyT  s    c         C  s   |  j  S(   s"   Return the width of the  rectangle(   R¹   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt	   get_widthX  s    c         C  s   |  j  S(   s"   Return the height of the rectangle(   Rº   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   get_height\  s    c         C  s   | |  _  d S(   sM   
        Set the left coord of the rectangle

        ACCEPTS: float
        N(   R·   (   R   R9   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_x`  s    c         C  s   | |  _  d S(   sO   
        Set the bottom coord of the rectangle

        ACCEPTS: float
        N(   R¸   (   R   R:   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_yh  s    c         C  s   | \ |  _  |  _ d S(   sc   
        Set the left and bottom coords of the rectangle

        ACCEPTS: 2-item sequence
        N(   R·   R¸   (   R   R½   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_xyp  s    c         C  s   | |  _  d S(   sA   
        Set the width rectangle

        ACCEPTS: float
        N(   R¹   (   R   Rd   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt	   set_widthx  s    c         C  s   | |  _  d S(   sA   
        Set the width rectangle

        ACCEPTS: float
        N(   Rº   (   R   t   h(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_height€  s    c         G  se   t  | ƒ d k r+ | d \ } } } } n | \ } } } } | |  _ | |  _ | |  _ | |  _ d S(   sj   
        Set the bounds of the rectangle: l,b,w,h

        ACCEPTS: (left, bottom, width, height)
        i    N(   R#   R·   R¸   R¹   Rº   (   R   t   argst   lRj   Rd   R×   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_boundsˆ  s    			c         C  s%   t  j j |  j |  j |  j |  j ƒ S(   N(   R    RÄ   RÅ   R·   R¸   R¹   Rº   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_bbox—  s    (   RŠ   R‹   RŒ   R   R   R¶   R   R/   RÊ   RN   R>   RÎ   RÏ   RÐ   RÑ   RÒ   RÓ   RÔ   RÕ   RÖ   RØ   RÛ   RÜ   R“   R½   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR”     s*   																		c           B  sÎ   e  Z d  Z d „  Z e j d d d „ ƒ Z d „  Z d „  Z d „  Z	 e
 e e	 ƒ Z d „  Z d	 „  Z e
 e e ƒ Z d
 „  Z d „  Z e
 e e ƒ Z d „  Z d „  Z e
 e e ƒ Z d „  Z d „  Z RS(   s"   
    A regular polygon patch.
    c         C  s"   d |  j  |  j d |  j d f S(   Ns   Poly%d(%g,%g)i    i   (   t   _numVerticest   _xy(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ¢  s    i   i    c         K  sc   | |  _  | |  _ | |  _ | |  _ t j | ƒ |  _ t j ƒ  |  _	 |  j
 ƒ  t j |  | � d S(   sf  
        Constructor arguments:

        *xy*
          A length 2 tuple (*x*, *y*) of the center.

        *numVertices*
          the number of vertices.

        *radius*
          The distance from the center to each of the vertices.

        *orientation*
          rotates the polygon (in radians).

        Valid kwargs are:
        %(Patch)s
        N(   RÞ   RÝ   t   _orientationt   _radiusR   t   unit_regular_polygont   _pathR    R¤   t   _poly_transformR±   R   R   (   R   R½   t   numVerticesR<   t   orientationR-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ¥  s    				
c         C  s5   |  j  j ƒ  j |  j ƒ j |  j ƒ j |  j Œ  d  S(   N(   Rã   R¯   t   scaleR<   t   rotateRå   R°   R½   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR±   Ä  s    c         C  s   |  j  S(   N(   RÞ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_xyÊ  s    c         C  s   | |  _  |  j ƒ  d  S(   N(   RÞ   R±   (   R   R½   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _set_xyÍ  s    	c         C  s   |  j  S(   N(   Rß   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_orientationÒ  s    c         C  s   | |  _  |  j ƒ  d  S(   N(   Rß   R±   (   R   Rå   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _set_orientationÕ  s    	c         C  s   |  j  S(   N(   Rà   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_radiusÚ  s    c         C  s   | |  _  |  j ƒ  d  S(   N(   Rà   R±   (   R   R<   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _set_radiusÝ  s    	c         C  s   |  j  S(   N(   RÝ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_numverticesâ  s    c         C  s   | |  _  d  S(   N(   RÝ   (   R   Rä   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _set_numverticeså  s    c         C  s   |  j  S(   N(   Râ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   ê  s    c         C  s   |  j  ƒ  |  j S(   N(   R±   Rã   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRN   í  s    
(   RŠ   R‹   RŒ   R   R   R¶   R   R±   Rè   Ré   R“   R½   Rê   Rë   Rå   Rì   Rí   R<   Rî   Rï   t   numverticesR/   RN   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR–   ž  s&   											t	   PathPatchc           B  s2   e  Z d  Z d „  Z e j d „  ƒ Z d „  Z RS(   s)   
    A general polycurve path patch.
    c         C  s   d t  |  j j d ƒ S(   Ns   Poly((%g, %g) ...)i    (   t   tupleRâ   t   vertices(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ö  s    c         K  s   t  j |  | � | |  _ d S(   sÉ   
        *path* is a :class:`matplotlib.path.Path` object.

        Valid kwargs are:
        %(Patch)s

        .. seealso::

            :class:`Patch`
                For additional kwargs

        N(   R   R   Râ   (   R   R2   R-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ù  s    c         C  s   |  j  S(   N(   Râ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   
  s    (   RŠ   R‹   RŒ   R   R   R¶   R   R/   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRñ   ò  s   	c           B  sz   e  Z d  Z d „  Z e j e d „ ƒ Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z e Z e Z e e e d	 d ƒ Z RS(
   s"   
    A general polygon patch.
    c         C  s   d t  |  j j d ƒ S(   Ns   Poly((%g, %g) ...)i    (   Rò   Râ   Ró   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    c         K  s*   t  j |  | � | |  _ |  j | ƒ d S(   s0  
        *xy* is a numpy array with shape Nx2.

        If *closed* is *True*, the polygon will be closed so the
        starting and ending points are the same.

        Valid kwargs are:
        %(Patch)s

        .. seealso::

            :class:`Patch`
                For additional kwargs

        N(   R   R   t   _closedRÕ   (   R   R½   t   closedR-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    	c         C  s   |  j  S(   N(   Râ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   *  s    c         C  s   |  j  S(   N(   Rô   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   get_closed-  s    c         C  s?   |  j  t | ƒ k r d  St | ƒ |  _  |  j |  j ƒ  ƒ d  S(   N(   Rô   Ri   RÕ   RÐ   (   R   Rõ   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_closed0  s    c         C  s
   |  j  j S(   N(   Râ   Ró   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÐ   6  s    c         C  sµ   t  j | ƒ } |  j r` t | ƒ r™ | d | d k j ƒ  r™ t  j | | d g g ƒ } q™ n9 t | ƒ d k r™ | d | d k j ƒ  r™ | d  } n  t | d |  j ƒ|  _ d  S(   Ni    iÿÿÿÿi   Rõ   (	   t   npt   asarrayRô   R#   t   anyt   concatenatet   allR   Râ   (   R   R½   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ   9  s    	&",s  Set/get the vertices of the polygon.  This property is
           provided for backward compatibility with matplotlib 0.91.x
           only.  New code should use
           :meth:`~matplotlib.patches.Polygon.get_xy` and
           :meth:`~matplotlib.patches.Polygon.set_xy` instead.N(   RŠ   R‹   RŒ   R   R   R¶   R   R   R/   Rö   R÷   RÐ   RÕ   Rè   Ré   R“   R   R½   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR—     s   						
	c           B  sk   e  Z d  Z d „  Z e j d
 d „ ƒ Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d	 „  Z RS(   s   
    Wedge shaped patch.
    c         C  s   d |  j  |  j f S(   Ns   Wedge(%g,%g)(   t   theta1t   theta2(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   R  s    c         K  s\   t  j |  | � | |  _ | | |  _ |  _ | | |  _ |  _ t j ƒ  |  _	 |  j
 ƒ  d S(   s(  
        Draw a wedge centered at *x*, *y* center with radius *r* that
        sweeps *theta1* to *theta2* (in degrees).  If *width* is given,
        then a partial wedge is drawn from inner radius *r* - *width*
        to outer radius *r*.

        Valid kwargs are:

        %(Patch)s
        N(   R   R   t   centerRª   R¾   Rý   Rþ   R    R!   t   _patch_transformt   _recompute_path(   R   Rÿ   Rª   Rý   Rþ   R¾   R-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   U  s    	c   	      C  s¥  t  |  j |  j d ƒ d k r8 d \ } } t j } n |  j |  j } } t j } t j | | ƒ } |  j d  k	 r| j	 } | j	 d  d  d … t
 |  j |  j ƒ |  j } t j | | | d d  d  … f d g ƒ } t j | j | j | t j g ƒ } | | t | j ƒ <nX t j | j	 d | j	 d d  d  … f d g g ƒ } t j | j | | t j g g ƒ } | |  j 9} | t j |  j ƒ 7} t | | ƒ |  _ d  S(	   Nih  gê-�™—q=i    iÿÿÿÿ(   i    ih  (   i    i    (   i    i    (   i    i    (   t   absRþ   Rý   R   t   MOVETOt   LINETOt   arcR¾   R   Ró   Ra   Rª   Rø   t   vstackt   hstackt   codest	   CLOSEPOLYR#   Rù   Rÿ   Râ   (	   R   Rý   Rþ   t	   connectorR  t   v1t   v2t   vR`   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  h  s"     		1+$4$c         C  s   d  |  _ | |  _ d  S(   N(   R   Râ   Rÿ   (   R   Rÿ   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_center†  s    	c         C  s   d  |  _ | |  _ d  S(   N(   R   Râ   R<   (   R   R<   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_radiusŠ  s    	c         C  s   d  |  _ | |  _ d  S(   N(   R   Râ   Rý   (   R   Rý   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_theta1Ž  s    	c         C  s   d  |  _ | |  _ d  S(   N(   R   Râ   Rþ   (   R   Rþ   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_theta2’  s    	c         C  s   d  |  _ | |  _ d  S(   N(   R   Râ   R¾   (   R   R¾   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÖ   –  s    	c         C  s#   |  j  d  k r |  j ƒ  n  |  j  S(   N(   Râ   R   R  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   š  s    N(   RŠ   R‹   RŒ   R   R   R¶   R   R   R  R  R  R  R  RÖ   R/   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR˜   N  s   							c        
   B  s˜   e  Z d  Z d „  Z e d d g d d g d d g d d g d d g d d g d d g d d g g d	 e ƒZ e j d d
 „ ƒ Z	 d „  Z
 d „  Z RS(   s   
    An arrow patch.
    c         C  s   d S(   Ns   Arrow()(    (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ¥  s    g        gš™™™™™¹?gš™™™™™¹¿gš™™™™™é?g333333Ó¿g      ð?g333333Ó?Rõ   c         K  sÄ   t  j |  | � t j | d | d ƒ p. d } t | ƒ | } t | ƒ | }	 t j ƒ  j | | ƒ }
 t j j | |	 |	 | d d ƒ } t j ƒ  j	 | | ƒ } |
 | | } | j
 ƒ  |  _ d S(   sÆ   
        Draws an arrow, starting at (*x*, *y*), direction and length
        given by (*dx*, *dy*) the width of the arrow is scaled by *width*.

        Valid kwargs are:
        %(Patch)s
        i   i   g        N(   R   R   Rø   t   sqrtRa   R    R¤   Ræ   t   from_valuesR°   t   frozenR   (   R   R9   R:   t   dxt   dyR¾   R-   t   Lt   cxt   sxt   trans1t   trans2t   trans3R1   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ¯  s    	!"c         C  s   |  j  S(   N(   Râ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   Ã  s    c         C  s   |  j  S(   N(   R   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRN   Æ  s    (   RŠ   R‹   RŒ   R   R   R   Râ   R   R¶   R   R/   RN   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR™   ¡  s   			c        	   B  s>   e  Z d  Z d „  Z e j d e d d d d e d „ ƒ Z RS(   sP   
    Like Arrow, but lets you set head width and head height independently.
    c         C  s   d S(   Ns   FancyArrow()(    (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ï  s    gü©ñÒMbP?t   fulli    c         K  s+  | d k r d | } n  | d k r2 d | } n  t j | d | d ƒ } | r\ | } n
 | | } | su g  } n�| | |
 | f \ } } } } t j d d g | | d g | d | | d g | | d g | d g g ƒ } | s| | d g 7} n  | r | | d d g 7} n  |	 d k r5| } nj | d d	 g } |	 d
 k rZ| } nE |	 d k r�t j | d	  | d d d	 … g ƒ } n t d |	 ƒ ‚ t | ƒ | } t | ƒ | } t j | | g | | g g ƒ } t j | | ƒ | | | | f } t j	 |  t
 t | ƒ d t | �d S(   sþ  
        Constructor arguments
          *width*: float (default: 0.001)
            width of full arrow tail

          *length_includes_head*: [True | False] (default: False)
            True if head is to be counted in calculating the length.

          *head_width*: float or None (default: 3*width)
            total width of the full arrow head

          *head_length*: float or None (default: 1.5 * head_width)
            length of arrow head

          *shape*: ['full', 'left', 'right'] (default: 'full')
            draw the left-half, right-half, or full arrow

          *overhang*: float (default: 0)
            fraction that the arrow is swept back (0 overhang means
            triangular shape). Can be negative or greater than one.

          *head_starts_at_zero*: [True | False] (default: False)
            if True, the head starts being drawn at coordinate 0
            instead of ending at coordinate 0.

        Other valid kwargs (inherited from :class:`Patch`) are:
        %(Patch)s

        i   g      ø?i   g        g       @i   i    t   leftiÿÿÿÿt   rightR  iþÿÿÿNs   Got unknown shape: %sRõ   (   R   Rø   R  t   arrayRû   t
   ValueErrorRa   t   dotR—   R   t   mapRò   R   (   R   R9   R:   R  R  R¾   t   length_includes_headt
   head_widtht   head_lengtht   shapet   overhangt   head_starts_at_zeroR-   t   distancet   lengtht   vertst   hwt   hlt   hsRe   t   left_half_arrowt   coordst   right_half_arrowR  R  t   M(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ò  sF    !	
				"$N(	   RŠ   R‹   RŒ   R   R   R¶   RË   R   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRš   Ê  s   	c           B  sM   e  Z d  Z d „  Z e j d d d d „ ƒ Z d „  Z d „  Z d „  Z	 RS(	   s“   
    Yet another arrow class.

    This is an arrow that is defined in display space and has a tip at
    *x1*, *y1* and a base at *x2*, *y2*.
    c         C  s   d S(   Ns	   YAArrow()(    (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   2  s    i   gš™™™™™¹?i   c         K  sJ   | |  _  | |  _ | |  _ | |  _ | |  _ t j |  | � | |  _ d S(   s  
        Constructor arguments:

        *xytip*
          (*x*, *y*) location of arrow tip

        *xybase*
          (*x*, *y*) location the arrow base mid point

        *figure*
          The :class:`~matplotlib.figure.Figure` instance
          (fig.dpi)

        *width*
          The width of the arrow in points

        *frac*
          The fraction of the arrow length occupied by the head

        *headwidth*
          The width of the base of the arrow head in points

        Valid kwargs are:
        %(Patch)s

        N(   t   xytipt   xybaseR¾   t   fract	   headwidthR   R   t   figure(   R   R8  R4  R5  R¾   R6  R7  R-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   5  s    					c      	   C  s©  |  j  \ } } |  j \ } } |  j |  j j d d } |  j |  j j d d } |  j | | | | | ƒ \ } } }	 }
 t j | | | | ƒ } t j	 | | d | | d ƒ } | |  j
 | t j | ƒ } | |  j
 | t j | ƒ } |  j | | | | | ƒ \ } } } } |  j | | | | | ƒ \ } } } } |  j | |	 | | | | | | g ƒ } |  j | |
 | | | | | | g ƒ } t t | | ƒ d t ƒS(   Ng      R@g       @Rõ   (   R4  R5  R¾   R8  t   dpiR7  t	   getpointst   matht   atan2R  R6  t   cost   sinRÂ   RÃ   R   t   zipR   (   R   t   x1t   y1t   x2t   y2t   k1t   k2t   xb1t   yb1t   xb2t   yb2t   thetaRª   t   xmt   ymt   xc1t   yc1t   xc2t   yc2t   xd1t   yd1t   xd2t   yd2t   xst   ys(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   \  s    '#''''c         C  s
   t  j ƒ  S(   N(   R    R!   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRN   t  s    c         C  s[  t  t | | | | | f ƒ \ } } } } } | | d k rU | | | | | | f S| | d k r} | | | | | | f S| | | | } d | } d } d | }	 | d | d | d d | d }
 |	 t j |	 d d | |
 ƒ d | } | | | | } |	 t j |	 d d | |
 ƒ d | } | | | | } | | | | f S(   s  
        For line segment defined by (*x1*, *y1*) and (*x2*, *y2*)
        return the points on the line that is perpendicular to the
        line and intersects (*x2*, *y2*) and the distance from (*x2*,
        *y2*) of the returned points is *k*.
        i    g      ð¿i   iþÿÿÿg       @g      ð?i   (   R#  Ra   R;  R  (   R   R@  RA  RB  RC  t   kt   mt   pmR¬   Rj   R`   t   y3at   x3at   y3bt   x3b(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR:  w  s    -

&,,(
   RŠ   R‹   RŒ   R   R   R¶   R   R/   RN   R:  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR›   +  s   	%		c           B  s/   e  Z d  Z d „  Z e j d d d „ ƒ Z RS(   s4   
    A polygon-approximation of a circle patch.
    c         C  s   d |  j  S(   Ns   CirclePolygon(%d,%d)(   Rÿ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   —  s    i   i   c         K  s#   t  j |  | | | d d | �d S(   s/  
        Create a circle at *xy* = (*x*, *y*) with given *radius*.
        This circle is approximated by a regular polygon with
        *resolution* sides.  For a smoother circle drawn with splines,
        see :class:`~matplotlib.patches.Circle`.

        Valid kwargs are:
        %(Patch)s

        Rå   i    N(   R–   R   (   R   R½   R<   t
   resolutionR-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   š  s
    (   RŠ   R‹   RŒ   R   R   R¶   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRœ   “  s
   	c           B  sP   e  Z d  Z d „  Z e j d d „ ƒ Z d „  Z d „  Z d „  Z	 d „  Z
 RS(   s   
    A scale-free ellipse.
    c         C  s(   d |  j  d |  j  d |  j |  j f S(   Ns   Ellipse(%s,%s;%sx%s)i    i   (   Rÿ   R¾   R¿   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ³  s    g        c         K  sW   t  j |  | � | |  _ | | |  _ |  _ | |  _ t j ƒ  |  _ t	 j
 ƒ  |  _ d S(   s*  
        *xy*
          center of ellipse

        *width*
          total length (diameter) of horizontal axis

        *height*
          total length (diameter) of vertical axis

        *angle*
          rotation in degrees (anti-clockwise)

        Valid kwargs are:
        %(Patch)s
        N(   R   R   Rÿ   R¾   R¿   RÀ   R   t   unit_circleRâ   R    R!   R   (   R   R½   R¾   R¿   RÀ   R-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ·  s    		c         C  sŒ   |  j  |  j d ƒ |  j |  j d ƒ f } |  j  |  j ƒ } |  j |  j ƒ } t j ƒ  j | d | d ƒ j |  j	 ƒ j
 | Œ  |  _ d S(   s  NOTE: This cannot be called until after this has been added
                 to an Axes, otherwise unit conversion will fail. This
                 maxes it very important to call the accessor method and
                 not directly access the transformation member variable.
        i    i   g      à?N(   RÂ   Rÿ   RÃ   R¾   R¿   R    R¤   Ræ   t
   rotate_degRÀ   R°   R   (   R   Rÿ   R¾   R¿   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _recompute_transformÒ  s    c         C  s   |  j  S(   s6   
        Return the vertices of the rectangle
        (   Râ   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   á  s    c         C  s   |  j  ƒ  |  j S(   N(   Ra  R   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRN   ç  s    
c         C  sq   | j  d  k s | j d  k r( t i  f S|  j ƒ  j ƒ  j | j  | j f ƒ \ } } | | | | d k i  f S(   Ng      ð?(   R9   R   R:   RË   R.   RÌ   RÍ   (   R   t   evR9   R:   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR>   ë  s    
-(   RŠ   R‹   RŒ   R   R   R¶   R   Ra  R/   RN   R>   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR�   ¯  s   				c           B  sM   e  Z d  Z d „  Z e j d d „ ƒ Z d „  Z d „  Z e	 e e ƒ Z
 RS(   s   
    A circle patch.
    c         C  s"   d |  j  d |  j  d |  j f S(   Ns   Circle((%g,%g),r=%g)i    i   (   Rÿ   R<   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ö  s    
i   c         K  s.   | |  _  t j |  | | d | d | � d S(   s7  
        Create true circle at center *xy* = (*x*, *y*) with given
        *radius*.  Unlike :class:`~matplotlib.patches.CirclePolygon`
        which is a polygonal approximation, this uses BÃ©zier splines
        and is much closer to a scale-free circle.

        Valid kwargs are:
        %(Patch)s

        i   N(   R<   R�   R   (   R   R½   R<   R-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   û  s    	c         C  s   d | |  _  |  _ d S(   sF   
        Set the radius of the circle

        ACCEPTS: float
        i   N(   R¾   R¿   (   R   R<   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  
  s    c         C  s   |  j  d S(   s   return the radius of the circleg       @(   R¾   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   get_radius  s    (   RŠ   R‹   RŒ   R   R   R¶   R   R  Rc  R“   R<   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR•   ò  s   			c           B  sA   e  Z d  Z d „  Z e j d d d d „ ƒ Z e d „  ƒ Z RS(   ss  
    An elliptical arc.  Because it performs various optimizations, it
    can not be filled.

    The arc must be used in an :class:`~matplotlib.axes.Axes`
    instance---it can not be added directly to a
    :class:`~matplotlib.figure.Figure`---because it is optimized to
    only render the segments that are inside the axes bounding box
    with high resolution.
    c         C  s(   d |  j  d |  j  d |  j |  j f S(   Ns   Arc(%s,%s;%sx%s)i    i   (   Rÿ   R¾   R¿   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   $  s    g        g     €v@c   	      K  st   | j  d t ƒ } | r' t d ƒ ‚ n  t j |  | | | | | � | |  _ | |  _ t j |  j |  j ƒ |  _	 d S(   s  
        The following args are supported:

        *xy*
          center of ellipse

        *width*
          length of horizontal axis

        *height*
          length of vertical axis

        *angle*
          rotation in degrees (anti-clockwise)

        *theta1*
          starting angle of the arc in degrees

        *theta2*
          ending angle of the arc in degrees

        If *theta1* and *theta2* are not provided, the arc will form a
        complete ellipse.

        Valid kwargs are:

        %(Patch)s
        R,   s   Arc objects can not be filledN(
   t
   setdefaultRË   R!  R�   R   Rý   Rþ   R   R  Râ   (	   R   R½   R¾   R¿   RÀ   Rý   Rþ   R-   R,   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   (  s    		c           s´  t  |  d ƒ s t d ƒ ‚ n  |  j ƒ  |  j |  j ƒ } |  j |  j ƒ } |  j ƒ  j | | f ƒ \ } } d } | | k  r› | | k  r› t	 j
 |  | ƒ Sd „  ‰  ‡  f d †  } t j ƒ  } t j |  j j ƒ |  j ƒ  j ƒ  } | j | ƒ } t j } | d }	 d	 | }
 | d	 } |  j } |  j } i  } xÀ t | j d
  | j d ƒ D]¡ \ } } | \ } } | \ } } xz | | | | | ƒ D]c \ } } t j | ƒ } | d k  r¾|	 | } n  | |
 9} | | k rŠ| | k  rŠd | | <qŠqŠWqPW| j ƒ  } | j ƒ  | j | ƒ | } | | } | j t j | ƒ t j  | ƒ f ƒ } |  j! } xL | D]D } | r—t j" | | d ƒ t	 j
 |  | ƒ t# } n t$ } | } q_W| |  _! d S(   sÙ  
        Ellipses are normally drawn using an approximation that uses
        eight cubic bezier splines.  The error of this approximation
        is 1.89818e-6, according to this unverified source:

          Lancaster, Don.  Approximating a Circle or an Ellipse Using
          Four Bezier Cubic Splines.

          http://www.tinaja.com/glib/ellipse4.pdf

        There is a use case where very large ellipses must be drawn
        with very high accuracy, and it is too expensive to render the
        entire ellipse with enough segments (either splines or line
        segments).  Therefore, in the case where either radius of the
        ellipse is large enough that the error of the spline
        approximation will be visible (greater than one pixel offset
        from the ideal), a different technique is used.

        In that case, only the visible parts of the ellipse are drawn,
        with each visible arc using a fixed number of spline segments
        (8).  The algorithm proceeds as follows:

          1. The points where the ellipse intersects the axes bounding
             box are located.  (This is done be performing an inverse
             transformation on the axes bbox such that it is relative
             to the unit circle -- this makes the intersection
             calculation much easier than doing rotated ellipse
             intersection directly).

             This uses the "line intersecting a circle" algorithm
             from:

               Vince, John.  Geometry for Computer Graphics: Formulae,
               Examples & Proofs.  London: Springer-Verlag, 2005.

          2. The angles of each of the intersection points are
             calculated.

          3. Proceeding counterclockwise starting in the positive
             x-direction, each of the visible arc-segments between the
             pairs of vertices are drawn using the bezier arc
             approximation technique implemented in
             :meth:`matplotlib.path.Path.arc`.
        t   axess'   Arcs can only be used in Axes instancesg      ð?gÿéJûžØ¿>g      à?c         s  s  | |  } | | } | | | | } |  | | | } | | } | | }	 |	 d k rƒ | | | }
 | | | } |
 | f Vn— |	 d k r| d k  r¤ d } n d } t  j |	 ƒ } x^ d D]S } | | | | | | | }
 | | | t  j | ƒ | | } |
 | f VqÀ Wn  d  S(   Ng        g      ð¿g      ð?(   g      ð?g      ð¿(   Rø   R  R  (   t   x0t   y0R@  RA  R  R  t   dr2t   Dt   D2t   discrimR9   R:   t   sign_dyt   sqrt_discrimt   sign(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   iter_circle_intersect_on_line�  s&    



	$c         3  sè   d } | |  k  r" | |  } } n |  | } } | | k  rK | | } } n | | } } | | 8} | | 8} | | 7} | | 7} xa ˆ  |  | | | ƒ D]J \ }	 }
 |	 | k r– |	 | k r– |
 | k r– |
 | k r– |	 |
 f Vq– q– Wd  S(   Ng•Ö&è.>(    (   Rf  Rg  R@  RA  t   epsilont   x0et   x1et   y0et   y1eR9   R:   (   Ro  (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt!   iter_circle_intersect_on_line_segª  s    



"0g       @g     €f@iÿÿÿÿi   i    i   Ngø\!ÛÈ Agø\!ÛÈA(%   t   hasattrt   RuntimeErrorRa  RÂ   R¾   RÃ   R¿   R.   RÍ   R   R‡   R   RÁ   R    RÇ   Re  RÈ   RÌ   t   transformedRø   t   piRý   Rþ   R?  Ró   t   arccosR   t   keyst   sortt   appendR8   R=  R>  Râ   R  RË   R   (   R   R€   R¾   R¿   t	   inv_errorRu  t   box_patht   box_path_transformt   PIt   TWOPIt   RAD2DEGt   DEG2RADRý   Rþ   t   thetast   p0t   p1Rf  Rg  R@  RA  R9   R:   RJ  t
   last_thetat
   theta1_radR=   t   path_original(    (   Ro  sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR‡   R  sb    .
		


		*"


		
(	   RŠ   R‹   RŒ   R   R   R¶   R   R   R‡   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRž     s   
	(c      	   C  sû   | d k r i  } n  | j ƒ  } | j d d ƒ } | j | ƒ } |  j | ƒ } | j \ } } } }	 | | d 8} | | d 8} | | 7} |	 | 7}	 t d | | f d | d |	 d | ƒ }
 |
 j t j	 ƒ  ƒ |
 j
 t ƒ |
 j | ƒ |
 j | ƒ d S(	   sd  
    This is a debug function to draw a rectangle around the bounding
    box returned by
    :meth:`~matplotlib.artist.Artist.get_window_extent` of an artist,
    to test whether the artist is returning the correct bbox.

    *props* is a dict of rectangle props with the additional property
    'pad' that sets the padding around the bbox in points.
    t   padi   g       @R½   R¾   R¿   R,   N(   R   t   copyt   popR®   R‰   t   boundsR”   RF   R    R!   t   set_clip_onRË   R©   R‡   (   R   R€   R¡   R,   R‹  RÈ   RÚ   Rj   Rd   R×   Rª   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   bbox_artistð  s&    
	

	RW  c   	      C  s|   |  j  \ } } } } t d | | f d | d | d | d t ƒ } | d k	 r^ | j | ƒ n  | j t ƒ | j | ƒ d S(   sâ   
    This is a debug function to draw a rectangle around the bounding
    box returned by
    :meth:`~matplotlib.artist.Artist.get_window_extent` of an artist,
    to test whether the artist is returning the correct bbox.
    R½   R¾   R¿   R%   R,   N(   RŽ  R”   RË   R   RF   R�  R‡   (	   RÈ   R€   R'   R1   RÚ   Rj   Rd   R×   Rª   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt	   draw_bbox  s    	i   c      	   C  sÏ  | r d | } n d } g  |  d D] } g  ^ q$ } x; |  D]3 } x* t  | | ƒ D] \ } } | j | ƒ qS Wq= Wg  | D]+ } t g  | D] } t | ƒ ^ q‹ ƒ ^ q{ } g  } | d j g  | D] }	 d |	 ^ qÂ ƒ }
 | j d ƒ | j |
 ƒ | j | d j g  t  |  d | ƒ D] \ } }	 | j |	 ƒ ^ qƒ ƒ | j |
 ƒ | j g  |  d D]D } | d j g  t  | | ƒ D] \ } }	 | j |	 ƒ ^ q|ƒ ^ q]ƒ | j |
 ƒ | j d ƒ d j | ƒ S(   sR   
    Given the list of list of strings, return a string of REST table format.
    t    t    i    s      t   =i   s   
(   R?  R}  t   maxR#   t   joint   ljustt   extend(   t   _tablet   leadingspaceR‹  t   cellt   columnst   rowt   columnt   col_lent   linest   clt   table_formatstr(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _pprint_table%  s(    8*7	Sc         C  s"  g  g  g  } } } d d l  } d d d g g } xã t |  j ƒ  ƒ D]Ï \ } } | j | j ƒ \ } }	 }
 } | rª g  t | d | ƒ D] \ } } | | f ^ q‰ } n d } | d k rÅ d } n2 d j g  | D] \ } } d	 | | f ^ qÒ ƒ } | j | j	 d
 | | g ƒ qE Wt
 | ƒ S(   sÀ   
    A helper function for the _Style class.  Given the dictionary of
    (stylename : styleclass), return a formatted string listing all the
    styles. Used to update the documentation.
    iÿÿÿÿNt   Classt   Namet   Attrsi   R   t   ,s   %s=%ss   ``%s``(   t   inspectt   sortedt   itemst
   getargspecR   R?  R   R–  R}  RŠ   R£  (   t   _stylest   namest   attrsst   clssR¨  R™  t   namet   clsRÙ   t   varargst   varkwt   defaultst   argnamet
   argdefaultt   argstrt   ant   av(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _pprint_stylesJ  s    2		)!t   _Stylec           B  sD   e  Z d  Z d „  Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z RS(   s®   
    A base class for the Styles. It is meant to be a container class,
    where actual styles are declared as subclass of it, and it
    provides some helper functions.
    c         K  sö   | j  d d ƒ j d ƒ } | d j ƒ  } y |  j | } Wn! t k
 r_ t d | ƒ ‚ n Xy[ g  | d D] } | j d ƒ ^ qn } t g  | D] \ } }	 | t |	 ƒ f ^ q“ ƒ }
 Wn! t k
 rÞ t d | ƒ ‚ n X|
 j | ƒ | |
 �  S(	   sP   
        return the instance of the subclass with the given style name.
        R’  R“  R§  i    s   Unknown style : %si   R”  s   Incorrect style argument : %s(	   t   replaceR
   t   lowert   _style_listt   KeyErrorR!  t   dictRa   R©   (   R   t	   stylenamet   kwt   _listt   _namet   _clst   cst
   _args_pairRW  R  t   _args(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   __new__q  s    &5c         C  s   |  j  S(   sP   
        A class method which returns a dictionary of available styles.
        (   R¾  (   t   klass(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   get_styles‰  s    c         C  s   t  |  j ƒ S(   sP   
        A class method which returns a string of the available styles.
        (   Rº  R¾  (   RÊ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   pprint_styles�  s    c         C  s?   t  | |  j ƒ s. t d | |  j f ƒ ‚ n  | |  j | <d S(   s'   
        Register a new style.
        s   %s must be a subclass of %sN(   t
   issubclasst   _BaseR!  R¾  (   RÊ  R°  t   style(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   register—  s    	(   RŠ   R‹   RŒ   RÉ  t   classmethodRË  RÌ  RÐ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR»  k  s
   	t   BoxStylec           B  s3  e  Z d  Z i  Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ e e d <d e f d „  ƒ  YZ e e d <d	 e f d
 „  ƒ  YZ e e d <d e f d „  ƒ  YZ	 e	 e d <d e f d „  ƒ  YZ
 e
 e d <d e f d „  ƒ  YZ e e d <d e f d „  ƒ  YZ e e d <e r1e j e ƒ i e e ƒ d 6Z n  RS(   sÀ  
    :class:`BoxStyle` is a container class which defines several
    boxstyle classes, which are used for :class:`FancyBoxPatch`.

    A style object can be created as::

           BoxStyle.Round(pad=0.2)

    or::

           BoxStyle("Round", pad=0.2)

    or::

           BoxStyle("Round, pad=0.2")

    Following boxstyle classes are defined.

    %(AvailableBoxstyles)s

    An instance of any boxstyle class is an callable object,
    whose call signature is::

       __call__(self, x0, y0, width, height, mutation_size, aspect_ratio=1.)

    and returns a :class:`Path` instance. *x0*, *y0*, *width* and
    *height* specify the location and size of the box to be
    drawn. *mutation_scale* determines the overall size of the
    mutation (by which I mean the transformation of the rectangle to
    the fancy box).  *mutation_aspect* determines the aspect-ratio of
    the mutation.

    .. plot:: mpl_examples/pylab_examples/fancybox_demo2.py
    RÎ  c           B  s5   e  Z d  Z d „  Z d „  Z d d „ Z d „  Z RS(   s_  
        :class:`BBoxTransmuterBase` and its derivatives are used to make a
        fancy box around a given rectangle. The :meth:`__call__` method
        returns the :class:`~matplotlib.path.Path` of the fancy box. This
        class is not an artist and actual drawing of the fancy box is done
        by the :class:`FancyBboxPatch` class.
        c         C  s   t  t j |  ƒ j ƒ  d S(   s(   
            initializtion.
            N(   t   superRÒ  RÎ  R   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ö  s    c         C  s   t  d ƒ ‚ d S(   s‚  
            The transmute method is a very core of the
            :class:`BboxTransmuter` class and must be overriden in the
            subclasses. It receives the location and size of the
            rectangle, and the mutation_size, with which the amount of
            padding and etc. will be scaled. It returns a
            :class:`~matplotlib.path.Path` instance.
            s   Derived must overrideN(   Rˆ   (   R   Rf  Rg  R¾   R¿   t   mutation_size(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt	   transmuteÜ  s    	g      ð?c   
      C  s£   | d k	 r† | | | | } } |  j | | | | | ƒ } | j | j } }	 | d d … d f | | d d … d f <t | |	 ƒ S|  j | | | | | ƒ Sd S(   sH  
            Given the location and size of the box, return the path of
            the box around it.

              - *x0*, *y0*, *width*, *height* : location and size of the box
              - *mutation_size* : a reference scale for the mutation.
              - *aspect_ratio* : aspect-ration for the mutation.
            Ni   (   R   RÕ  Ró   R  R   (
   R   Rf  Rg  R¾   R¿   RÔ  t   aspect_ratioR2   Ró   R  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   __call__ç  s    *c         C  s1   d d  l  j } | j ƒ  t |  j j f |  j f S(   Niÿÿÿÿ(   t   matplotlib.cbookt   cbookt   _NestedClassGetterRÒ  R	   RŠ   t   __dict__(   R   RÙ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   __reduce__   s    	(   RŠ   R‹   RŒ   R   RÕ  R×  RÜ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÎ  É  s
   		t   Squarec           B  s#   e  Z d  Z d d „ Z d „  Z RS(   s&   
        A simple square box.
        g333333Ó?c         C  s#   | |  _  t t j |  ƒ j ƒ  d S(   sB   
             *pad*
                amount of padding
            N(   R‹  RÓ  RÒ  RÝ  R   (   R   R‹  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    	c         C  sÍ   | |  j  } | d | | d | } } | | | | } } | | | | } } | | f | | f | | f | | f | | f | | f g }	 t j t j t j t j t j t j g }
 t |	 |
 ƒ } | S(   Ng       @(   R‹  R   R  R  R	  (   R   Rf  Rg  R¾   R¿   RÔ  R‹  R@  RA  t   cpt   comR2   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ    s    $(   RŠ   R‹   RŒ   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÝ  	  s   	t   squaret   LArrowc           B  s#   e  Z d  Z d d „ Z d „  Z RS(   s"   
        (left) Arrow Box
        g333333Ó?c         C  s#   | |  _  t t j |  ƒ j ƒ  d  S(   N(   R‹  RÓ  RÒ  Rá  R   (   R   R‹  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   9  s    	c      
   C  sH  | |  j  } | d | | d | } } | | | | } } | | | | } } | | d }	 |	 d }
 | | d } | |
 | f | | f | | f | |
 | f | |
 | |
 f | |	 | |	 f | |
 | |
 f | |
 | f | |
 | f g	 } t j t j t j t j t j t j t j t j t j g	 } t | | ƒ } | S(   Ng       @g      à?gffffffö?(   R‹  R   R  R  R	  (   R   Rf  Rg  R¾   R¿   RÔ  R‹  R@  RA  R  t   dxxRÞ  Rß  R2   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  =  s"    
," (   RŠ   R‹   RŒ   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRá  4  s   t   larrowt   RArrowc           B  s#   e  Z d  Z d d „ Z d „  Z RS(   s#   
        (right) Arrow Box
        g333333Ó?c         C  s   t  t j |  ƒ j | ƒ d  S(   N(   RÓ  RÒ  Rä  R   (   R   R‹  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   b  s    c         C  s]   t  j j |  | | | | | ƒ } d | | | j d  d  … d f | j d  d  … d f <| S(   Ni   i    (   RÒ  Rá  RÕ  Ró   (   R   Rf  Rg  R¾   R¿   RÔ  t   p(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  f  s    8(   RŠ   R‹   RŒ   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRä  ]  s   t   rarrowt   Roundc           B  s&   e  Z d  Z d d d „ Z d „  Z RS(   s+   
        A box with round corners.
        g333333Ó?c         C  s,   | |  _  | |  _ t t j |  ƒ j ƒ  d S(   s”   
            *pad*
              amount of padding

            *rounding_size*
              rounding radius of corners. *pad* if None
            N(   R‹  t   rounding_sizeRÓ  RÒ  Rç  R   (   R   R‹  Rè  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   v  s    		c         C  sŒ  | |  j  } |  j r& | |  j } n | } | d | | d | } } | | | | } } | | | | } }	 | | | f | | | f | | f | | | f | |	 | f | |	 f | | |	 f | | |	 f | |	 f | |	 | f | | | f | | f | | | f | | | f g }
 t j t j t j t j t j t j t j t j t j t j t j t j t j t j g } t |
 | ƒ } | S(   Ng       @(   R‹  Rè  R   R  R  t   CURVE3R	  (   R   Rf  Rg  R¾   R¿   RÔ  R‹  t   drR@  RA  RÞ  Rß  R2   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  ‚  s<    	N(   RŠ   R‹   RŒ   R   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRç  q  s   t   roundt   Round4c           B  s&   e  Z d  Z d d d „ Z d „  Z RS(   s/   
        Another box with round edges.
        g333333Ó?c         C  s,   | |  _  | |  _ t t j |  ƒ j ƒ  d S(   s�   
            *pad*
              amount of padding

            *rounding_size*
              rounding size of edges. *pad* if None
            N(   R‹  Rè  RÓ  RÒ  Rì  R   (   R   R‹  Rè  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ¶  s    			c         C  sÀ  | |  j  } |  j r& | |  j } n
 | d } | d | d | | d | d | } } | | | | | | } } | | | | } }	 | | f | | | | f | | | | f | | f | | | | f | | |	 | f | |	 f | | |	 | f | | |	 | f | |	 f | | |	 | f | | | | f | | f | | f g }
 t j t j t j t j t j t j t j t j t j t j t j t j t j t j g } t |
 | ƒ } | S(   Ng       @i   (   R‹  Rè  R   R  t   CURVE4R	  (   R   Rf  Rg  R¾   R¿   RÔ  R‹  Rê  R@  RA  RÞ  Rß  R2   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  Ã  s,    	
	++++N(   RŠ   R‹   RŒ   R   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRì  ±  s   t   round4t   Sawtoothc           B  s/   e  Z d  Z d d d „ Z d „  Z d „  Z RS(   s!   
        A sawtooth box.
        g333333Ó?c         C  s,   | |  _  | |  _ t t j |  ƒ j ƒ  d S(   sŠ   
            *pad*
              amount of padding

            *tooth_size*
              size of the sawtooth. pad* if None
            N(   R‹  t
   tooth_sizeRÓ  RÒ  Rï  R   (   R   R‹  Rð  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   í  s    		c         C  s!  | |  j  } |  j d  k r0 |  j  d | } n |  j | } | d } | d | | | d | | } } t t | | | d ƒ ƒ d }	 | | |	 }
 t t | | | d ƒ ƒ d } | | | } | | | | | | } } | | | | } } | g g  t |	 d ƒ D] } | | |
 d | ^ q| | g } | g | | | | | | g |	 | | g } | g | | | | | | g |	 | | g } | g g  t | d ƒ D] } | | | d | ^ qº| | g } | g g  t |	 d ƒ D] } | | |
 d | ^ qÿ| | g } | g | | | | | | g |	 | | g } | g | | | | | | g | | | g } | g g  t | d ƒ D] } | | | d | ^ q¤| | g } t | | ƒ t | | ƒ t | | ƒ t | | ƒ | d | d f g } | S(   Ng      à?g       @i   i    (   R‹  Rð  R   t   intRë  t   rangeR?  (   R   Rf  Rg  R¾   R¿   RÔ  R‹  Rð  t   tooth_size2t   dsx_nt   dsxt   dsy_nt   dsyR@  RA  t   it   bottom_saw_xt   bottom_saw_yt   right_saw_xt   right_saw_yt	   top_saw_xt	   top_saw_yt
   left_saw_xt
   left_saw_yt   saw_vertices(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_sawtooth_verticesù  s@    
""7""77""73c         C  s+   |  j  | | | | | ƒ } t | ƒ } | S(   N(   R  R   (   R   Rf  Rg  R¾   R¿   RÔ  R  R2   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  L  s    N(   RŠ   R‹   RŒ   R   R   R  RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRï  è  s   	St   sawtootht
   Roundtoothc           B  s&   e  Z d  Z d d d „ Z d „  Z RS(   s&   
        A roundtooth(?) box.
        g333333Ó?c         C  s    t  t j |  ƒ j | | ƒ d S(   sŠ   
            *pad*
              amount of padding

            *tooth_size*
              size of the sawtooth. pad* if None
            N(   RÓ  RÒ  R  R   (   R   R‹  Rð  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Z  s    c   	      C  s\   |  j  | | | | | ƒ } t j g t j t j g t | ƒ d d } t | | ƒ } | S(   Ni   i   (   R  R   R  Ré  R#   (	   R   Rf  Rg  R¾   R¿   RÔ  R  RÞ  R2   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  d  s    	N(   RŠ   R‹   RŒ   R   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  U  s   
t
   roundtootht   AvailableBoxstyles(   RŠ   R‹   RŒ   R¾  t   objectRÎ  RÝ  Rá  Rä  Rç  Rì  Rï  R  RÙ  t   dedentRº  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÒ  £  s(   "@)
'

>
5
k

R  c           B  sÚ   e  Z d  Z d „  Z e j d d d d d „ ƒ Z e j d d „ ƒ Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s}  
    Draw a fancy box around a rectangle with lower left at *xy*=(*x*,
    *y*) with specified width and height.

    :class:`FancyBboxPatch` class is similar to :class:`Rectangle`
    class, but it draws a fancy box around the rectangle. The
    transformation of the rectangle box to the fancy box is delegated
    to the :class:`BoxTransmuterBase` and its derived classes.

    c         C  s*   |  j  j d |  j |  j |  j |  j f S(   Ns   FancyBboxPatch(%g,%g;%gx%g)(   R	   RŠ   R·   R¸   R¹   Rº   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   †  s    	Rë  g      ð?c   	      K  s’   t  j |  | � | d |  _ | d |  _ | |  _ | |  _ | d k ro | d k rc t d ƒ ‚ n  | |  _ n |  j	 | ƒ | |  _
 | |  _ d S(   sº  
        *xy* = lower left corner

        *width*, *height*

        *boxstyle* determines what kind of fancy box will be drawn. It
        can be a string of the style name with a comma separated
        attribute, or an instance of :class:`BoxStyle`. Following box
        styles are available.

        %(AvailableBoxstyles)s

        *mutation_scale* : a value with which attributes of boxstyle
        (e.g., pad) will be scaled. default=1.

        *mutation_aspect* : The height of the rectangle will be
        squeezed by this value before the mutation and the mutated
        box will be stretched by the inverse of it. default=None.

        Valid kwargs are:
        %(Patch)s
        i    i   t   customs7   bbox_transmuter argument is needed with custom boxstyleN(   R   R   R·   R¸   R¹   Rº   R   R!  t   _bbox_transmutert   set_boxstylet   _mutation_scalet   _mutation_aspect(	   R   R½   R¾   R¿   t   boxstylet   bbox_transmutert   mutation_scalet   mutation_aspectR-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ‹  s    			c         K  sb   | d k r t j ƒ  St | t j ƒ r4 | |  _ n* t | ƒ rL | |  _ n t | | � |  _ d S(   sÕ  
        Set the box style.

        *boxstyle* can be a string with boxstyle name with optional
        comma-separated attributes. Alternatively, the attrs can
        be provided as keywords::

            set_boxstyle("round,pad=0.2")
            set_boxstyle("round", pad=0.2)

        Old attrs simply are forgotten.

        Without argument (or with *boxstyle* = None), it returns
        available box styles.

        ACCEPTS: %(AvailableBoxstyles)s

        N(   R   RÒ  RÌ  t
   isinstanceRÎ  R
  R5   (   R   R  RÂ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  »  s    
c         C  s   | |  _  d S(   sA   
        Set the mutation scale.

        ACCEPTS: float
        N(   R  (   R   Ræ   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_mutation_scaleÙ  s    c         C  s   |  j  S(   s,   
        Return the mutation scale.
        (   R  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_mutation_scaleá  s    c         C  s   | |  _  d S(   sT   
        Set the aspect ratio of the bbox mutation.

        ACCEPTS: float
        N(   R  (   R   t   aspect(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_mutation_aspectç  s    c         C  s   |  j  S(   s?   
        Return the aspect ratio of the bbox mutation.
        (   R  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_mutation_aspectï  s    c         C  s   |  j  S(   s   Return the boxstyle object(   R
  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_boxstyleõ  s    c         C  s=   |  j  ƒ  |  j |  j |  j |  j |  j ƒ  |  j ƒ  ƒ } | S(   s:   
        Return the mutated path of the rectangle
        (   R  R·   R¸   R¹   Rº   R  R  (   R   Râ   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   ù  s
    	c         C  s   |  j  S(   s&   Return the left coord of the rectangle(   R·   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÎ   	  s    c         C  s   |  j  S(   s(   Return the bottom coord of the rectangle(   R¸   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÏ   
	  s    c         C  s   |  j  S(   s"   Return the width of the  rectangle(   R¹   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÑ   	  s    c         C  s   |  j  S(   s"   Return the height of the rectangle(   Rº   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÒ   	  s    c         C  s   | |  _  d S(   sM   
        Set the left coord of the rectangle

        ACCEPTS: float
        N(   R·   (   R   R9   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÓ   	  s    c         C  s   | |  _  d S(   sO   
        Set the bottom coord of the rectangle

        ACCEPTS: float
        N(   R¸   (   R   R:   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÔ   	  s    c         C  s   | |  _  d S(   sA   
        Set the width rectangle

        ACCEPTS: float
        N(   R¹   (   R   Rd   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÖ   &	  s    c         C  s   | |  _  d S(   sA   
        Set the width rectangle

        ACCEPTS: float
        N(   Rº   (   R   R×   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRØ   .	  s    c         G  se   t  | ƒ d k r+ | d \ } } } } n | \ } } } } | |  _ | |  _ | |  _ | |  _ d S(   sj   
        Set the bounds of the rectangle: l,b,w,h

        ACCEPTS: (left, bottom, width, height)
        i    N(   R#   R·   R¸   R¹   Rº   (   R   RÙ   RÚ   Rj   Rd   R×   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÛ   6	  s    			c         C  s%   t  j j |  j |  j |  j |  j ƒ S(   N(   R    RÄ   RÅ   R·   R¸   R¹   Rº   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÜ   E	  s    N(   RŠ   R‹   RŒ   R   R   R¶   R   R   R  R  R  R  R  R  R/   RÎ   RÏ   RÑ   RÒ   RÓ   RÔ   RÖ   RØ   RÛ   RÜ   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRŸ   z  s2   
	+															(   t)   split_bezier_intersecting_with_closedpath(   t   get_intersectiont   inside_circlet   get_parallels(   t   make_wedged_bezier2(   t   split_path_inoutt   get_cos_sin(   t   make_path_regulart   concatenate_pathst   ConnectionStylec           B  só   e  Z d  Z i  Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ e e d <d e f d „  ƒ  YZ e e d <d	 e f d
 „  ƒ  YZ e e d <d e f d „  ƒ  YZ	 e	 e d <d e f d „  ƒ  YZ
 e
 e d <e rñ e j e ƒ i e e ƒ d 6Z n  RS(   s0  
    :class:`ConnectionStyle` is a container class which defines
    several connectionstyle classes, which is used to create a path
    between two points. These are mainly used with
    :class:`FancyArrowPatch`.

    A connectionstyle object can be either created as::

           ConnectionStyle.Arc3(rad=0.2)

    or::

           ConnectionStyle("Arc3", rad=0.2)

    or::

           ConnectionStyle("Arc3, rad=0.2")

    The following classes are defined

    %(AvailableConnectorstyles)s


    An instance of any connection style class is an callable object,
    whose call signature is::

        __call__(self, posA, posB,
                 patchA=None, patchB=None,
                 shrinkA=2., shrinkB=2.)

    and it returns a :class:`Path` instance. *posA* and *posB* are
    tuples of x,y coordinates of the two points to be
    connected. *patchA* (or *patchB*) is given, the returned path is
    clipped so that it start (or end) from the boundary of the
    patch. The path is further shrunk by *shrinkA* (or *shrinkB*)
    which is given in points.

    RÎ  c           B  sQ   e  Z d  Z d d d „  ƒ  YZ d „  Z d „  Z d d d	 d	 d „ Z d „  Z RS(
   s“  
        A base class for connectionstyle classes. The dervided needs
        to implement a *connect* methods whose call signature is::

          connect(posA, posB)

        where posA and posB are tuples of x, y coordinates to be
        connected.  The methods needs to return a path connecting two
        points. This base class defines a __call__ method, and few
        helper methods.
        t   SimpleEventc           B  s   e  Z d  „  Z RS(   c         C  s   | \ |  _  |  _ d  S(   N(   R9   R:   (   R   R½   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ‰	  s    (   RŠ   R‹   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR#  ˆ	  s   c           s¦   ˆ  rQ ‡  f d †  } y t  | | ƒ \ } } Wn t k
 rG | } n X| } n  ˆ r¢ ‡ f d †  } y t  | | ƒ \ } } Wn t k
 r˜ | } n X| } n  | S(   sI  
            Clip the path to the boundary of the patchA and patchB.
            The starting point of the path needed to be inside of the
            patchA and the end point inside the patch B. The *contains*
            methods of each patch object is utilized to test if the point
            is inside the path.
            c           s#   t  j j |  ƒ } ˆ  j | ƒ d S(   Ni    (   R"  RÎ  R#  R>   (   t
   xy_displayt   xy_event(   t   patchA(    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   insideA–	  s    c           s#   t  j j |  ƒ } ˆ  j | ƒ d S(   Ni    (   R"  RÎ  R#  R>   (   R$  R%  (   t   patchB(    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   insideB¢	  s    (   R  R!  (   R   R2   R&  R(  R'  R  R  R)  (    (   R&  R(  sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _clipŒ	  s    	
	
	c   
      C  sÆ   | ra | j  d \ } } t | | | ƒ } y t | | ƒ \ } } | } Wqa t k
 r] qa Xn  | rÂ | j  d \ } } t | | | ƒ }	 y t | |	 ƒ \ } } | } WqÂ t k
 r¾ qÂ Xn  | S(   s\   
            Shrink the path by fixed size (in points) with shrinkA and shrinkB
            i    iÿÿÿÿ(   Ró   R  R  R!  (
   R   R2   t   shrinkAt   shrinkBR9   R:   R'  R  R  R)  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _shrink¯	  s"    

g       @c   
      C  s@   |  j  | | ƒ } |  j | | | ƒ } |  j | | | ƒ }	 |	 S(   s�   
            Calls the *connect* method to create a path between *posA*
             and *posB*. The path is clipped and shrinked.
            (   t   connectR*  R-  (
   R   t   posAt   posBR+  R,  R&  R(  R2   t   clipped_patht   shrinked_path(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR×  É	  s    c         C  s1   d d  l  j } | j ƒ  t |  j j f |  j f S(   Niÿÿÿÿ(   RØ  RÙ  RÚ  R"  R	   RŠ   RÛ  (   R   RÙ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÜ  ×	  s    	(    N(	   RŠ   R‹   RŒ   R#  R*  R-  R   R×  RÜ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÎ  {	  s   	#	t   Arc3c           B  s#   e  Z d  Z d d „ Z d „  Z RS(   sM  
        Creates a simple quadratic bezier curve between two
        points. The curve is created so that the middle contol points
        (C1) is located at the same distance from the start (C0) and
        end points(C2) and the distance of the C1 to the line
        connecting C0-C2 is *rad* times the distance of C0-C2.
        g        c         C  s   | |  _  d S(   sE   
            *rad*
              curvature of the curve.
            N(   t   rad(   R   R4  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   é	  s    c         C  s¶   | \ } } | \ } } | | d | | d } } | | | | }	 }
 |  j  } | | |
 | | |	 } } | | f | | f | | f g } t j t j t j g } t | | ƒ S(   Ng       @(   R4  R   R  Ré  (   R   R/  R0  R@  RA  RB  RC  t   x12t   y12R  R  t   fR  t   cyRó   R  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR.  ð	  s    			(   RŠ   R‹   RŒ   R   R.  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR3  à	  s   t   arc3t   Angle3c           B  s&   e  Z d  Z d d d „ Z d „  Z RS(   sþ   
        Creates a simple quadratic bezier curve between two
        points. The middle control points is placed at the
        intersecting point of two lines which crosses the start (or
        end) point and has a angle of angleA (or angleB).
        iZ   i    c         C  s   | |  _  | |  _ d S(   sˆ   
            *angleA*
              starting angle of the path

            *angleB*
              ending angle of the path
            N(   t   angleAt   angleB(   R   R;  R<  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   
  s    		c      	   C  sû   | \ } } | \ } } t  j |  j d t  j ƒ t  j |  j d t  j ƒ } } t  j |  j d t  j ƒ t  j |  j d t  j ƒ }	 }
 t | | | | | | |	 |
 ƒ \ } } | | f | | f | | f g } t j t j	 t j	 g } t | | ƒ S(   Ng     €f@(
   R;  R=  R;  Ry  R>  R<  R  R   R  Ré  (   R   R/  R0  R@  RA  RB  RC  t   cosAt   sinAt   cosBt   sinBR  R8  Ró   R  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR.  
  s    !!!(   RŠ   R‹   RŒ   R   R.  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR:  
  s   t   angle3t   Anglec           B  s)   e  Z d  Z d d d d „ Z d „  Z RS(   sL  
        Creates a picewise continuous quadratic bezier path between
        two points. The path has a one passing-through point placed at
        the intersecting point of two lines which crosses the start
        (or end) point and has a angle of angleA (or angleB).  The
        connecting edges are rounded with *rad*.
        iZ   i    g        c         C  s   | |  _  | |  _ | |  _ d S(   sÅ   
            *angleA*
              starting angle of the path

            *angleB*
              ending angle of the path

            *rad*
              rounding radius of the edge
            N(   R;  R<  R4  (   R   R;  R<  R4  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   5
  s    		c      	   C  s  | \ } } | \ } } t  j |  j d t  j ƒ t  j |  j d t  j ƒ } } t  j |  j d t  j ƒ t  j |  j d t  j ƒ }	 }
 t | | | | | | |	 |
 ƒ \ } } | | f g } t j g } |  j	 d k r| j
 | | f ƒ | j
 t j ƒ n× | | | | } } | d | d d } |  j	 | } | | | | } } | d | d d } |  j	 | } | j | | | | | | f | | f | | | | | | f g ƒ | j t j t j t j g ƒ | j
 | | f ƒ | j
 t j ƒ t | | ƒ S(   Ng     €f@g        i   g      à?(   R;  R=  R;  Ry  R>  R<  R  R   R  R4  R}  R  R˜  Ré  (   R   R/  R0  R@  RA  RB  RC  R=  R>  R?  R@  R  R8  Ró   R  t   dx1t   dy1t   d1t   f1t   dx2t   dy2t   d2t   f2(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR.  F
  s4    !!	 (   RŠ   R‹   RŒ   R   R.  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRB  ,
  s   RÀ   Rž   c           B  s/   e  Z d  Z d d d d d d „ Z d „  Z RS(   s9  
        Creates a picewise continuous quadratic bezier path between
        two points. The path can have two passing-through points, a
        point placed at the distance of armA and angle of angleA from
        point A, another point with respect to point B. The edges are
        rounded with *rad*.
        i    g        c         C  s1   | |  _  | |  _ | |  _ | |  _ | |  _ d S(   sH  
            *angleA* :
              starting angle of the path

            *angleB* :
              ending angle of the path

            *armA* :
              length of the starting arm

            *armB* :
              length of the ending arm

            *rad* :
              rounding radius of the edges
            N(   R;  R<  t   armAt   armBR4  (   R   R;  R<  RK  RL  R4  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   t
  s
    				c         C  s1  | \ } } | \ } } | | f g } g  } t  j g }	 |  j rÞ t j |  j d t j ƒ }
 t j |  j d t j ƒ } |  j |  j } | j	 | | |
 | | | f ƒ |  j } | j	 | | |
 | | | f ƒ n  |  j
 r`t j |  j d t j ƒ } t j |  j d t j ƒ } | |  j
 | | |  j
 | } } | rå| d \ } } | | | | } } | | | | d } | j	 | |  j | | | |  j | | f ƒ | j | ƒ |	 j t  j t  j t  j g ƒ n; | d \ } } | | | | } } | | | | d } | |  j } | | | | | | | | f | | f g } n  | r| d \ } } | | | | } } | | | | d } | j	 | |  j | | | |  j | | f ƒ | j | ƒ |	 j t  j t  j t  j g ƒ n  | j	 | | f ƒ |	 j	 t  j ƒ t  | |	 ƒ S(   Ng     €f@iÿÿÿÿg      à?(   R   R  RK  R;  R=  R;  Ry  R>  R4  R}  RL  R<  R˜  R  Ré  (   R   R/  R0  R@  RA  RB  RC  Ró   t   roundedR  R=  R>  t   dR?  R@  t   x_armBt   y_armBt   xpt   ypR  R  t   dd(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR.  �
  sZ    	#	&	#!N(   RŠ   R‹   RŒ   R   R   R.  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRž   k
  s   R  t   Barc           B  s,   e  Z d  Z d d d d d „ Z d „  Z RS(   s  
        A line with *angle* between A and B with *armA* and
        *armB*. One of the arm is extend so that they are connected in
        a right angle. The length of armA is determined by (*armA*
        + *fraction* x AB distance). Same for armB.
        g        g333333Ó?c         C  s(   | |  _  | |  _ | |  _ | |  _ d S(   sU  
            *armA* : minimum length of armA

            *armB* : minimum length of armB

            *fraction* : a fraction of the distance between two points that
                         will be added to armA and armB.

            *angle* : angle of the connecting line (if None, parallel to A
                      and B)
            N(   RK  RL  t   fractionRÀ   (   R   RK  RL  RU  RÀ   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ò
  s    			c          C  s0  | \ } } | \ } } \ } } | | d | | d }	 }
 t  j | | | | ƒ } | | | | } } | | | | d } | | | | } } |  j |  j } } |  j d  k	 r{|  j d t  j } | | } | t  j | ƒ } | t  j | ƒ } | | t  j | ƒ | | t  j | ƒ } } | | } | | | | } } | | | | d } | | | | } } n d } t	 | | ƒ } |  j
 | | } | | | | | | } } | | | | | | } } | | f | | f | | f | | f g } t j t j t j t j g } t | | ƒ S(   Ng       @g      à?g     €f@g        (   R;  R<  RK  RL  RÀ   R   Ry  R>  R=  R•  RU  R   R  R  (    R   R/  R0  R@  RA  t   x20t   y20RB  RC  R5  R6  Rý   R  R  RS  t   ddxt   ddyRK  RL  t   theta0t   dthetat   dlt   dLt   dd2t   armR7  t   cx1t   cy1t   cx2t   cy2Ró   R  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR.  ã
  s@    
/
			N(   RŠ   R‹   RŒ   R   R   R.  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRT  Ê
  s   t   bart   AvailableConnectorstyles(   RŠ   R‹   RŒ   R¾  R  RÎ  R3  R:  RB  Rž   RT  RÙ  R  Rº  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR"  Q	  s    &e#
%
=
]
V
c   
      C  sV   |  | | | } } | | | | | d } |  | | | | | } }	 | |	 f S(   sj   
    find a point along a line connecting (x0, y0) -- (x1, y1) whose
    distance from (x0, y0) is d.
    g      à?(    (
   Rf  Rg  R@  RA  RN  R  R  t   ffRB  RC  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _point_along_a_line'  s    t
   ArrowStylec           B  s?  e  Z d  Z i  Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e e d <d e f d	 „  ƒ  YZ e e d
 <d e f d „  ƒ  YZ	 e	 e d <d e f d „  ƒ  YZ
 e
 e d <d e f d „  ƒ  YZ e e d <d e f d „  ƒ  YZ e e d <d e f d „  ƒ  YZ e e d <d e f d „  ƒ  YZ d e f d „  ƒ  YZ e e d <d e f d  „  ƒ  YZ e e d! <d" e f d# „  ƒ  YZ e e d$ <d% e f d& „  ƒ  YZ e e d' <d( e f d) „  ƒ  YZ e e d* <d+ e f d, „  ƒ  YZ e e d- <d. e f d/ „  ƒ  YZ e e d0 <e r=e j e ƒ i e e ƒ d1 6Z n  RS(2   sç  
    :class:`ArrowStyle` is a container class which defines several
    arrowstyle classes, which is used to create an arrow path along a
    given path. These are mainly used with :class:`FancyArrowPatch`.

    A arrowstyle object can be either created as::

           ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)

    or::

           ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)

    or::

           ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4")

    The following classes are defined

    %(AvailableArrowstyles)s


    An instance of any arrow style class is an callable object,
    whose call signature is::

        __call__(self, path, mutation_size, linewidth, aspect_ratio=1.)

    and it returns a tuple of a :class:`Path` instance and a boolean
    value. *path* is a :class:`Path` instance along witch the arrow
    will be drawn. *mutation_size* and *aspect_ratio* has a same
    meaning as in :class:`BoxStyle`. *linewidth* is a line width to be
    stroked. This is meant to be used to correct the location of the
    head so that it does not overshoot the destination point, but not all
    classes support it.

    .. plot:: mpl_examples/pylab_examples/fancyarrow_demo.py
    RÎ  c           B  sD   e  Z d  Z d „  Z e d „  ƒ Z d „  Z d d „ Z d „  Z RS(   sÆ  
        Arrow Transmuter Base class

        ArrowTransmuterBase and its derivatives are used to make a fancy
        arrow around a given path. The __call__ method returns a path
        (which will be used to create a PathPatch instance) and a boolean
        value indicating the path is open therefore is not fillable.  This
        class is not an artist and actual drawing of the fancy arrow is
        done by the FancyArrowPatch class.

        c         C  s   t  t j |  ƒ j ƒ  d  S(   N(   RÓ  Rh  RÎ  R   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   m  s    c         C  sˆ   t  |  j ƒ  ƒ } t | ƒ d k s* t ‚ | d d t j k sG t ‚ | d d t j k sd t ‚ t  | d d ƒ t  | d d ƒ S(   s2   Some ArrowStyle class only wokrs with a simple
            quaratic bezier curve (created with Arc3Connetion or
            Angle3Connector). This static method is to check if the
            provided path is a simple quadratic bezier curve and returns
            its control points if true.
            i   i    i   (   R^   t   iter_segmentsR#   t   AssertionErrorR   R  Ré  (   R2   t   segments(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   ensure_quadratic_bezierp  s
    c         C  s   t  d ƒ ‚ d S(   sª  
            The transmute method is a very core of the ArrowStyle
            class and must be overriden in the subclasses. It receives
            the path object along which the arrow will be drawn, and
            the mutation_size, with which the amount arrow head and
            etc. will be scaled. The linewidth may be used to adjust
            the the path so that it does not pass beyond the given
            points. It returns a tuple of a Path instance and a
            boolean. The boolean value indicate whether the path can
            be filled or not. The return value can also be a list of paths
            and list of booleans of a same length.
            s   Derived must overrideN(   Rˆ   (   R   R2   RÔ  R(   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  €  s    g      ð?c         C  s.  t  | ƒ } | d k	 r| j | j } } | d d … d f | | d d … d f <t | | ƒ } |  j | | | ƒ \ } }	 t j |	 ƒ r
g  }
 xg t | ƒ D]Y } | j | j } } | d d … d f | | d d … d f <|
 j	 t | | ƒ ƒ q£ W|
 |	 f S| |	 f Sn |  j | | | ƒ Sd S(   sŠ   
            The __call__ method is a thin wrapper around the transmute method
            and take care of the aspect ratio.
            Ni   (
   R   R   Ró   R  R   RÕ  RÙ  t   iterableR?  R}  (   R   R2   RÔ  R(   RÖ  Ró   R  t   path_shrinkedt   path_mutatedt   fillablet	   path_listRå  R  R`   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR×  �  s"    *	*
c         C  s1   d d  l  j } | j ƒ  t |  j j f |  j f S(   Niÿÿÿÿ(   RØ  RÙ  RÚ  Rh  R	   RŠ   RÛ  (   R   RÙ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÜ  ±  s    	(	   RŠ   R‹   RŒ   R   t   staticmethodRl  RÕ  R×  RÜ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÎ  \  s   		 t   _Curvec           B  s;   e  Z d  Z d d e e d d d „ Z d „  Z d „  Z RS(   s*  
        A simple arrow which will work with any path instance. The
        returned path is simply concatenation of the original path + at
        most two paths representing the arrow head at the begin point and the
        at the end point. The arrow heads can be either open or closed.
        gš™™™™™É?gš™™™™™¹?c         C  sS   | | |  _  |  _ | | |  _ |  _ | | |  _ |  _ t t j |  ƒ j	 ƒ  d S(   s>  
            The arrows are drawn if *beginarrow* and/or *endarrow* are
            true. *head_length* and *head_width* determines the size
            of the arrow relative to the *mutation scale*.  The
            arrowhead at the begin (or end) is closed if fillbegin (or
            fillend) is True.
            N(
   t
   beginarrowt   endarrowR&  R%  t	   fillbegint   fillendRÓ  Rh  Rs  R   (   R   Rt  Ru  Rv  Rw  R&  R%  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Â  s    
c	         C  s2  | | | | }	 }
 t  j |	 d |
 d ƒ } d | | } | |	 | } | |
 | } |	 | | }	 |
 | | }
 | |	 | |
 | |	 | |
 } } | |	 | |
 | |	 | |
 } } | | | | | | f | | | | f | | | | | | f g } t j t j t j g } | | | | f S(   s  
            Return the paths for arrow heads. Since arrow lines are
            drawn with capstyle=projected, The arrow goes beyond the
            desired point. This method also returns the amount of the path
            to be shrinked so that it does not overshoot.
            i   g      à?(   R;  R  R   R  R  (   R   Rf  Rg  R@  RA  t	   head_distt   cos_tt   sin_tR(   R  R  t   cp_distancet   pad_projectedRX  RY  RC  RD  RG  RH  t   vertices_arrowt   codes_arrow(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_arrow_wedgeÒ  s     &%c      	   C  së  |  j  | |  j | } } t j | d | d ƒ } | | | | } } | j d \ }	 }
 | j d \ } } |  j r­ |  j | | |	 |
 | | | | ƒ \ } } } } n g  g  } } d \ } } | j d \ } } | j d \ } } |  j r(|  j | | | | | | | | ƒ \ } } } } n g  g  } } d \ } } t t	 j
 |	 | |
 | f g | j d d !| | | | f g g ƒ | j ƒ g } t g } |  j r?|  j rt	 j
 | | d | d g g ƒ } t	 j
 | t j t j g g ƒ } | j t | | ƒ ƒ | j t ƒ q?| j t | | ƒ ƒ | j t ƒ n  |  j rá|  j r»| j t ƒ t	 j
 | | d | d g g ƒ } t	 j
 | t j t j g g ƒ } | j t | | ƒ ƒ qá| j t ƒ | j t | | ƒ ƒ n  | | f S(	   Ni   i    i   g        iþÿÿÿiÿÿÿÿ(   g        g        (   g        g        (   R&  R%  R;  R  Ró   Rt  R  Ru  R   Rø   Rû   R  RË   Rv  R  R	  R}  R   Rw  (   R   R2   RÔ  R(   R&  R%  Rx  Ry  Rz  Rf  Rg  R@  RA  t	   verticesAt   codesAt   ddxAt   ddyARB  RC  t   x3t   y3t	   verticesBt   codesBt   ddxBt   ddyBRâ   t	   _fillableRå  R`   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  ù  sX    
							!		!N(   RŠ   R‹   RŒ   R   RË   R   R  RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRs  º  s   	't   Curvec           B  s   e  Z d  Z d „  Z RS(   s8   
        A simple curve without any arrow head.
        c         C  s&   t  t j |  ƒ j d t d t ƒ d  S(   NRt  Ru  (   RÓ  Rh  R‹  R   RË   (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ?  s    (   RŠ   R‹   RŒ   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR‹  :  s   t   -t   CurveAc           B  s   e  Z d  Z d d d „ Z RS(   s:   
        An arrow with a head at its begin point.
        gš™™™™™Ù?gš™™™™™É?c      	   C  s2   t  t j |  ƒ j d t d t d | d | ƒ d S(   sŽ   
            *head_length*
              length of the arrow head

            *head_width*
              width of the arrow head
            Rt  Ru  R&  R%  N(   RÓ  Rh  R�  R   R   RË   (   R   R&  R%  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   J  s    	(   RŠ   R‹   RŒ   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR�  E  s   s   <-t   CurveBc           B  s   e  Z d  Z d d d „ Z RS(   s8   
        An arrow with a head at its end point.
        gš™™™™™Ù?gš™™™™™É?c      	   C  s2   t  t j |  ƒ j d t d t d | d | ƒ d S(   sŽ   
            *head_length*
              length of the arrow head

            *head_width*
              width of the arrow head
            Rt  Ru  R&  R%  N(   RÓ  Rh  RŽ  R   RË   R   (   R   R&  R%  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ^  s    	(   RŠ   R‹   RŒ   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRŽ  Y  s   s   ->t   CurveABc           B  s   e  Z d  Z d d d „ Z RS(   sJ   
        An arrow with heads both at the begin and the end point.
        gš™™™™™Ù?gš™™™™™É?c      	   C  s2   t  t j |  ƒ j d t d t d | d | ƒ d S(   sŽ   
            *head_length*
              length of the arrow head

            *head_width*
              width of the arrow head
            Rt  Ru  R&  R%  N(   RÓ  Rh  R�  R   R   (   R   R&  R%  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   r  s    	(   RŠ   R‹   RŒ   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR�  m  s   s   <->t   CurveFilledAc           B  s   e  Z d  Z d d d „ Z RS(   sB   
        An arrow with filled triangle head at the begin.
        gš™™™™™Ù?gš™™™™™É?c         C  s>   t  t j |  ƒ j d t d t d t d t d | d | ƒ d S(   sŽ   
            *head_length*
              length of the arrow head

            *head_width*
              width of the arrow head
            Rt  Ru  Rv  Rw  R&  R%  N(   RÓ  Rh  R�  R   R   RË   (   R   R&  R%  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   †  s    	(   RŠ   R‹   RŒ   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR�  �  s   s   <|-t   CurveFilledBc           B  s   e  Z d  Z d d d „ Z RS(   s@   
        An arrow with filled triangle head at the end.
        gš™™™™™Ù?gš™™™™™É?c         C  s>   t  t j |  ƒ j d t d t d t d t d | d | ƒ d S(   sŽ   
            *head_length*
              length of the arrow head

            *head_width*
              width of the arrow head
            Rt  Ru  Rv  Rw  R&  R%  N(   RÓ  Rh  R‘  R   RË   R   (   R   R&  R%  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ›  s    	(   RŠ   R‹   RŒ   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR‘  –  s   s   -|>t   CurveFilledABc           B  s   e  Z d  Z d d d „ Z RS(   sb   
        An arrow with filled triangle heads both at the begin and the end
        point.
        gš™™™™™Ù?gš™™™™™É?c         C  s>   t  t j |  ƒ j d t d t d t d t d | d | ƒ d S(   sŽ   
            *head_length*
              length of the arrow head

            *head_width*
              width of the arrow head
            Rt  Ru  Rv  Rw  R&  R%  N(   RÓ  Rh  R’  R   R   (   R   R&  R%  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   ±  s    	(   RŠ   R‹   RŒ   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR’  «  s   s   <|-|>t   _Bracketc           B  sA   e  Z d d d  d  d d d d d d d „
 Z d „  Z d „  Z RS(   g      ð?gš™™™™™É?c         C  sc   | | |  _  |  _ | | |  _ |  _ | | |  _ |  _ | | |  _ |  _ |	 |
 |  _ |  _	 d  S(   N(
   t   bracketAt   bracketBt   widthAt   widthBt   lengthAt   lengthBR;  R<  t   scaleAt   scaleB(   R   R”  R•  R–  R—  R˜  R™  R;  R<  Rš  R›  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ã  s
    c         C  s«   d d l  m } | | | | | | ƒ \ } }	 }
 } | | | | } } | | |	 | f | |	 f |
 | f |
 | | | f g } t j t j t j t j g } | | f S(   Niÿÿÿÿ(   t   get_normal_points(   t   matplotlib.bezierRœ  R   R  R  (   R   Rf  Rg  Ry  Rz  R¾   R+  Rœ  R@  RA  RB  RC  R  R  R}  R~  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   _get_bracketÏ  s    $		c         C  sØ  |  j  d  k r | } n	 |  j  } |  j d  k r9 | } n	 |  j } g  g  } } |  j rè | j d \ } }	 | j d \ }
 } t |
 | | |	 ƒ \ } } |  j | |	 | | |  j | |  j | ƒ \ } } | j	 | ƒ | j	 | ƒ n  | j	 | j ƒ | j	 | j
 ƒ |  j r¡| j d \ } }	 | j d \ }
 } t |
 | | |	 ƒ \ } } |  j | |	 | | |  j | |  j | ƒ \ } } | j	 | ƒ | j	 | ƒ n  t j | ƒ } t j | ƒ } t | | ƒ } | t f S(   Ni    i   iÿÿÿÿiþÿÿÿ(   Rš  R   R›  R”  Ró   R  Rž  R–  R˜  R}  R  R•  R—  R™  Rø   Rû   R   RË   (   R   R2   RÔ  R(   Rš  R›  t   vertices_listt
   codes_listRf  Rg  R@  RA  Ry  Rz  R€  R�  R†  R‡  Ró   R  Rå  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  ä  s>    					
	
N(   RŠ   R‹   R   R   Rž  RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR“  Á  s   	t	   BracketABc           B  s)   e  Z d  Z d d d d d d d „ Z RS(   s;   
        An arrow with a bracket(])  at both ends.
        g      ð?gš™™™™™É?c         C  sD   t  t j |  ƒ j t t d | d | d | d | d | d | ƒd S(   sŠ  
            *widthA*
              width of the bracket

            *lengthA*
              length of the bracket

            *angleA*
              angle between the bracket and the line

            *widthB*
              width of the bracket

            *lengthB*
              length of the bracket

            *angleB*
              angle between the bracket and the line
            R–  R˜  R;  R—  R™  R<  N(   RÓ  Rh  R¡  R   R   (   R   R–  R˜  R;  R—  R™  R<  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR     s    N(   RŠ   R‹   RŒ   R   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR¡    s   	s   ]-[t   BracketAc           B  s    e  Z d  Z d d d d „ Z RS(   s9   
        An arrow with a bracket(])  at its end.
        g      ð?gš™™™™™É?c      	   C  s2   t  t j |  ƒ j t d d | d | d | ƒd S(   sË   
            *widthA*
              width of the bracket

            *lengthA*
              length of the bracket

            *angleA*
              angle between the bracket and the line
            R–  R˜  R;  N(   RÓ  Rh  R¢  R   R   R   (   R   R–  R˜  R;  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   8  s    N(   RŠ   R‹   RŒ   R   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR¢  3  s   s   ]-t   BracketBc           B  s    e  Z d  Z d d d d „ Z RS(   s9   
        An arrow with a bracket([)  at its end.
        g      ð?gš™™™™™É?c      	   C  s2   t  t j |  ƒ j d t d | d | d | ƒd S(   sË   
            *widthB*
              width of the bracket

            *lengthB*
              length of the bracket

            *angleB*
              angle between the bracket and the line
            R—  R™  R<  N(   RÓ  Rh  R£  R   R   R   (   R   R—  R™  R<  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   N  s    N(   RŠ   R‹   RŒ   R   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR£  I  s   s   -[t   BarABc           B  s#   e  Z d  Z d d d d d „ Z RS(   s6   
        An arrow with a bar(|) at both ends.
        g      ð?c         C  sD   t  t j |  ƒ j t t d | d d d | d | d d d | ƒd S(	   sŠ  
            *widthA*
              width of the bracket

            *lengthA*
              length of the bracket

            *angleA*
              angle between the bracket and the line

            *widthB*
              width of the bracket

            *lengthB*
              length of the bracket

            *angleB*
              angle between the bracket and the line
            R–  R˜  i    R;  R—  R™  R<  N(   RÓ  Rh  R¤  R   R   (   R   R–  R;  R—  R<  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   d  s    N(   RŠ   R‹   RŒ   R   R   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR¤  _  s   s   |-|t   Simplec           B  s)   e  Z d  Z d d d d „ Z d „  Z RS(   sK   
        A simple arrow. Only works with a quadratic bezier curve.
        g      à?gš™™™™™É?c         C  s7   | | | |  _  |  _ |  _ t t j |  ƒ j ƒ  d S(   sÎ   
            *head_length*
              length of the arrow head

            *head_with*
              width of the arrow head

            *tail_width*
              width of the arrow tail

            N(   R&  R%  t
   tail_widthRÓ  Rh  R¥  R   (   R   R&  R%  R¦  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   †  s    c         C  sî  |  j  | ƒ \ } } } } } }	 |  j | }
 t | |	 |
 ƒ } | | f | | f | |	 f g } d d l m } y t | | d d ƒ\ } } Wns | k
 rt | |	 | | |
 ƒ \ } } d | | d | |	 } } | | f | | f | |	 f g } d  } n X|  j | } t	 | | d d d ƒ\ } } | d  k	 r=|  j
 | } t | | d ƒ \ } } t j | d f t j | d	 f t j | d
 f t j | d f t j | d	 f t j | d
 f t j | d	 f t j | d f t j | d
 f t j | d	 f t j | d f t j | d f t j | d f g } nf t j | d f t j | d	 f t j | d
 f t j | d	 f t j | d f t j | d f g } t g  | D] \ } } | ^ q­g  | D] \ } } | ^ qÉƒ } | t f S(   Niÿÿÿÿ(   t   NonIntersectingPathExceptiont	   tolerenceg{®Gáz„?g      à?g       @t   wmi    i   i   (   Rl  R&  R  t   bezierR§  R  Rg  R   R%  R  R¦  R  R   R  Ré  R  R	  R   (   R   R2   RÔ  R(   Rf  Rg  R@  RA  RB  RC  R&  t   in_ft
   arrow_pathR§  t	   arrow_outt   arrow_int   x1nt   y1nR%  t	   head_leftt
   head_rightR¦  t	   tail_leftt
   tail_rightt
   patch_pathR`   Rå  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  —  sT    !!!
A(   RŠ   R‹   RŒ   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR¥  �  s   t   simplet   Fancyc           B  s)   e  Z d  Z d d d d „ Z d „  Z RS(   sJ   
        A fancy arrow. Only works with a quadratic bezier curve.
        gš™™™™™Ù?c         C  s7   | | | |  _  |  _ |  _ t t j |  ƒ j ƒ  d S(   sÎ   
            *head_length*
              length of the arrow head

            *head_with*
              width of the arrow head

            *tail_width*
              width of the arrow tail

            N(   R&  R%  R¦  RÓ  Rh  R·  R   (   R   R&  R%  R¦  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Þ  s    c          C  s  |  j  | ƒ \ } } } } } }	 |  j | }
 | | f | | f | |	 f g } d d l m } t | |	 |
 ƒ } y t | | d d ƒ\ } } Wns | k
 rt | |	 | | |
 ƒ \ } } d | | d | |	 } } | | f | | f | |	 f g } | } n X| } t | |	 |
 d ƒ } t | | d d ƒ\ } } | } |  j | } t | | d d d	 ƒ\ } } |  j	 | } t | | d d
 d d d	 d d ƒ\ } } t | | | d ƒ } t | | d d ƒ\ } } | d } | | } } t
 j | f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | d f t
 j | f t
 j | f g } t
 g  | D] \ } } | ^ qÓg  | D] \ } } | ^ qïƒ } | t f S(   Niÿÿÿÿ(   R§  R¨  g{®Gáz„?g      à?gš™™™™™é?g       @R©  g333333ã?t   w1g      ð?t   w2g333333Ó?i    i   i   (   Rl  R&  Rª  R§  R  R  Rg  R%  R  R¦  R   R  R  Ré  R	  R   (    R   R2   RÔ  R(   Rf  Rg  R@  RA  RB  RC  R&  R¬  R§  R«  t   path_outt   path_inR¯  R°  t	   path_headt	   path_tailR%  t   head_lt   head_rR¦  R³  R´  t
   tail_startR²  R±  Rµ  R`   Rå  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  ï  sj    !!!



A(   RŠ   R‹   RŒ   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR·  Ù  s   t   fancyR˜   c           B  s&   e  Z d  Z d d d „ Z d „  Z RS(   så   
        Wedge(?) shape. Only wokrs with a quadratic bezier curve.  The
        begin point has a width of the tail_width and the end point has a
        width of 0. At the middle, the width is shrink_factor*tail_width.

        g333333Ó?g      à?c         C  s,   | |  _  | |  _ t t j |  ƒ j ƒ  d S(   s¡   
            *tail_width*
              width of the tail

            *shrink_factor*
              fraction of the arrow width at the middle point
            N(   R¦  t   shrink_factorRÓ  Rh  R˜   R   (   R   R¦  RÂ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   G  s    			c      	   C  s,  |  j  | ƒ \ } } } } } }	 | | f | | f | |	 f g }
 t |
 |  j | d d |  j ƒ\ } } t j | d f t j | d f t j | d f t j | d f t j | d f t j | d f t j | d f g } t g  | D] \ } } | ^ që g  | D] \ } } | ^ qƒ } | t	 f S(   Ng       @R©  i    i   i   (
   Rl  R  R¦  RÂ  R   R  Ré  R  R	  R   (   R   R2   RÔ  R(   Rf  Rg  R@  RA  RB  RC  R¬  t   b_plust   b_minusRµ  R`   Rå  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÕ  T  s    !!A(   RŠ   R‹   RŒ   R   RÕ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR˜   ?  s   t   wedget   AvailableArrowstyles(   RŠ   R‹   RŒ   R¾  R  RÎ  Rs  R‹  R�  RŽ  R�  R�  R‘  R’  R“  R¡  R¢  R£  R¤  R¥  R·  R˜   RÙ  R  Rº  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRh  3  sH   %^€	






O!


 
V
d
+
RÆ  Re  t   FancyArrowPatchc           B  sæ   e  Z d  Z d „  Z e j d d d d d d d d d d d d d d d „ ƒ Z d „  Z d „  Z	 d	 „  Z
 d
 „  Z d „  Z d „  Z d „  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sM   
    A fancy arrow patch. It draws an arrow using the :class:ArrowStyle.
    c         C  sj   |  j  d  k	 rH |  j  \ \ } } \ } } |  j j d | | | | f S|  j j d t |  j ƒ f Sd  S(   Ns   (%g,%g->%g,%g)s   (%s)(   t
   _posA_posBR   R	   RŠ   R   t   _path_original(   R   R@  RA  RB  RC  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   |  s    		R¶  R9  g       @g      ð?c         K  s
  | d k	 rX | d k	 rX | d k rX | | g |  _ | d k rH d } n  |  j | ƒ nE | d k r‘ | d k r‘ | d k	 r‘ d |  _ d |  _ n t d ƒ ‚ | |  _ |	 |  _ |
 |  _ | |  _ t	 j
 |  | � | |  _ |  j | ƒ | |  _ | |  _ |  j | ƒ d S(   sE  
        If *posA* and *posB* is given, a path connecting two point are
        created according to the connectionstyle. The path will be
        clipped with *patchA* and *patchB* and further shirnked by
        *shrinkA* and *shrinkB*. An arrow is drawn along this
        resulting path using the *arrowstyle* parameter. If *path*
        provided, an arrow is drawn along this path and *patchA*,
        *patchB*, *shrinkA*, and *shrinkB* are ignored.

        The *connectionstyle* describes how *posA* and *posB* are
        connected. It can be an instance of the ConnectionStyle class
        (matplotlib.patches.ConnectionStlye) or a string of the
        connectionstyle name, with optional comma-separated
        attributes.  The following connection styles are available.

        %(AvailableConnectorstyles)s


        The *arrowstyle* describes how the fancy arrow will be
        drawn. It can be string of the available arrowstyle names,
        with optional comma-separated attributes, or one of the
        ArrowStyle instance. The optional attributes are meant to be
        scaled with the *mutation_scale*. The following arrow styles are
        available.

        %(AvailableArrowstyles)s

        *mutation_scale* : a value with which attributes of arrowstyle
            (e.g., head_length) will be scaled. default=1.

        *mutation_aspect* : The height of the rectangle will be
            squeezed by this value before the mutation and the mutated
            box will be stretched by the inverse of it. default=None.

        Valid kwargs are:
        %(Patch)s
        R9  s.   either posA and posB, or path need to providedN(   R   RÈ  t   set_connectionstylet
   _connetorsR!  R&  R(  R+  R,  R   R   RÉ  t   set_arrowstyleR  R  t   set_dpi_cor(   R   R/  R0  R2   t
   arrowstylet   arrow_transmutert   connectionstyleR
  R&  R(  R+  R,  R  R  t   dpi_corR-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   †  s&    5$	$								c         C  s   | |  _  d S(   sŠ   
        dpi_cor is currently used for linewidth-related things and
        shink factor. Mutation scale is not affected by this.
        N(   t   _dpi_cor(   R   RÑ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÍ  Ù  s    c         C  s   |  j  S(   sŠ   
        dpi_cor is currently used for linewidth-related things and
        shink factor. Mutation scale is not affected by this.
        (   RÒ  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_dpi_corá  s    c         C  s<   | d k	 r | |  j d <n  | d k	 r8 | |  j d <n  d S(   sd    set the begin end end positions of the connecting
        path. Use current vlaue if None.
        i    i   N(   R   RÈ  (   R   R/  R0  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_positionsé  s    c         C  s   | |  _  d S(   s    set the begin patch.
        N(   R&  (   R   R&  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_patchAò  s    c         C  s   | |  _  d S(   s    set the begin patch
        N(   R(  (   R   R(  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt
   set_patchB÷  s    c         K  sb   | d k r t j ƒ  St | t j ƒ r4 | |  _ n* t | ƒ rL | |  _ n t | | � |  _ d S(   sõ  
        Set the connection style.

        *connectionstyle* can be a string with connectionstyle name with
         optional comma-separated attributes. Alternatively, the attrs can be
         probided as keywords.

         set_connectionstyle("arc,angleA=0,armA=30,rad=10")
         set_connectionstyle("arc", angleA=0,armA=30,rad=10)

        Old attrs simply are forgotten.

        Without argument (or with connectionstyle=None), return
        available styles as a list of strings.
        N(   R   R"  RÌ  R  RÎ  t
   _connectorR5   (   R   RÐ  RÂ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÊ  ü  s    
c         C  s   |  j  S(   s5   
        Return the ConnectionStyle instance
        (   R×  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_connectionstyle  s    c         K  sJ   | d k r t j ƒ  St | t j ƒ r4 | |  _ n t | | � |  _ d S(   sÏ  
        Set the arrow style.

        *arrowstyle* can be a string with arrowstyle name with optional
         comma-separated attributes. Alternatively, the attrs can
         be provided as keywords.

         set_arrowstyle("Fancy,head_length=0.2")
         set_arrowstyle("fancy", head_length=0.2)

        Old attrs simply are forgotten.

        Without argument (or with arrowstyle=None), return
        available box styles as a list of strings.
        N(   R   Rh  RÌ  R  RÎ  t   _arrow_transmuter(   R   RÎ  RÂ  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÌ    s
    
c         C  s   |  j  S(   s.   
        Return the arrowstyle object
        (   RÙ  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_arrowstyle7  s    c         C  s   | |  _  d S(   sA   
        Set the mutation scale.

        ACCEPTS: float
        N(   R  (   R   Ræ   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  =  s    c         C  s   |  j  S(   s,   
        Return the mutation scale.
        (   R  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  E  s    c         C  s   | |  _  d S(   sT   
        Set the aspect ratio of the bbox mutation.

        ACCEPTS: float
        N(   R  (   R   R  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  K  s    c         C  s   |  j  S(   s?   
        Return the aspect ratio of the bbox mutation.
        (   R  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR  S  s    c         C  sI   |  j  ƒ  \ } } t j | ƒ r0 t | ƒ } n  |  j ƒ  j ƒ  j | ƒ S(   s­   
        return the path of the arrow in the data coordinate. Use
        get_path_in_displaycoord() method to retrieve the arrow path
        in the display coord.
        (   t   get_path_in_displaycoordRÙ  Rm  R!  R.   RÌ   t   transform_path(   R   Râ   Rp  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR/   Y  s    c         C  sð   |  j  ƒ  } |  j d k	 r— |  j ƒ  j |  j d ƒ } |  j ƒ  j |  j d ƒ } |  j ƒ  | | d |  j d |  j d |  j | d |  j	 | ƒ} n |  j ƒ  j
 |  j ƒ } |  j ƒ  | |  j ƒ  |  j ƒ  | |  j ƒ  ƒ \ } } | | f S(   sK   
        Return the mutated path of the arrow in the display coord
        i    i   R&  R(  R+  R,  N(   RÓ  RÈ  R   R.   RÍ   RØ  R&  R(  R+  R,  RÜ  RÉ  RÚ  R  R7   R  (   R   RÑ  R/  R0  Râ   Rp  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÛ  f  s    			c         C  s†  |  j  ƒ  s d  S| j d |  j ƒ  ƒ | j ƒ  } | j |  j d t ƒ|  j } |  j d d k rm d } n  | j | ƒ | j	 |  j
 ƒ | j |  j ƒ |  j | ƒ | j d ƒ | j |  j ƒ  ƒ |  j } | d d k ré d  } n  | j |  j ƒ |  j r| j |  j ƒ n  |  j ƒ  d  k	 r=| j |  j ƒ  Œ  n  |  j | j d ƒ ƒ |  j ƒ  \ } } t j | ƒ s‰| g } | g } n  t j ƒ  } |  j  ƒ  rxÇ |  j  ƒ  D]a } xX t! | | ƒ D]G \ }	 }
 |
 rò| j" | | |	 | | ƒ qÄ| j" | | |	 | d  ƒ qÄWq®WnU xR t! | | ƒ D]A \ }	 }
 |
 rQ| j" | |	 | | ƒ q&| j" | |	 | d  ƒ q&W| j# ƒ  | j$ d ƒ d  S(   NRl   Rm   i   i    Rë  g      ð?(%   Rn   Ro   Rp   Rq   Rr   RQ   R   RS   R   R   RT   R   RO   Rs   t   set_capstyleRv   Rw   RR   R   RJ   R[   Rk   R   Rx   Ry   RÍ  R®   RÛ  RÙ  Rm  R    R!   R|   R?  R}   R~   R   (   R   R€   R�   Re   R‚   R2   Rp  R…   R†   Rå  R7  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR‡   „  sP    						$
N(   RŠ   R‹   RŒ   R   R   R¶   R   R   RÍ  RÓ  RÔ  RÕ  RÖ  RÊ  RØ  RÌ  RÚ  R  R  R  R  R/   RÛ  R‡   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÇ  w  s@   	
F															t   ConnectionPatchc           B  s�   e  Z d  Z d „  Z e j d d d d d d d d d d d d d e d d „ ƒ Z d d „ Z	 d	 „  Z
 d
 „  Z d „  Z d „  Z d „  Z RS(   s�   
    A :class:`~matplotlib.patches.ConnectionPatch` class is to make
    connecting lines between two points (possibly in different axes).
    c         C  s0   d |  j  d |  j  d |  j d |  j d f S(   Ns    ConnectionPatch((%g,%g),(%g,%g))i    i   (   t   xy1t   xy2(   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   È  s    RŒ  R9  g        g      $@g      ð?c         K  s¼   | d k r | } n  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ t j |  d d d d d | d | d |	 d |
 d	 | d
 | d | d | d | d | d | d | | �d |  _	 d S(   s 	  
        Connect point *xyA* in *coordsA* with point *xyB* in *coordsB*


        Valid keys are


        ===============  ======================================================
        Key              Description
        ===============  ======================================================
        arrowstyle       the arrow style
        connectionstyle  the connection style
        relpos           default is (0.5, 0.5)
        patchA           default is bounding box of the text
        patchB           default is None
        shrinkA          default is 2 points
        shrinkB          default is 2 points
        mutation_scale   default is text size (in points)
        mutation_aspect  default is 1.
        ?                any key for :class:`matplotlib.patches.PathPatch`
        ===============  ======================================================


        *coordsA* and *coordsB* are strings that indicate the
        coordinates of *xyA* and *xyB*.

        =================   ===================================================
        Property            Description
        =================   ===================================================
        'figure points'     points from the lower left corner of the figure
        'figure pixels'     pixels from the lower left corner of the figure
        'figure fraction'   0,0 is lower left of figure and 1,1 is upper, right
        'axes points'       points from lower left corner of axes
        'axes pixels'       pixels from lower left corner of axes
        'axes fraction'     0,1 is lower left of axes and 1,1 is upper right
        'data'              use the coordinate system of the object being
                            annotated (default)
        'offset points'     Specify an offset (in points) from the *xy* value

        'polar'             you can specify *theta*, *r* for the annotation,
                            even in cartesian plots.  Note that if you
                            are using a polar axes, you do not need
                            to specify polar for the coordinate
                            system since that is the native "data" coordinate
                            system.
        =================   ===================================================

        R/  i    R0  i   RÎ  RÏ  RÐ  R
  R&  R(  R+  R,  R  R  t   clip_onRÑ  N(   i    i    (   i   i   (
   R   Rß  Rà  t   coords1t   coords2t   axesAt   axesBRÇ  R   t   _annotation_clip(   R   t   xyAt   xyBt   coordsAt   coordsBRä  Rå  RÎ  RÏ  RÐ  R
  R&  R(  R+  R,  R  R  Rá  RÑ  R-   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR   Ì  s0    @							c         C  s  | d k r |  j } n  | d k rj | j } t |  j | ƒ ƒ } t |  j | ƒ ƒ } | j | | f ƒ S| d k r|  j \ } } |  j d k r§ |  j	 | | d ƒ S|  j	 | | |  j ƒ \ } } |  j
 j ƒ  } | | d 9} | | d 9} | | 7} | | 7} | | f S| d k ri| | }	 }
 |
 t j |	 ƒ } |
 t j |	 ƒ } | j } | j | | f ƒ S| d k r|  j
 j } |  j
 j j \ } } } } | | }
 | | } | | d 9} | | d 9} | d k  rå|
 | } n  | d k  rþ| | } n  | | f S| d k r|  j
 j j \ } } } } | | }
 | | } | d k  r\|
 | } n  | d k  ru| | } n  | | f S| d k rª|  j
 j } | j | | f ƒ S| d	 k r^|  j
 j } | j j \ } } } } | | }
 | | } | d k  r|
 | | d } n | | | d } | d k  rB| | | d } n | | | d } | | f S| d
 k ræ| j j \ } } } } | | }
 | | } | d k  r¯|
 | } n
 | | } | d k  rÒ| | } n
 | | } | | f S| d k r| j } | j | | f ƒ Sd S(   s<   
        caculate the pixel position of given point
        t   datas   offset pointsg      R@t   polars   figure pointsi    s   figure pixelss   figure fractions   axes pointss   axes pixelss   axes fractionN(   R   Re  t	   transDataRa   RÂ   RÃ   RÍ   R½   t   xycoordsRè   R8  t   get_dpiRø   R=  R>  R9  RÈ   RŽ  t   transFiguret	   transAxes(   R   R9   R:   t   sRe  R1   R  R  R9  RJ  Rª   RÚ   Rj   Rd   R×   t   t(    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRè   *  s”    	


	













	c         C  s   | |  _  d S(   sM  
        set *annotation_clip* attribute.

          * True: the annotation will only be drawn when self.xy is inside the
                   axes.
          * False: the annotation will always be drawn regardless of its
                    position.
          * None: the self.xy will be checked only if *xycoords* is "data"
        N(   Ræ  (   R   Rj   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   set_annotation_clip�  s    
c         C  s   |  j  S(   s   
        Return *annotation_clip* attribute.
        See :meth:`set_annotation_clip` for the meaning of return values.
        (   Ræ  (   R   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   get_annotation_clipœ  s    c         C  sè   |  j  ƒ  } |  j \ } } |  j | | |  j |  j ƒ } |  j \ } } |  j | | |  j |  j ƒ } |  j ƒ  | | d |  j	 d |  j
 d |  j | d |  j | ƒ} |  j ƒ  | |  j ƒ  |  j ƒ  | |  j ƒ  ƒ \ } } | | f S(   sK   
        Return the mutated path of the arrow in the display coord
        R&  R(  R+  R,  (   RÓ  Rß  Rè   Râ  Rä  Rà  Rã  Rå  RØ  R&  R(  R+  R,  RÚ  R  R7   R  (   R   RÑ  R9   R:   R/  R0  Râ   Rp  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÛ  £  s    			c         C  sÿ   |  j  ƒ  } | s- | d k rs |  j d k rs |  j \ } } |  j | | |  j |  j ƒ } |  j j | ƒ ss t Sn  | s” | d k rû |  j	 d k rû |  j
 \ } } |  j | | |  j	 |  j ƒ } |  j d k rÜ |  j } n	 |  j } | j | ƒ sû t Sn  t S(   sC   
        check if the annotation need to
        be drawn.
        Rë  N(   Rõ  R   Râ  Rß  Rè   Rä  Re  R8   RË   Rã  Rà  Rå  R   (   R   R€   Rj   R9   R:   t   xy_pixelRe  (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt	   _check_xy¿  s    !!	c         C  sO   | d k	 r | |  _ n  |  j ƒ  s( d S|  j | ƒ s; d St j |  | ƒ d S(   s   
        Draw.
        N(   R   t	   _rendererRn   R÷  RÇ  R‡   (   R   R€   (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyR‡   Ù  s    N(   RŠ   R‹   RŒ   R   R   R¶   R   RË   R   Rè   Rô  Rõ  RÛ  R÷  R‡   (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyRÞ  Ã  s.   	Pf				(F   t
   __future__R    R   R;  t
   matplotlibR   t   numpyRø   RØ  RÙ  t   matplotlib.artistR   R   t   matplotlib.colorsRX   R   t   matplotlib.transformsR    t   matplotlib.pathR   R   t   interpdR©   R   R   t   kwdoct   patchdocRW  R¶   R   R    R”   R–   Rñ   R—   R˜   R™   Rš   RŒ   R›   Rœ   R�   R•   Rž   R   R   R�  R‘  R£  Rº  R  R»  RÒ  R¾  RŸ   R�  R  R  R  R  R  R  R  R   R!  R"  Rg  Rh  RÇ  RÞ  (    (    (    sL   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/patches.pyt   <module>   s€   ÿ �B–T@S)\hC'× %	!8ÿ ÔÐÿ ×	ÿ ÿ ÿ Aÿ M