Example #1
0
 /// <summary>
 /// Access value at pixel
 /// </summary>
 /// <param name="pixel">Pixel</param>
 /// <returns>Value at pixel</returns>
 public T this[System.Drawing.Point pixel] {
     get {
         return(_data[IndexHelper.ArrayIndexFromPixel(pixel, _size)]);
     }
     set {
         _data[IndexHelper.ArrayIndexFromPixel(pixel, _size)] = value;
     }
 }
Example #2
0
 /// <summary>
 /// Test was set previously.
 /// </summary>
 /// <remarks>Uses comparison with default(T).</remarks>
 /// <param name="pixel">Pixel</param>
 /// <returns>True if pixel-value was set previously</returns>
 public bool IsSet(System.Drawing.Point pixel)
 {
     return(!EqualityComparer <T> .Default.Equals(
                _data[IndexHelper.ArrayIndexFromPixel(pixel, _size)],
                default(T)));
 }