³ò
~×YKc           @   sÙ   d  d k  Z  d  d k l Z l Z e  i i i Z d „  Z d e  i i	 i
 f d „  ƒ  YZ d e  i i	 i
 f d „  ƒ  YZ d e  i i	 i
 f d	 „  ƒ  YZ d
 e  i i	 i
 f d „  ƒ  YZ d e  i i i f d „  ƒ  YZ d S(   iÿÿÿÿN(   t   rendert   Renderc         C   sA   t  |  | | | | ƒ } t | i | i ƒ } | i | d ƒ | S(   Ni    (   i    i    (   R    R   t   widtht   heightt   blit(   t   childt   wt   ht   stt   att   rendt   rv(    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyt   wrap_render    s    t   UncachedImagec           B   s)   e  Z d  Z d d d d „ Z d „  Z RS(   s=   
    An image that is loaded immediately and not cached.
    t   image_placementc         K   s    t  t |  ƒ i d | |  t i i i | | ƒ |  _ | oH t i i i	 i
 ƒ  t i i i |  i | ƒ |  _ t i i i	 i ƒ  n t i i i |  i ƒ d  S(   Nt   style(   t   superR   t   __init__t   renpyt   displayt   pgrendert
   load_imaget   surfR    t	   blit_lockt   acquiret   transform_scalet   releaset   mutated_surface(   t   selft   filet   hintt   scaleR   t
   properties(    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR   ,   s    c         C   sD   |  i  i ƒ  \ } } t i i i | | ƒ } | i |  i  d ƒ | S(   Ni    (   i    i    (   R   t   get_sizeR   R   R    R   R   (   R   R   R   R   R	   t   swt   shR   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR    :   s    N(   t   __name__t
   __module__t   __doc__t   NoneR   R    (    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR   '   s   t   ImageReferencec           B   st   e  Z d  Z d g 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¹   
    ImageReference objects are used to reference images by their name,
    which is a tuple of strings corresponding to the name used to define
    the image in an image statment.
    t   targetc         K   s#   t  t |  ƒ i |   | |  _ d S(   s‡   
        @param name: A tuple of strings, the name of the image. Or else
        a displayable, containing the image directly.
        N(   R   R(   R   t   name(   R   R*   R    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR   L   s    c         C   s   |  i  o |  i  i ƒ  Sn |  S(   N(   t   param_targett   get_parameterized(   R   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR,   V   s    
c            sw  ˆ  i  o ˆ  i  ˆ  _ d  Sn ˆ  i } t | t i i i ƒ o | ˆ  _ t	 Sn t | t
 ƒ p t
 | i ƒ  ƒ } n g  } ‡  f d †  } xÊ | oÂ | t i i j o t i i | } y9 | i | | ƒ ˆ  _ ˆ  i | j	 o ˆ  i ˆ  _  n Wn9 t j
 o- } t i i o ‚  n | t | ƒ ƒ n Xt	 Sq | i d | d ƒ | d  } q W| d d i ˆ  i ƒ ƒ t S(   Nc            sW   t  i i i |  d d d d d d d d d d ƒˆ  _ t  i i o t |  ƒ ‚ n d  S(	   Nt   coloriÿ   i    t   xanchort   xpost   yanchort   ypos(   iÿ   i    i    iÿ   (   R   R   t   textt   TextR)   t   configt   debugt	   Exception(   t   msg(   R   (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyt   errorm   s    6i    iÿÿÿÿs   Image '%s' not found.t    (   R+   R)   R'   R*   t
   isinstanceR   R   t   coret   Displayablet   Truet   tuplet   splitt   exportst   imagest   parameterizeR6   R4   R5   t   strt   insertt   joint   False(   R   R*   t
   parametersR8   R)   t   e(    (   R   s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyt   find_target\   s6    
			
c         C   s+   |  i  p |  i ƒ  n |  i  i | | ƒ S(   N(   R)   RI   t   hide(   R   R   R	   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRJ      s    
c         C   s(   |  i  p |  i ƒ  n |  i  i | ƒ S(   N(   R)   RI   t   set_transform_event(   R   t   event(    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRK   •   s    
c         C   s1   |  i  p |  i ƒ  n |  i  i | | | | ƒ S(   N(   R)   RI   RL   (   R   t   evt   xt   yR   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRL      s    
c         C   s1   |  i  p |  i ƒ  n t |  i  | | | | ƒ S(   N(   R)   RI   R   (   R   R   R   R   R	   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR    £   s    
c         C   sÉ   |  i  p |  i ƒ  n |  i  i ƒ  \ } } } } } } } | d  j o |  i i } n | d  j o |  i i } n | d  j o |  i i } n | d  j o |  i i } n | | | | | | | f S(   N(	   R)   RI   t   get_placementR'   R   R/   R1   R.   R0   (   R   R/   R1   R.   R0   t   xoffsett   yoffsett   subpixel(    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRP   ©   s    
$c         C   s"   |  i  p |  i ƒ  n |  i  g S(   N(   R)   RI   (   R   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyt   visit½   s    
N(   R$   R%   R&   t   nosaveR'   R)   R+   R   R,   RI   RJ   RK   RL   R    RP   RT   (    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR(   A   s   		
		3					t   Solidc           B   s    e  Z d  Z d „  Z d „  Z RS(   s¹   
    Returns a Displayable that is solid, and filled with a single
    color. A Solid expands to fill all the space allocated to it,
    making it suitable for use as a background.
    c         K   sI   t  t |  ƒ i |   | d j	 o t i i | ƒ |  _ n
 d |  _ d S(   sm   
        @param color: An RGBA tuple, giving the color that the display
        will be filled with.
        N(   R   RV   R   R'   R   t   easyR-   (   R   R-   R    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR   Ê   s    c         C   sG   |  i  p
 |  i i  } t i i i | | | ƒ } t | | | | | ƒ S(   N(   R-   R   R   R   t   imt
   SolidImageR   (   R   R   R   R   R	   R-   t   si(    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR    ×   s
    	(   R$   R%   R&   R   R    (    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRV   Ä   s   	t   Framec           B   s>   e  Z d  Z d Z d „  Z e e d „ Z d „  Z d „  Z RS(   s(  
    Returns a Displayable that is a frame, based on the supplied image
    filename. A frame is an image that is automatically rescaled to
    the size allocated to it. The image has borders that are only
    scaled in one axis. The region within xborder pixels of the left
    and right borders is only scaled in the y direction, while the
    region within yborder pixels of the top and bottom axis is scaled
    only in the x direction. The corners are not scaled at all, while
    the center of the image is scaled in both x and y directions.
    i   c         C   s   | d j  o t  |  _ n d  S(   Ni   (   RF   t   bilinear(   R   t   version(    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyt   after_upgradeï   s    c         K   sM   t  t |  ƒ i |   t | ƒ |  _ | |  _ | |  _ | |  _ | |  _ d S(   sA  
        @param image: The image (which may be a filename or image
        object) that will be scaled.

        @param xborder: The number of pixels in the x direction to use as
        a border.

        @param yborder: The number of pixels in the y direction to use as
        a border.

        @param tile: If true, instead of scaling a region, we tile that
        region.

        For better performance, have the image share a dimension
        length in common with the size the frame will be rendered
        at. We detect this and avoid scaling if possible.
        N(	   R   R[   R   t   Imaget   imaget   xbordert   ybordert   tileR\   (   R   R`   Ra   Rb   R\   Rc   R    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR   ó   s    			c         C   sL   t  i i i |  i |  i |  i | | |  i |  i ƒ } t	 | | | | | ƒ S(   N(
   R   R   RX   t
   FrameImageR`   Ra   Rb   Rc   R\   R   (   R   R   R   R   R	   t   fi(    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR      s    c         C   s
   |  i  g S(   N(   R`   (   R   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRT     s    (	   R$   R%   R&   t   __version__R^   RF   R   R    RT   (    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR[   á   s   
		t   ImageButtonc        
   B   sD   e  Z d  Z d d d d d d d d d d „	 Z d „  Z d „  Z RS(   s8   
    Used to implement the guts of an image button.
    t   image_buttonc         K   s%  | p | } | p | } | p | } | p | } | p | } | p | } t  d t i i | ƒ d t i i | ƒ d t i i | ƒ d t i i | ƒ d t i i | ƒ d t i i | ƒ d t i i | ƒ d t i i | ƒ ƒ |  _ t t |  ƒ i t i i	 i
 ƒ  d	 |	 d
 |
 d | | d  S(   Nt   idle_t   hover_t   insensitive_t	   activate_t   selected_idle_t   selected_hover_t   selected_insensitive_t   selected_activate_R   t   clickedt   hovered(   t   dictR   RW   t   displayablet   state_childrenR   Rg   R   R   t   layoutt   Null(   R   t
   idle_imaget   hover_imaget   insensitive_imaget   activate_imaget   selected_idle_imaget   selected_hover_imaget   selected_insensitive_imaget   selected_activate_imageR   Rq   Rr   R    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyR   "  s(    !c         C   s   |  i  i ƒ  S(   N(   Ru   t   values(   R   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRT   J  s    c         C   s   |  i  i p |  i |  i  i S(   N(   R   R   Ru   t   prefix(   R   (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyt	   get_childM  s    N(   R$   R%   R&   R'   R   RT   R‚   (    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pyRg     s   	(   R   t   renpy.display.renderR    R   R   RX   R`   R_   R   R;   R<   R   R(   RV   R[   t   behaviort   ButtonRg   (    (    (    s;   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\image.pys   <module>   s   	ƒ<