The only way to get this done in realtime is using Render2Texture and to draw onto a different surface than your background.
Probleme here is that this restricts the viewport to power of 2 sizes
there are not many other usefull possibilities for graphic cards that are that bad that they do not even support DX6 level stuff like scissortests and its DX pendant which in most cases means: pure 2D cards that will fallback to software emulation and better would use OpenGL than DX7
The only other would defeat its use itself in several cases: Draw black areas after the "to be clipped" stuff has been drawn to just hide the parts you didn't want to draw ie the parts outside the clip area.
Probleme here is that this restricts the viewport to power of 2 sizes
there are not many other usefull possibilities for graphic cards that are that bad that they do not even support DX6 level stuff like scissortests and its DX pendant which in most cases means: pure 2D cards that will fallback to software emulation and better would use OpenGL than DX7
The only other would defeat its use itself in several cases: Draw black areas after the "to be clipped" stuff has been drawn to just hide the parts you didn't want to draw ie the parts outside the clip area.