Base and line drawing function.