public void SolidColorBrush()
		{
			var brush = new SolidColorBrush {Color = Color.Red};
			ExtendedMaterial res = brush.Convert(_converter);
			CheckColorsEqual(brush.Color, res.MaterialD3D.Diffuse);
			ExtendedMaterial res2 = new SolidColorBrush {Color = Color.Yellow}.Convert(_converter);
			CheckMaterial(Color.Yellow, res2.MaterialD3D);
		}
		public void LoadTest()
		{
			var sw = new Stopwatch();
			sw.Start();
			for(int i = 0; i < 1000000; i++)
			{
				var brush = new SolidColorBrush
				            	{
				            		Color = GetRandomColor()
				            	};
				ExtendedMaterial res = brush.Convert(_converter);
				CheckColorsEqual(brush.Color, res.MaterialD3D.Diffuse);
			}
			sw.Stop();
			Console.WriteLine(sw.ElapsedMilliseconds);
		}
Exemple #3
0
		public bool Equals(SolidColorBrush other)
		{
			if(ReferenceEquals(null, other)) return false;
			if(ReferenceEquals(this, other)) return true;
			return Color.RgbEquals(other.Color);
		}