gah! How to clip rotated rectangles.

BlitzMax Forums/BlitzMax Programming/gah! How to clip rotated rectangles.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

From the picture it seems you want to draw a viewport but, because you don't trust Bmax's viewport command, you want to clip the images yourself.
Is that right?
Yes that is correct.

If so, why not 'frame' your images in a fullscreen image with the viewport defined as a masked rectangle? If you want a changeable viewport then draw 4 rectangles on each side of your game screen over the top of your images?
The full screen image is changing and to do a full-screen grab from VRAM takes about 300ms on my PC, so alas this won't work.

So I basically want to:

1) get an image
2) rotate the image
3) draw it rotated except have it clipped to a viewport that I define.

That's it, as per the diagram.

It shouldn't be this hard ;-)