コード例 #1
0
        //---------------------------------------------------------------------
        bool StepV()
        {
            int dist_start;
            int dist_end;
            int dist;
            int dx;
            int s1      = _aa_data.BaseStepV(ref _m_di);
            int Offset0 = LineInterpolatorAAData.MAX_HALF_WIDTH + 2;
            int Offset1 = Offset0;

            dist_start = _m_di.dist_start;
            dist_end   = _m_di.dist_end;
            int npix = 0;

            _aa_data.m_covers[Offset1] = 0;
            if (dist_end > 0)
            {
                if (dist_start <= 0)
                {
                    _aa_data.m_covers[Offset1] = (byte)_ren.GetCover(s1);
                }
                ++npix;
            }
            ++Offset1;
            dx = 1;
            while ((dist = _aa_data.m_dist[dx] - s1) <= _aa_data.m_width)
            {
                dist_start += _m_di.DyStart;
                dist_end   += _m_di.DyEnd;
                _aa_data.m_covers[Offset1] = 0;
                if (dist_end > 0 && dist_start <= 0)
                {
                    _aa_data.m_covers[Offset1] = (byte)_ren.GetCover(dist);
                    ++npix;
                }
                ++Offset1;
                ++dx;
            }

            dx         = 1;
            dist_start = _m_di.dist_start;
            dist_end   = _m_di.dist_end;
            while ((dist = _aa_data.m_dist[dx] + s1) <= _aa_data.m_width)
            {
                dist_start -= _m_di.DyStart;
                dist_end   -= _m_di.DyEnd;
                _aa_data.m_covers[--Offset0] = 0;
                if (dist_end > 0 && dist_start <= 0)
                {
                    _aa_data.m_covers[Offset0] = (byte)_ren.GetCover(dist);
                    ++npix;
                }
                ++dx;
            }
            _ren.BlendSolidHSpan(_aa_data.m_x - dx + 1,
                                 _aa_data.m_y,
                                 Offset1 - Offset0, _aa_data.m_covers,
                                 Offset0);
            return(npix != 0 && ++_aa_data.m_step < _aa_data.m_count);
        }
コード例 #2
0
        bool StepV()
        {
            int dist;
            int dx;
            int s1      = _aa_data.BaseStepV(ref _m_di);
            int Offset0 = LineInterpolatorAAData.MAX_HALF_WIDTH + 2;
            int Offset1 = Offset0;

            _aa_data.m_covers[Offset1++] = (byte)_ren.GetCover(s1);
            dx = 1;
            while ((dist = _aa_data.m_dist[dx] - s1) <= _aa_data.m_width)
            {
                _aa_data.m_covers[Offset1++] = (byte)_ren.GetCover(dist);
                ++dx;
            }

            dx = 1;
            while ((dist = _aa_data.m_dist[dx] + s1) <= _aa_data.m_width)
            {
                _aa_data.m_covers[--Offset0] = (byte)_ren.GetCover(dist);
                ++dx;
            }
            _ren.BlendSolidHSpan(_aa_data.m_x - dx + 1,
                                 _aa_data.m_y,
                                 Offset1 - Offset0,
                                 _aa_data.m_covers, Offset0);
            return(++_aa_data.m_step < _aa_data.m_count);
        }