I don’t understand this but I just noticed this strange behaviour.
Before describing that, let me tell you about the structure of my code first.
- It rotates a bounds rectangle in clock-wise first.
- it draws an image
- it rotates the bound rectangle in counter-clock-wise
- it draws the bounds rectangle to show the bounds of the current view ( strokes the rect. )
In one experiment, I set the stroke color before step 3 to red.
Then at the step 4, the bound rectangle is drawn in black color.
Then, if I set the stroke color after step 3, it draws the rectangle in red as expected.
So, it looks like that rotation of bounds rectangle affect the effectiveness of setting stroke color.
Probably the graphics context is reset after rotation?