FixDegenBisectrixStart() public static method

fix_degeneration_bisectrix_start
public static FixDegenBisectrixStart ( LineParameters lp, int &x, int &y ) : void
lp LineParameters
x int
y int
return void
コード例 #1
0
        void Line1NoClip(LineParameters lp, int sx, int sy)
        {
            if (lp.len > LineAA.MAX_LENGTH)
            {
                LineParameters lp1, lp2;
                lp.Divide(out lp1, out lp2);
                Line1NoClip(lp1, (lp.x1 + sx) >> 1, (lp.y1 + sy) >> 1);
                Line1NoClip(lp2, lp1.x2 + (lp1.y2 - lp1.y1), lp1.y2 - (lp1.x2 - lp1.x1));
                return;
            }

            LineAA.FixDegenBisectrixStart(lp, ref sx, ref sy);
            LineInterpolatorAA1 li = new LineInterpolatorAA1(this, lp, sx, sy);

            if (li.IsVertical)
            {
                while (li.StepV())
                {
                    ;
                }
            }
            else
            {
                while (li.StepH())
                {
                    ;
                }
            }
        }
コード例 #2
0
        void Line3NoClip(LineParameters lp,
                         int sx, int sy, int ex, int ey)
        {
            if (lp.len > LineAA.MAX_LENGTH)
            {
                LineParameters lp1, lp2;
                lp.Divide(out lp1, out lp2);
                int mx = lp1.x2 + (lp1.y2 - lp1.y1);
                int my = lp1.y2 - (lp1.x2 - lp1.x1);
                Line3NoClip(lp1, (lp.x1 + sx) >> 1, (lp.y1 + sy) >> 1, mx, my);
                Line3NoClip(lp2, mx, my, (lp.x2 + ex) >> 1, (lp.y2 + ey) >> 1);
                return;
            }

            LineAA.FixDegenBisectrixStart(lp, ref sx, ref sy);
            LineAA.FixDegenBisectrixEnd(lp, ref ex, ref ey);
            LineInterpolatorAA3 li = new LineInterpolatorAA3(this, lp, sx, sy, ex, ey);

            if (li.IsVertical)
            {
                while (li.StepV())
                {
                    ;
                }
            }
            else
            {
                while (li.StepH())
                {
                    ;
                }
            }
        }
コード例 #3
0
        void Line1NoClip(LineParameters lp, int sx, int sy)
        {
            if (lp.len > LineAA.MAX_LENGTH)
            {
                LineParameters lp1, lp2;
                lp.Divide(out lp1, out lp2);
                Line1NoClip(lp1, (lp.x1 + sx) >> 1, (lp.y1 + sy) >> 1);
                Line1NoClip(lp2, lp1.x2 + (lp1.y2 - lp1.y1), lp1.y2 - (lp1.x2 - lp1.x1));
                return;
            }

            LineAA.FixDegenBisectrixStart(lp, ref sx, ref sy);
            LineInterpolatorAA1 li = new LineInterpolatorAA1(this, lp, sx, sy);

            li.Loop();
        }