Ejemplo n.º 1
0
            static unsafe void Scan(IScanner src, int y, int w, int* bkg, int dy, int blen, int colorKey, ref int srcX, ref int srcY, ref int maxX, ref int maxY)
            {
                for (int x = 0; x <= w; x++)
                {
                    var i = x + dy;
                    if (i > blen)
                        break;

                    if (bkg[i] == 0 || Colours.RGBEqual(bkg[i], colorKey))
                        continue;
                    Add(src, x, y, bkg[i].Alpha(), ref srcX, ref srcY, ref maxX, ref maxY);
                }
            }
Ejemplo n.º 2
0
            static unsafe void Scan(IScanner src, int y, int w, int* bkg, IBufferPen pen, int dy, int blen, int colorKey, ref int srcX, ref int srcY, ref int maxX, ref int maxY)
            {
                for (int x = 0; x <= w; x++)
                {
                    var i = x + dy;
                    if (i > blen)
                        break;

                    if (bkg[i] == Geometry.TransparentColor ||
                        Colours.RGBEqual(bkg[i], colorKey) ||
                        bkg[i] == pen.ReadPixel(x, y, true))
                        continue;
                    Add(src, x, y, bkg[i].Alpha(), ref srcX, ref srcY, ref maxX, ref maxY);
                }
            }