Emmellsoft.IoT.Rpi.SenseHat.Sprites.SpriteMap.SpriteMap C# (CSharp) Méthode

SpriteMap() public méthode

public SpriteMap ( Color pixels ) : System
pixels Color
Résultat System
		public SpriteMap(Color[,] pixels)
		{
			if (((pixels.GetLength(0) % 8) != 0) || ((pixels.GetLength(1) % 8) != 0))
			{
				throw new ArgumentException("Expecting an image with sides of mutiple of 8 pixels");
			}

			Pixels = pixels;

			SpriteCountHorizontal = Pixels.GetLength(0) / 8;
			SpriteCountVertical = Pixels.GetLength(1) / 8;
		}