Tinkr2/4.2/AphelionCore/AphelionCore/Graphics/Image32.cs
/// <summary>
/// Draws image onto a supplied bitmap
/// </summary>
/// <param name="x">Destination X</param>
/// <param name="y">Destination Y</param>
/// <param name="dest">Destination bitmap</param>
/// <param name="srcX">Source X</param>
/// <param name="srcY">Source Y</param>
/// <param name="width">Source width</param>
/// <param name="height">Source height</param>
Draws image onto a supplied bitmap
Draws image onto a supplied bitmap
public void Draw(int x, int y, Bitmap dest, int srcX, int srcY, int width, int height)
      {
         int i = 0;
         lock (dest)
         {
            dest.DrawRectangle(Color.White, 0, x, y, width, height, 0, 0, Color.White, 0, 0, Color.White, 0, 0, 256);
            dest.DrawImage(x, y, _bmp, srcX, srcY, width, height);
            while (i < _pixels.Length)
            {
               var c = _pixels[i++];
               if (c.X >= srcX && c.X < srcX + width && c.Y >= srcY && c.Y < srcY + height)
                  dest.DrawRectangle(Color.Black, 0, c.X + x - srcX, c.Y + y - srcY, 1, 1, 0, 0, c.Color, 0, 0, c.Color, 0, 0, c.Alpha);
            }
         }
      }
public void Draw ( int x , int y , Bitmap dest , int srcX , int srcY , int width , int height ) { int i = 0 ; lock ( dest ) { dest . DrawRectangle ( Color . White , 0 , x , y , width , height , 0 , 0 , Color . White , 0 , 0 , Color . White , 0 , 0 , 256 ) ; dest . DrawImage ( x , y , _bmp , srcX , srcY , width , height ) ; while ( i < _pixels . Length ) { var c = _pixels [ i ++ ] ; if ( c . X >= srcX && c . X < srcX + width && c . Y >= srcY && c . Y < srcY + height ) dest . DrawRectangle ( Color . Black , 0 , c . X + x - srcX , c . Y + y - srcY , 1 , 1 , 0 , 0 , c . Color , 0 , 0 , c . Color , 0 , 0 , c . Alpha ) ; } } }
Draws image onto a supplied bitmap
Draws image onto a supplied bitmap
x
int
None
y
int
None
dest
Bitmap
None
srcX
int
None
srcY
int
None
width
int
None
height
int
None