tuikit/common.py
changeset 24 b248ef500557
parent 23 4e72fd2a0e14
child 26 37745c5abc49
equal deleted inserted replaced
23:4e72fd2a0e14 24:b248ef500557
   143         y = min(r1.y, r2.y)
   143         y = min(r1.y, r2.y)
   144         w = max(r1.x + r1.w, r2.x + r2.w) - x
   144         w = max(r1.x + r1.w, r2.x + r2.w) - x
   145         h = max(r1.y + r1.h, r2.y + r2.h) - y
   145         h = max(r1.y + r1.h, r2.y + r2.h) - y
   146         return Rect(x, y, w, h)
   146         return Rect(x, y, w, h)
   147 
   147 
       
   148 
       
   149 class UnicodeGraphics:
       
   150     
       
   151     '''Unicode graphics bank.
       
   152     
       
   153     This class can be overriden to change graphics style (round corners etc.).'''
       
   154     
       
   155     # http://en.wikipedia.org/wiki/List_of_Unicode_characters#Geometric_shapes
       
   156     UP_ARROW = '▲' #curses.ACS_UARROW
       
   157     DOWN_ARROW = '▼' #curses.ACS_DARROW
       
   158     
       
   159     # http://en.wikipedia.org/wiki/Box-drawing_characters
       
   160     LIGHT_SHADE = '░' #curses.ACS_BOARD
       
   161     MEDIUM_SHADE = '▒'
       
   162     DARK_SHADE = '▓'
       
   163     BLOCK = '█'
       
   164     
       
   165     COLUMN = '▁▂▃▄▅▆▇█'
       
   166     CORNER_ROUND = '╭╮╰╯'
       
   167     CORNER = '┌┐└┘'
       
   168     LINE = '─━│┃┄┅┆┇┈┉┊┋'
       
   169 
       
   170     HLINE = '─' # curses.ACS_HLINE
       
   171     VLINE = '│' # curses.ACS_VLINE
       
   172     ULCORNER = '┌' # curses.ACS_ULCORNER
       
   173     URCORNER = '┐' # curses.ACS_URCORNER
       
   174     LLCORNER = '└' # curses.ACS_LLCORNER
       
   175     LRCORNER = '┘' # curses.ACS_LRCORNER
       
   176     LTEE = '├'
       
   177     RTEE = '┤'
       
   178