By any stretch of the imagination - example:
"No! I did not mean that, not by any stretch of the imagination!" Means, no, I did not mean that, not at all.
The idea is that no stretching of the imagination, no matter how wide you can stretch out your imagination, such a thought should not be there, that I meant that. I did not mean it at all.
(I do not know the other expression, stretch of the word)