Drawing function.