C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

calculateScissors() публичный статический Метод

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.
Результат Microsoft.Xna.Framework.Rectangle

calculateScissors() публичный статический Метод

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.
Результат Microsoft.Xna.Framework.Rectangle

popScissors() публичный статический Метод

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
Результат Microsoft.Xna.Framework.Rectangle

pushScissors() публичный статический Метод

public static pushScissors ( Rectangle scissor ) : bool
scissor Microsoft.Xna.Framework.Rectangle
Результат bool