示例#1
0
 public GraphicsState Save()
 {
     var currentState = new GraphicsState(this);
     restoreStack.Push(currentState);
     return currentState;
 }
示例#2
0
        public void Restore(GraphicsState state)
        {
            var restoreState = restoreStack.Pop();
            if (state != restoreState) {
                throw new Exception("UG.Graphics Restore state match failure");
            }

            restoreState.Restore();
        }