Specifically invites and food.
"Hey, come over to a party."
Me, thinking: No, go away.
"Here. Take some food. You have to take food."
Me, thinking: No, I don't know you. I don't want your food. It might be contaminated. I'm only going to throw out it later anyway. Or I'll be forced to eat it here -- and it might give me food poisoning depending on how you prepared it. I don't know how clean you are. Plus, I don't want to eat that because it has a lot of calories. "Oh, that looks good. I think I'll save it for later though."
"Oh, taking it home? Here have some more. We have so many leftovers."
Bob,

Plus an hour of time lost. *Bob is thinking being a recluse isn't so bad....*
So the questions....
How do you politely decline an invitation without insulting the other person? I could flat out say no, but it's kind of rude.
And how do you politely decline food?
Any ideas are good. I have some. "I'm going to something. Have an appointment. Just ate." I'm just looking for more ideas.
The catch in the scenario is that sometimes the other person knows if I'm actually going somewhere.
I suppose the idea is also to "imply" to them not to invite me or offer me food, but to do that without directly insulting them.