コード例 #1
0
            /// <summary>
            /// Computes the matrix for the given transformation.
            /// </summary>
            /// <returns>The transformation matrix representation.</returns>
            public TransformMatrix ComputeMatrix()
            {
                var dx = _x.ToPixel();
                var dy = _y.ToPixel();

                return(new TransformMatrix(1f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 1f, dx, dy, 0f));
            }
コード例 #2
0
            public Single ToPixel()
            {
                var left  = _left.ToPixel();
                var right = _right.ToPixel();

                switch (_op)
                {
                case '+': return(left + right);

                case '-': return(left - right);

                case '*': return(left * right);

                case '/': return(left / right);
                }

                return(0f);
            }
コード例 #3
0
            /// <summary>
            /// Computes the matrix for the given transformation.
            /// </summary>
            /// <returns>The transformation matrix representation.</returns>
            public TransformMatrix ComputeMatrix()
            {
                var dz = _z.ToPixel();

                return(new TransformMatrix(1f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 1f, 0f, 0f, dz));
            }