C# Class Nez.ScissorStack

A stack of Rectangle objects to be used for clipping via GraphicsDevice.ScissorRectangle. When a new Rectangle is pushed onto the stack, it will be merged with the current top of stack.The minimum area of overlap is then set as the real top of the stack.
Afficher le fichier Open project: prime31/Nez

Méthodes publiques

Méthode Description
calculateScissors ( Camera camera, Matrix batchTransform, Rectangle scissor ) : Rectangle

Calculates a screen space scissor rectangle using the given Camera. If the Camera is null than the scissor will be calculated only with the batchTransform

calculateScissors ( Camera camera, Matrix2D batchTransform, Rectangle scissor ) : Rectangle

Calculates a screen space scissor rectangle using the given Camera. If the Camera is null than the scissor will be calculated only with the batchTransform

popScissors ( ) : Rectangle

Pops the current scissor rectangle from the stack and sets the new scissor area to the new top of stack rectangle. Any drawing should be flushed before popping scissors.

pushScissors ( Rectangle scissor ) : bool

Method Details

calculateScissors() public static méthode

Calculates a screen space scissor rectangle using the given Camera. If the Camera is null than the scissor will be calculated only with the batchTransform
public static calculateScissors ( Camera camera, Matrix batchTransform, Rectangle scissor ) : Rectangle
camera Camera Camera.
batchTransform Matrix Batch transform.
scissor Microsoft.Xna.Framework.Rectangle Area.
Résultat Microsoft.Xna.Framework.Rectangle

calculateScissors() public static méthode

Calculates a screen space scissor rectangle using the given Camera. If the Camera is null than the scissor will be calculated only with the batchTransform
public static calculateScissors ( Camera camera, Matrix2D batchTransform, Rectangle scissor ) : Rectangle
camera Camera Camera.
batchTransform Matrix2D Batch transform.
scissor Microsoft.Xna.Framework.Rectangle Area.
Résultat Microsoft.Xna.Framework.Rectangle

popScissors() public static méthode

Pops the current scissor rectangle from the stack and sets the new scissor area to the new top of stack rectangle. Any drawing should be flushed before popping scissors.
public static popScissors ( ) : Rectangle
Résultat Microsoft.Xna.Framework.Rectangle

pushScissors() public static méthode

public static pushScissors ( Rectangle scissor ) : bool
scissor Microsoft.Xna.Framework.Rectangle
Résultat bool