public void BlendHL(int x1, int y, int x2, Color sourceColor, byte cover) { if (sourceColor.A == 0) { return; } //------------------------------------------------- int len = x2 - x1 + 1; int[] buffer = this.GetBuffer32(); int bufferOffset = GetBufferOffsetXY32(x1, y); int alpha = (((int)(sourceColor.A) * (cover + 1)) >> 8); if (alpha == BASE_MASK) { //full _recvBlender32.CopyPixels(buffer, bufferOffset, sourceColor, len); } else { Color c2 = Color.FromArgb(alpha, sourceColor); do { //copy pixel-by-pixel _recvBlender32.BlendPixel32(buffer, bufferOffset, c2); //bufferOffset += m_DistanceInBytesBetweenPixelsInclusive; bufferOffset++; }while (--len != 0); } //byte[] buffer = GetBuffer(); //int bufferOffset = GetBufferOffsetXY(x1, y); //int alpha = (((int)(sourceColor.A) * (cover + 1)) >> 8); //if (alpha == BASE_MASK) //{ // //full // _recvBlender32.CopyPixels(buffer, bufferOffset, sourceColor, len); //} //else //{ // Color c2 = Color.FromArgb(alpha, sourceColor); // do // { // //copy pixel-by-pixel // _recvBlender32.BlendPixel(buffer, bufferOffset, c2); // bufferOffset += m_DistanceInBytesBetweenPixelsInclusive; // } // while (--len != 0); //} }