fbdev: consolidate common drawing functions into a header file