Exemple #1
0
        public unsafe void Render(ISurface <ColorBgra> dst, ISurface <ColorBgra> src, Rectangle rect)
        {
            if (rect.Width == 0)
            {
                return;
            }

            for (int y = rect.Top; y < rect.Bottom; ++y)
            {
                DisplacementVector *offset   = this.GetPointAddressUnchecked(rect.Left, y);
                ColorBgra *         dstPixel = (ColorBgra *)dst.GetPointPointer(rect.Left, y);

                for (int x = rect.Left; x < rect.Right; ++x)
                {
                    *dstPixel = src.GetBilinearSample(x + offset->X, y + offset->Y);
                    ++offset;
                    ++dstPixel;
                }
            }
        }