paintInContextInternal