예제 #1
0
        /// <summary>
        /// Construct a GraphicsStateSetStack representing the current state.
        /// </summary>
        /// <param name="ctx">
        /// A <see cref="GraphicsContext"/> to query the state.
        /// </param>
        public GraphicsStateSetStack(GraphicsContext ctx)
        {
            GraphicsStateSet defaultSet = GraphicsStateSet.GetCurrentStateSet(ctx);

            // The stack always defines a current state
            _StateSetStack.AddLast(defaultSet);
        }
예제 #2
0
        /// <summary>
        /// Construct a GraphicsStateSetStack representing the current state.
        /// </summary>
        /// <param name="ctx">
        /// A <see cref="GraphicsContext"/> to query the state.
        /// </param>
        public GraphicsStateSetStack(GraphicsContext ctx)
        {
            GraphicsStateSet defaultSet = GraphicsStateSet.GetCurrentStateSet(ctx);

            // Avoid a disposition of this state set
            defaultSet.IncRef();
            // The stack always defines a current state
            _StateSetStack.AddLast(defaultSet);
        }