My guess would be that your image has those yellow lines to make it more antialiased, but they are unoticed when the line is straight vertical/horizontal. When you start rotating, those lines become pixelated, and more noticeable.
Hope that's it as i can't see any other way that would make a border like that only when rotating.
EDIT: ofc, or SetSmooth() as previously said