Ñò
v´QLc           @   s"   d  d k  Z  d „  Z d „  Z d S(   iÿÿÿÿNc         C   s7   t  i |  ƒ } | i | i 8_ | i | i 8_ | S(   sO   
    Converts a rectangle using absolute coordinates to screen coordinates
    (   t   pygamet   Rectt   leftt   top(   t   rectt
   screen_loct   tmp_rect(    (    s.   C:\Python26\knight_game\knight_game\display.pyt   abs_to_screen   s    c         C   s˜   t  |  | ƒ } | i d j o | i | i j  p# | i d j oV | i | i j  oC | i d j o | i | i j  p  | i d j o | i | i j  S(   sB   
    returns if a rect(in abs coords) is on the screen at all
    i    (   R   t   rightt   widthR   R   t   heightt   bottom(   t   absrectt   screen_rectR   (    (    s.   C:\Python26\knight_game\knight_game\display.pyt   is_on_screen   s    F(   R    R   R   (    (    (    s.   C:\Python26\knight_game\knight_game\display.pyt   <module>   s   		