//--------------------------------------------------------------------
 public void MoveTo(int x1, int y1)
 {
     m_x1 = x1;
     m_y1 = y1;
     if (m_clipping)
     {
         m_f1 = LiangBarskyClipper.GetClippingFlags(x1, y1, m_clip_box);
     }
 }
        //--------------------------------------------------------------------
        public void LineTo(RasterizerCellsAA ras, int x2, int y2)
        {
            if (m_clipping)
            {
                uint f2 = LiangBarskyClipper.GetClippingFlags(x2, y2, m_clip_box);

                if ((m_f1 & 10) == (f2 & 10) && (m_f1 & 10) != 0)
                {
                    // Invisible by Y
                    m_x1 = x2;
                    m_y1 = y2;
                    m_f1 = f2;
                    return;
                }

                int  x1 = m_x1;
                int  y1 = m_y1;
                uint f1 = m_f1;
                int  y3, y4;
                uint f3, f4;

                switch (((f1 & 5) << 1) | (f2 & 5))
                {
                case 0:     // Visible by X
                    LineClipY(ras, x1, y1, x2, y2, f1, f2);
                    break;

                case 1:     // x2 > clip.x2
                    y3 = y1 + MulDiv(m_clip_box.X2 - x1, y2 - y1, x2 - x1);
                    f3 = LiangBarskyClipper.GetClippingFlagsY(y3, m_clip_box);
                    LineClipY(ras, x1, y1, m_clip_box.X2, y3, f1, f3);
                    LineClipY(ras, m_clip_box.X2, y3, m_clip_box.X2, y2, f3, f2);
                    break;

                case 2:     // x1 > clip.x2
                    y3 = y1 + MulDiv(m_clip_box.X2 - x1, y2 - y1, x2 - x1);
                    f3 = LiangBarskyClipper.GetClippingFlagsY(y3, m_clip_box);
                    LineClipY(ras, m_clip_box.X2, y1, m_clip_box.X2, y3, f1, f3);
                    LineClipY(ras, m_clip_box.X2, y3, x2, y2, f3, f2);
                    break;

                case 3:     // x1 > clip.x2 && x2 > clip.x2
                    LineClipY(ras, m_clip_box.X2, y1, m_clip_box.X2, y2, f1, f2);
                    break;

                case 4:     // x2 < clip.x1
                    y3 = y1 + MulDiv(m_clip_box.X1 - x1, y2 - y1, x2 - x1);
                    f3 = LiangBarskyClipper.GetClippingFlagsY(y3, m_clip_box);
                    LineClipY(ras, x1, y1, m_clip_box.X1, y3, f1, f3);
                    LineClipY(ras, m_clip_box.X1, y3, m_clip_box.X1, y2, f3, f2);
                    break;

                case 6:     // x1 > clip.x2 && x2 < clip.x1
                    y3 = y1 + MulDiv(m_clip_box.X2 - x1, y2 - y1, x2 - x1);
                    y4 = y1 + MulDiv(m_clip_box.X1 - x1, y2 - y1, x2 - x1);
                    f3 = LiangBarskyClipper.GetClippingFlagsY(y3, m_clip_box);
                    f4 = LiangBarskyClipper.GetClippingFlagsY(y4, m_clip_box);
                    LineClipY(ras, m_clip_box.X2, y1, m_clip_box.X2, y3, f1, f3);
                    LineClipY(ras, m_clip_box.X2, y3, m_clip_box.X1, y4, f3, f4);
                    LineClipY(ras, m_clip_box.X1, y4, m_clip_box.X1, y2, f4, f2);
                    break;

                case 8:     // x1 < clip.x1
                    y3 = y1 + MulDiv(m_clip_box.X1 - x1, y2 - y1, x2 - x1);
                    f3 = LiangBarskyClipper.GetClippingFlagsY(y3, m_clip_box);
                    LineClipY(ras, m_clip_box.X1, y1, m_clip_box.X1, y3, f1, f3);
                    LineClipY(ras, m_clip_box.X1, y3, x2, y2, f3, f2);
                    break;

                case 9:      // x1 < clip.x1 && x2 > clip.x2
                    y3 = y1 + MulDiv(m_clip_box.X1 - x1, y2 - y1, x2 - x1);
                    y4 = y1 + MulDiv(m_clip_box.X2 - x1, y2 - y1, x2 - x1);
                    f3 = LiangBarskyClipper.GetClippingFlagsY(y3, m_clip_box);
                    f4 = LiangBarskyClipper.GetClippingFlagsY(y4, m_clip_box);
                    LineClipY(ras, m_clip_box.X1, y1, m_clip_box.X1, y3, f1, f3);
                    LineClipY(ras, m_clip_box.X1, y3, m_clip_box.X2, y4, f3, f4);
                    LineClipY(ras, m_clip_box.X2, y4, m_clip_box.X2, y2, f4, f2);
                    break;

                case 12:     // x1 < clip.x1 && x2 < clip.x1
                    LineClipY(ras, m_clip_box.X1, y1, m_clip_box.X1, y2, f1, f2);
                    break;
                }
                m_f1 = f2;
            }
            else
            {
                ras.Line(m_x1, m_y1,
                         x2, y2);
            }
            m_x1 = x2;
            m_y1 = y2;
        }