コード例 #1
0
 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));
 }
コード例 #2
0
 public ScreenScale(IScreenSize source, IScreenRatio ratio) : base(source)
 {
     Initialize();
     Ratio = ratio;
 }
コード例 #3
0
 public ScreenRatioRatio(IScreenRatio ratioA, IScreenRatio ratioB)
 {
     SourceA = ratioA;
     SourceB = ratioB;
     Initialize();
 }
コード例 #4
0
 public ScreenInverseRatio(IScreenRatio ratio)
 {
     Source = ratio;
     Initialize();
 }
コード例 #5
0
 public static IScreenSize Wpf(this ScreenSizeInPixels source, IScreenRatio ratio) => new ScreenScale(source, ratio);
コード例 #6
0
 public static IScreenSize Scale(this IScreenSize source, IScreenRatio ratio) => new ScreenScale(source, ratio);
コード例 #7
0
 public static IScreenRatio Inverse(this IScreenRatio source) => new ScreenInverseRatio(source);
コード例 #8
0
 public static IScreenRatio Multiply(this IScreenRatio sourceA, IScreenRatio sourceB) => new ScreenRatioRatio(sourceA, sourceB);