コード例 #1
0
ファイル: Visual.cs プロジェクト: prshreshtha/ultraviolet
        /// <summary>
        /// Returns a transformation matrix which can be used to transform coordinates from this visual to
        /// the specified descendant of this visual.
        /// </summary>
        /// <param name="descendant">The descendnat to which coordinates will be transformed.</param>
        /// <param name="inDevicePixels">A value indicating whether the transform is scaled to device pixels (<c>true</c>) or device-independent pixels (<c>false</c>).</param>
        /// <returns>A <see cref="Matrix"/> which represents the specified transformation.</returns>
        public Matrix GetTransformToDescendantMatrix(Visual descendant, Boolean inDevicePixels = false)
        {
            Contract.Require(descendant, "descendant");

            return descendant.MatrixTransformToAncestorInternal(this, true, inDevicePixels);
        }
コード例 #2
0
        /// <summary>
        /// Returns a transformation matrix which can be used to transform coordinates from this visual to
        /// the specified descendant of this visual.
        /// </summary>
        /// <param name="descendant">The descendnat to which coordinates will be transformed.</param>
        /// <param name="inDevicePixels">A value indicating whether the transform is scaled to device pixels (<see langword="true"/>) or device-independent pixels (<see langword="false"/>).</param>
        /// <returns>A <see cref="Matrix"/> which represents the specified transformation.</returns>
        public Matrix GetTransformToDescendantMatrix(Visual descendant, Boolean inDevicePixels = false)
        {
            Contract.Require(descendant, nameof(descendant));

            return(descendant.MatrixTransformToAncestorInternal(this, true, inDevicePixels));
        }