Ported drawing routines to android