public override void Visit(ref CCAffineTransform parentWorldTransform) { if (Stencil == null || !Stencil.Visible) { if (Inverted) { // draw everything base.Visit(ref parentWorldTransform); } return; } if (DrawManager.BeginDrawMask(new CCRect(Viewport.Bounds), Inverted, AlphaThreshold)) { DrawManager.PushMatrix();; Stencil.Visit(ref parentWorldTransform); DrawManager.PopMatrix(); DrawManager.EndDrawMask(); base.Visit(ref parentWorldTransform); DrawManager.EndMask(); } else { base.Visit(ref parentWorldTransform); } }
public override void Visit() { if (Stencil == null || !Stencil.Visible) { if (Inverted) { // draw everything base.Visit(); } return; } if (Window.DrawManager.BeginDrawMask(Viewport.ViewportInPixels, Inverted, AlphaThreshold)) { Window.DrawManager.PushMatrix(); Transform(); Stencil.Visit(); Window.DrawManager.PopMatrix(); Window.DrawManager.EndDrawMask(); base.Visit(); Window.DrawManager.EndMask(); } else { base.Visit(); } }