Ejemplo n.º 1
0
		/// <summary>
		/// Removes usage occurrence of color.
		/// </summary>
		/// <param name="index">Index of pixel in bitmap where this color is used.</param>
		/// <returns>New color's usage occurrences count.</returns>
		/// <remarks>Removes only first found index occurrence (if there are duplicates).</remarks>
		internal int RemoveOccurrence(int index)
		{
			UsageOccurrences.Remove(index);
			return OccurrencesCount;
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Adds new usage occurrence of color.
		/// </summary>
		/// <param name="index">Index of pixel in bitmap where this color is used.</param>
		/// <remarks>Can create duplicates!</remarks>
		internal void AddOccurrence(int index)
		{
			UsageOccurrences.Add(index);
		}