This project is read-only.

ScissorRectangle alternatives?

Sep 7, 2012 at 7:03 AM

I don't see screenManager.GraphicsDevice.ScissorRectangle in the code, which leads me to believe it isn't implemented. However, I noticed in the Captain Sretchy-Arms Silverlight Demo, that when the Doctor shoots a block with his laser, the expanding red circle on it is clipped to the block rectangle.

Is there another way I can implement ScissorRectangle? I just need it to clip some scrollable UI lists. If you could point me in the right direction, I would really appreciate it.

Jared

Oct 1, 2012 at 1:12 PM

Hi Jared,

Sorry for the late reply (I don't really check these forums regularly - if anyone has any urgent questions, please email me).

Captain Stretchy-Arms is setting GraphicsDevice.Viewport for this effect. A viewport is basically equivalent to a scissor rectangle, but a viewport will change the effective size of the display (whereas a scissor rectangle clips without changing the size).

Sorry I never got around to implementing scissor rectangle :)

Cheers,
Andrew 

Oct 1, 2012 at 4:04 PM

Thanks for the reply. I'll take a look into the Viewport stuff.

I really appreciate ExEn for Silverlight. I'm trying to implement a silverlight version of my game for Facebook. At first I used SilverSprite's implementation using Silverlight 5. It turns out that if I use the new Silverlight 5 stuff, I get totally messed over with regards to the user experience. The reason is that Silverlight 5 with the xna stuff, requires the user to "Allow" my game to use the graphics acceleration. For a user to "Allow" my game, they must right click on the silverlight appliction, click "silverlight" menu item, click the "Permissions" tab, scroll to find my web url, click on my web url, click the "Allow" button, then click "ok".

That user flow is absolutely ridiculous and would stop a huge percentage of the users from even getting in to play the game. As far as I can tell, ExEn's Silverlight 4 implementation is the best solution to this issue. So, once again, Thank you very much for what you have implemented!

Thanks,

Jared Reed