Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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();
            }
        }