NewTOAPIA.Drawing.span_image_filter_rgba_nn.generate C# (CSharp) Method

generate() public method

public generate ( RGBA_Bytes span, int spanIndex, int x, int y, int len ) : void
span RGBA_Bytes
spanIndex int
x int
y int
len int
return void
        public override void generate(RGBA_Bytes[] span, int spanIndex, int x, int y, int len)
        {
            IImage SourceRenderingBuffer = base.source().DestImage;
            ISpanInterpolator spanInterpolator = base.interpolator();
            spanInterpolator.begin(x + base.filter_dx_dbl(), y + base.filter_dy_dbl(), len);
            do
            {
                int x_hr;
                int y_hr;
                spanInterpolator.coordinates(out x_hr, out y_hr);
                int x_lr = x_hr >> (int)image_subpixel_scale_e.image_subpixel_shift;
                int y_lr = y_hr >> (int)image_subpixel_scale_e.image_subpixel_shift;
                int bufferIndex;
                byte[] fg_ptr = SourceRenderingBuffer.GetPixelPointerXY(y_lr, x_lr, out bufferIndex);
                span[spanIndex].m_R = fg_ptr[ImageBuffer.OrderR];
                span[spanIndex].m_G = fg_ptr[ImageBuffer.OrderG];
                span[spanIndex].m_B = fg_ptr[ImageBuffer.OrderB];
                span[spanIndex].m_A = fg_ptr[ImageBuffer.OrderA];
                ++spanIndex;
                spanInterpolator.Next();
            } while (--len != 0);
        }
    };
span_image_filter_rgba_nn