/// <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); }
/// <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)); }