/// <inheritdoc/> public bool Equals([AllowNull] System.Windows.DpiScale other) { return (Precision.AlmostEqual(this.DpiScaleX, other.DpiScaleX) && Precision.AlmostEqual(this.DpiScaleY, other.DpiScaleY)); }
/// <summary> /// Initializes a new instance of the <see cref="DpiScale"/> structure. /// </summary> /// <param name="dpiScale">DPI scale on the X axis.</param> public DpiScale(System.Windows.DpiScale dpiScale) { dotsPerInchX = (uint)dpiScale.PixelsPerInchX; dotsPerInchY = (uint)dpiScale.PixelsPerInchY; }
public static DpiScale Into(this WpfDpiScale dpi) => new DpiScale((float)dpi.DpiScaleX, (float)dpi.DpiScaleY);