The straight lines that you are drawing fall on the very edge of the button's rectangle. When your drawing routine is called, Cocoa has conveniently set the clipping region to the exact boundary of the button rectangle, but when you ask Cocoa to draw a line along the edge, exactly half of the line is drawn outside of the clipping rectangle.
You notice the difference in the rounded corners because the curved portion falls completely inside the clipping rectangle, so none of it is clipped away."
No comments:
Post a Comment