Beispiel #1
0
        /// <summary>
        /// Get color from pixel pos
        /// </summary>
        public Color GetColor(int x, int y)
        {
            Rott2DPixelColor *data = this[x, y];

            return(Color.FromArgb(data->R, data->G, data->B));
            //return Color.FromArgb(data->A, data->R, data->G, data->B);
        }
Beispiel #2
0
        /// <summary>
        /// Set pixel color on pos
        /// </summary>
        public void SetColor(int x, int y, Color color)
        {
            Rott2DPixelColor *data = this[x, y];

            data->R = color.R;
            data->G = color.G;
            data->B = color.B;
            //data->A = color.A;
        }
Beispiel #3
0
 /// <summary>
 /// Fill image with one color
 /// </summary>
 public void SetFill(Color color)
 {
     for (int x = 0; x < this._bitmap.Width; x++)
     {
         for (int y = 0; y < this._bitmap.Height; y++)
         {
             Rott2DPixelColor *data = this[x, y];
             data->R = color.R;
             data->G = color.G;
             data->B = color.B;
             //data->A = color.A;
         }
     }
 }
Beispiel #4
0
 /// <summary>
 /// Set Pointer
 /// </summary>
 private void InitCurrentPixel()
 {
     _pInitPixel = (Rott2DPixelColor *)_pBase;
 }