Пример #1
0
        /*
         * //-------------------------------------------------------------------------
         * public void semidot(Cmp, int, int, int, int)
         * {
         * }
         *
         * //-------------------------------------------------------------------------
         * public void pie(int, int, int, int, int, int)
         * {
         * }
         *
         * //-------------------------------------------------------------------------
         * public void line0(line_parameters)
         * {
         * }
         *
         * //-------------------------------------------------------------------------
         * public void line1(line_parameters, int, int)
         * {
         * }
         *
         * //-------------------------------------------------------------------------
         * public void line2(line_parameters, int, int)
         * {
         * }
         */

        //-------------------------------------------------------------------------
        public void line3_no_clip(line_parameters lp,
                                  int sx, int sy, int ex, int ey)
        {
            if (lp.len > LineAABasics.line_max_length)
            {
                line_parameters lp1, lp2;
                lp.divide(lp1, lp2);
                int mx = lp1.x2 + (lp1.y2 - lp1.y1);
                int my = lp1.y2 - (lp1.x2 - lp1.x1);
                line3_no_clip(lp1, (lp.x1 + sx) >> 1, (lp.y1 + sy) >> 1, mx, my);
                line3_no_clip(lp2, mx, my, (lp.x2 + ex) >> 1, (lp.y2 + ey) >> 1);
                return;
            }

            LineAABasics.fix_degenerate_bisectrix_start(lp, ref sx, ref sy);
            LineAABasics.fix_degenerate_bisectrix_end(lp, ref ex, ref ey);
            line_interpolator_image li = new line_interpolator_image(*this, lp,
                                                                     sx, sy,
                                                                     ex, ey,
                                                                     m_start, m_scale_x);

            if (li.vertical())
            {
                while (li.step_ver())
                {
                    ;
                }
            }
            else
            {
                while (li.step_hor())
                {
                    ;
                }
            }
            m_start += uround(lp.len / m_scale_x);
        }
        /*
        //-------------------------------------------------------------------------
        public void semidot(Cmp, int, int, int, int)
        {
        }

        //-------------------------------------------------------------------------
        public void pie(int, int, int, int, int, int)
        {
        }

        //-------------------------------------------------------------------------
        public void line0(line_parameters)
        {
        }

        //-------------------------------------------------------------------------
        public void line1(line_parameters, int, int)
        {
        }

        //-------------------------------------------------------------------------
        public void line2(line_parameters, int, int)
        {
        }
         */

        //-------------------------------------------------------------------------
        public void line3_no_clip(line_parameters lp, 
                           int sx, int sy, int ex, int ey)
        {
            if(lp.len > LineAABasics.line_max_length)
            {
                line_parameters lp1, lp2;
                lp.divide(lp1, lp2);
                int mx = lp1.x2 + (lp1.y2 - lp1.y1);
                int my = lp1.y2 - (lp1.x2 - lp1.x1);
                line3_no_clip(lp1, (lp.x1 + sx) >> 1, (lp.y1 + sy) >> 1, mx, my);
                line3_no_clip(lp2, mx, my, (lp.x2 + ex) >> 1, (lp.y2 + ey) >> 1);
                return;
            }
            
            LineAABasics.fix_degenerate_bisectrix_start(lp, ref sx, ref sy);
            LineAABasics.fix_degenerate_bisectrix_end(lp, ref ex, ref ey);
            line_interpolator_image li = new line_interpolator_image(*this, lp, 
                                                  sx, sy, 
                                                  ex, ey, 
                                                  m_start, m_scale_x);
            if(li.vertical())
            {
                while(li.step_ver());
            }
            else
            {
                while(li.step_hor());
            }
            m_start += uround(lp.len / m_scale_x);
        }