ó
Ä‚Œ\c           @  s¯   d  d l  m Z d  d l Z d  d l m Z m Z m Z d e j j	 j
 f d „  ƒ  YZ d e f d „  ƒ  YZ d e j j	 j
 f d	 „  ƒ  YZ d
 e j j	 j
 f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   print_functionN(   t   rendert   Rendert   Matrix2Dt   Solidc           B  s;   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sŽ   
    :doc: disp_imagelike

    A displayable that fills the area its assigned with `color`.

    ::

        image white = Solid("#fff")

    c         K  sG   t  t |  ƒ j |   | d  k	 r: t j j | ƒ |  _ n	 d  |  _ d  S(   N(   t   superR   t   __init__t   Nonet   renpyt   easyt   color(   t   selfR
   t
   properties(    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   +   s    c         C  s   t  |  j ƒ S(   N(   t   hashR
   (   R   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyt   __hash__4   s    c         C  s#   |  j  | ƒ s t S|  j | j k S(   N(   t   _equalst   FalseR
   (   R   t   o(    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyt   __eq__7   s    c         C  s   g  S(   N(    (   R   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyt   visit=   s    c   	      C  s1  t  |  j j | ƒ } t  |  j j | ƒ } |  j p< |  j j } t | | ƒ } | d  k sr | d k sr | d k rv | Sd } | | k  s” | | k  r² t j j	 j
 | | | ƒ } nk t j j	 j
 | | | ƒ } t d | | d d d | | ƒ | _ t d | | d d d | | ƒ | _ | j | d ƒ | S(   Ni    i
   g      ð?(   i    i    (   t   maxt   stylet   xminimumt   yminimumR
   R   R   R   t   displayt   drawt   solid_textureR   t   forwardt   reverset   blit(	   R   t   widtht   heightt   stt   atR
   t   rvt   SIZEt   tex(    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   @   s    $(((   t   __name__t
   __module__t   __doc__R   R   R   R   R   (    (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR      s   
					t   Bordersc           B  s2   e  Z d  Z d d d d d „ Z e d „  ƒ Z RS(   sL  
    :doc: disp_imagelike

    This object provides border size and tiling information to a :func:`Frame`.
    It can also provide padding information that can be supplied to the
    :propref:`padding` style property of a window or frame.

    `left`, `top`, `right`, `bottom`
        These provide the size of the insets used by a frame, and are added
        to the padding on each side. They should zero or a positive integer.

    `pad_left`, `pad_top`, `pad_right`, `pad_bottom`
        These are added to the padding on each side, and may be positive or
        negative. (For example, if `left` is 5 and `pad_left` is -3, the final
        padding is 2.)

    The padding information is supplied via a field:

    .. attribute:: padding

        This is a four-element tuple containing the padding on each of the
        four sides.
    i    c	   	      C  sL   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ d  S(   N(   t   leftt   topt   rightt   bottomt   pad_leftt   pad_topt	   pad_rightt
   pad_bottom(	   R   R)   R*   R+   R,   R-   R.   R/   R0   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   s   s    							c         C  s8   |  j  |  j |  j |  j |  j |  j |  j |  j f S(   N(   R)   R-   R*   R.   R+   R/   R,   R0   (   R   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyt   padding   s    (   R%   R&   R'   R   t   propertyR1   (    (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR(   Z   s   t   Framec        	   B  sŒ   e  Z d  Z d Z i  Z d „  Z d d d d d d e e d „ Z	 d „  Z
 d „  Z d „  Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z RS(   s´  
    :doc: disp_imagelike
    :args: (image, left=0, top=0, right=None, bottom=None, tile=False, **properties)
    :name: Frame

    A displayable that resizes an image to fill the available area,
    while preserving the width and height of its borders. It is often
    used as the background of a window or button.

    .. figure:: frame_example.png

        Using a frame to resize an image to double its size.

    `image`
        An image manipulator that will be resized by this frame.

    `left`
        The size of the border on the left side. This can also be an
        :func:`Borders` object, in which case that object is use in place
        of the other parameters.

    `top`
        The size of the border on the top.

    `right`
        The size of the border on the right side. If None, defaults
        to `left`.

    `bottom`
        The side of the border on the bottom. If None, defaults to `top`.

    `tile`
        If true, tiling is used to resize sections of the image,
        rather than scaling.

    ::

         # Resize the background of the text window if it's too small.
         init python:
             style.window.background = Frame("frame.png", 10, 10)
        i   c         C  sC   | d k  r? |  j  |  _ |  j  |  _ |  j |  _ |  j |  _ n  d  S(   Ni   (   t   xborderR)   R+   t   yborderR*   R,   (   R   t   version(    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyt   after_upgrade¸   s
    i    c
         K  sû   t  t |  ƒ j |
   t j j | ƒ |  _ |  j j |  _ t | t	 ƒ rv | } | j
 } | j } | j } | j } n  |	 |  _ | d  k r” | } n  | d  k r© | } n  | d  k r¾ | } n  | d  k rÓ | } n  | |  _
 | |  _ | |  _ | |  _ d  S(   N(   R   R3   R   R   R	   t   displayablet   imaget   _duplicatablet
   isinstanceR(   R)   R*   R+   R,   t   tileR   (   R   R9   R)   R*   R+   R,   R4   R5   t   bilinearR<   R   t   insets(    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   ¿   s,    											c         C  s:   d j  |  j |  j |  j |  j |  j |  j r3 d n d ƒ S(   Ns   <Frame {!r} ({},{},{},{}){}>s    tilet    (   t   formatR9   R)   R*   R+   R,   R<   (   R   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyt   __repr__ß   s    c         C  s›   |  j  | ƒ s t S|  j | j k r) t S|  j | j k r? t S|  j | j k rU t S|  j | j k rk t S|  j | j k r t S|  j | j k r— t St S(   N(	   R   R   R9   R)   R*   R+   R,   R<   t   True(   R   R   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   è   s    c           sä  t  ˆ j j | ƒ } t  ˆ j j | ƒ } ˆ j j p< ˆ j } t | | | | | ƒ ‰  ˆ  j ƒ  \ ‰ ‰ t ˆ ƒ ‰ t ˆ ƒ ‰ t | ƒ ‰ t | ƒ ‰ ˆ j	 ˆ j
 } ˆ j ˆ j } t | ˆ d ˆ ƒ } | r | r ˆ j	 | | }	 ˆ j
 | | }
 n d }	 d }
 t | ˆ d ˆ ƒ } | rS| rSˆ j | | } ˆ j | | } n d } d } t j j j d d k r—ˆ j ˆ  ˆ ˆ |	 | |
 | ƒ S‡  ‡ ‡ ‡ ‡ ‡ ‡ f d †  } t ˆ ˆ ƒ ‰ ˆ j | |	 | |
 | ƒ ˆ S(   Ni   i    t   renderert   swc           s|  |  d k r |  } |  } n ˆ |  } ˆ |  } | d k rJ | } | } n ˆ | } ˆ | } | d k ry | } | }	 n ˆ | } ˆ | }	 | d k r¨ | }
 | } n ˆ | }
 ˆ | } | | k sÔ |	 | k rØ d  S| | } | |	 } | | } |
 | } | d k s0| d k s0| d k s0| d k r4d  Sˆ  j  | |	 | | f ƒ } | | k sg| | k rbˆ j rêt | | ƒ } t | _ t | _ xM t d | | ƒ D]9 } x0 t d | | ƒ D] } | j | | | f ƒ q½Wq¤W| } qbt | | ƒ } t d | | d d d | | ƒ | _	 t d | | d d d | | ƒ | _
 | j | d ƒ | } n  ˆ j | | | f ƒ d  S(   Ni    g      ð?(   i    i    (   t
   subsurfaceR<   R   RB   t	   xclippingt	   yclippingt   xrangeR   R   R   R   (   t   x0t   x1t   y0t   y1t   dx0t   sx0t   dx1t   sx1t   dy0t   sy0t   dy1t   sy1t   cswt   csht   cdwt   cdht   crt   newcrt   xt   y(   t   crendt   dht   dwR"   R   t   shRD   (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   "  sZ    	

	

	

	





0				((	(   R   R   R   R   t   childR9   R   t   get_sizet   intR)   R+   R*   R,   t   minR   R   R   t   infot	   sw_renderR   t   draw_pattern(   R   R   R   R    R!   R9   t   bwt   bhR4   R)   R+   R5   R*   R,   R   (    (   R]   R^   R_   R"   R   R`   RD   sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   ý   s:    !Qc         C  s  | rV | r" | d | d | ƒ n  | | | d | ƒ | rV | | d d | ƒ qV n  | rs | d | | | ƒ n  | | | | | ƒ | r¦ | | d | | ƒ n  | rÿ | rÉ | d | | d ƒ n  | | | | d ƒ | rÿ | | d | d ƒ qÿ n  d  S(   Ni    (    (   R   R   R)   R*   R+   R,   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyRg   y  s"    c           sµ   | j  t ƒ ‰ ˆ j ƒ  \ ‰ ‰ t j j j ˆ ˆ t ƒ ‰  ˆ  } ‡  ‡ ‡ ‡ ‡ ‡ ‡ f d †  }	 ˆ j |	 | | | | ƒ t j j j	 ˆ ˆ ƒ }
 |
 j
 | d ƒ |
 j | ƒ |
 S(   Nc           s   |  d k r |  } |  } n ˆ |  } ˆ |  } | d k rJ | } | } n ˆ | } ˆ | } | d k ry | } | }	 n ˆ | } ˆ | }	 | d k r¨ | }
 | } n ˆ | }
 ˆ | } | | k sì |	 | k sì | | k sì |
 | k rð d  S| | | |	 f } t  | | ƒ t  |
 | ƒ f } ˆ j | |	 | d | d f ƒ } | | k rˆ j rå| \ } } | \ } } t j j j | | ƒ } xM t d | | ƒ D]9 } x0 t d | | ƒ D] } | j | | | f ƒ q¸WqŸW| } qt j j	 j
 | | ƒ } | } n  ˆ  j | | | f ƒ d  S(   Ni    i   (   Rc   RE   R<   R   R   t   pgrendert   surface_unscaledt   rangeR   t   scalet   real_transform_scale(   RI   RJ   RK   RL   RM   RN   RO   RP   RQ   RR   RS   RT   t   srcsizet   dstsizet   surft   tilewt   tileht   dstwt   dstht   surf2R\   R[   (   t   destR^   R_   R   R`   t   sourceRD   (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR      sJ    	

	

	

	

0 #			i    (   i    i    (   t   render_to_textureRB   Rb   R   R   t   swdrawt   surfaceRg   R   R   R   t
   depends_on(   R   R]   R_   R^   R)   R*   R+   R,   R"   R   t   rrv(    (   Rw   R^   R_   R   R`   Rx   RD   sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyRf   ˜  s    !Gc         C  sW   |  j  j | ƒ } | |  j  k r% |  S| j ƒ  |  j | ƒ } | | _  | j | _ | S(   N(   R9   t
   _duplicatet   _uniquet   _copyR:   (   R   t   argsR9   R"   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR~   ð  s    
	c         C  s;   |  j  j ƒ  } | |  j  k r" |  S|  j ƒ  } | | _  | S(   N(   R9   t   _in_current_storeR€   (   R   R9   R"   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR‚   ý  s    	c         C  s   g  } |  j  j | ƒ | S(   N(   R   t   _visit_frame(   R   R"   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR     s    N(   R%   R&   R'   t   __version__R   R7   R   RB   R   R   RA   R   R   Rg   Rf   R~   R‚   R   (    (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR3   ‰   s   )	! 				|		X		
t   FileCurrentScreenshotc           B  s#   e  Z d  Z d d „ Z d „  Z RS(   sY  
    :doc: file_action_function

    A displayable that shows the screenshot that will be saved with the current
    file, if a screenshot has been taken when entering a menu or with
    :func:`FileTakeScreenshot`.

    If there is no current screenshot, `empty` is shown in its place. (If `empty` is
    None, it defaults to :func:`Null`.)
    c         K  sD   t  t |  ƒ j |   | d  k r7 t j j j ƒ  } n  | |  _ d  S(   N(	   R   R…   R   R   R   R   t   layoutt   Nullt   empty(   R   Rˆ   R   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR     s    c   
      C  s   t  j j j } | d  k r= t  j j j |  j | | | | ƒ St  j j j | ƒ } | j	 ƒ  \ } } t  j j j
 | | ƒ }	 |	 j | d ƒ |	 S(   Ni    (   i    i    (   R   R   t	   interfacet   screenshot_surfaceR   R   Rˆ   R   t   load_textureRb   R   R   (
   R   R   R   R    R!   t   ssR$   t   wt   hR"   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR   "  s    "N(   R%   R&   R'   R   R   R   (    (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyR…     s   
	(   t
   __future__R    t   renpy.displayR   t   renpy.display.renderR   R   R   R   t   coret   DisplayableR   t   objectR(   R3   R…   (    (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\imagelike.pyt   <module>   s   ;/ÿ …