Пример #1
0
        /// <summary>
        /// Pop the current state on top of the stack.
        /// </summary>
        public void Pop()
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException("GraphicsStateSetStack");
            }
            if (_StateSetStack.Count == 1)
            {
                throw new InvalidOperationException("stack underflow");
            }

            GraphicsStateSet currentStateSet = Current;

            // Possibly dispose this state set
            currentStateSet.DecRef();
            // Restore previous state set
            _StateSetStack.RemoveLast();
        }