float
|
rect_ratio(r)
returns the ratio of rect r which is defined as width/height |
source code
|
|
(float,float,float,float)
|
|
(float,float,float,float)
|
rect_pad(r,
pad)
returns a padded rect by reducing border by the pad tuple
(top,left,bottom,right) |
source code
|
|
(float,float,float,float)
|
rect_to_abs(r)
get absolute coordinates (x0,y0,x1,y1) from rect definition (x,y,w,h) |
source code
|
|
(float,float,float,float)
|
abs_to_rect(a)
get rect definition (x,y,w,h) from absolute coordinates (x0,y0,x1,y1) |
source code
|
|
(float,float,float,float)
|
rect_from_origin(r)
returns a similar rect with top-left corner at (0,0) |
source code
|
|
(float,float,float,float)
|
rect_hull(r1,
r2)
returns the smallest rect containing r1 and r2 |
source code
|
|
((float,float,float,float),(float,float,float,float))
|
|
((float,float,float,float),(float,float,float,float))
|
|
tuple
|
|
tuple
|
|
tuple
|
color_auto_fg(bg,
light=( 1, 1, 1) ,
dark=( 0, 0, 0) )
return light or dark foreground color based on an
ad-hoc evaluation of bg |
source code
|
|