Thanks Tony. Basically imagine this:
1) I have a normal game screen with sprites, scores etc on it. These are all drawn separately onto a background graphic.
2) I am showing a small "minigame" window on the game screen created in point 1.
3) items in the minigame window must not be drawn outside of the minigame window.
Therefore I can't draw a screen-sized image with a transparent centre as the screen-sized image would be different everytime the mini-game is played due to the arangement of sprites/scores etc on the main-game screen.
Also plain borders as rects won't work because there needs to be main game graphics visible there.
So I go back to the code in the top post. That works fine for NON-rotated images as it can draw them clipped but I want to rotate them and then draw them clipped. This is the not-easy part it seems...
1) I have a normal game screen with sprites, scores etc on it. These are all drawn separately onto a background graphic.
2) I am showing a small "minigame" window on the game screen created in point 1.
3) items in the minigame window must not be drawn outside of the minigame window.
Therefore I can't draw a screen-sized image with a transparent centre as the screen-sized image would be different everytime the mini-game is played due to the arangement of sprites/scores etc on the main-game screen.
Also plain borders as rects won't work because there needs to be main game graphics visible there.
So I go back to the code in the top post. That works fine for NON-rotated images as it can draw them clipped but I want to rotate them and then draw them clipped. This is the not-easy part it seems...