public bool Equals(IScreenRatio other) { if (other == null) { return(false); } return(!(Math.Abs(X - other.X) > double.Epsilon || Math.Abs(Y - other.Y) > double.Epsilon)); }
public ScreenScale(IScreenSize source, IScreenRatio ratio) : base(source) { Initialize(); Ratio = ratio; }
public ScreenRatioRatio(IScreenRatio ratioA, IScreenRatio ratioB) { SourceA = ratioA; SourceB = ratioB; Initialize(); }
public ScreenInverseRatio(IScreenRatio ratio) { Source = ratio; Initialize(); }
public static IScreenSize Wpf(this ScreenSizeInPixels source, IScreenRatio ratio) => new ScreenScale(source, ratio);
public static IScreenSize Scale(this IScreenSize source, IScreenRatio ratio) => new ScreenScale(source, ratio);
public static IScreenRatio Inverse(this IScreenRatio source) => new ScreenInverseRatio(source);
public static IScreenRatio Multiply(this IScreenRatio sourceA, IScreenRatio sourceB) => new ScreenRatioRatio(sourceA, sourceB);