This topic has not yet been rated - Rate this topic

GraphicsDevice.ScissorRectangle Property

Gets or sets the rectangle used for scissor testing. By default, the size matches the render target size.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

public Rectangle ScissorRectangle { get; set; }

Property Value

If scissor testing is enabled, the rendering area within the render target is defined.
The scissor rectangle is used as a rectangular clipping region. Use ScissorTestEnable to enable scissor testing.
Xbox 360, Windows 7, Windows Vista, Windows XP
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
When to set ScissorRectangle
From Shawn Hargreaves:
The scissor rectangle needs to be set at the point where the SpriteBatch actually sends the sprite data to the GPU. When it does that depends on what SpriteSortMode you use.