Exemplo n.º 1
0
        /// <summary>
        /// Pushes the given matrix onto the transform stack.
        /// </summary>
        /// <param name="matrix">The matrix to push.</param>
        /// <remarks>
        /// This method also applies the matrix to the graphics context and the current local clip.
        /// The new local clip is then pushed onto the local clip stack.
        /// </remarks>
        public virtual void PushMatrix(Matrix matrix)
        {
            if (matrix == null)
            {
                return;
            }
            RectangleFx localClip    = LocalClip;
            RectangleFx newLocalClip = MatrixExtensions.InverseTransform(matrix, localClip);

            transformStack.Push(graphics.Transform);
            localClipStack.Push(newLocalClip);
            graphics.MultiplyTransform(matrix);
        }