Ejemplo n.º 1
0
		private Match DoMatch(Point index, Palette palette, DeltaEMap scoreMap, FilteredMap filter, Picker picker)
		{
			// We'll choose our centerpoint so the first picker lines up with the found color
			var zeroPoint = new Point(index.X - picker.FirstCursor.X, index.Y - picker.FirstCursor.Y);

			var selectedColors = new List<SelectedColor>();

			foreach (var cursor in picker.Cursors)
			{
				var p = zeroPoint.TileOffset(cursor.X, cursor.Y, palette.Width, palette.Height);
				selectedColors.Add(new SelectedColor(p, Color.FromArgb(palette[p.Y, p.X]), scoreMap[p.Y, p.X], filter[p.Y, p.X]));
			}

			return new Match(selectedColors, zeroPoint);
		}