Exemple #1
0
        /*
         *        METHODS: I_DRAWABLE
         */
        public void Draw(I_Draw i_draw, DrawParam dp)
        {
            DrawParamCurve dpCurve = dp as DrawParamCurve;

            if (dpCurve == null)
            {
                return;
            }
            if (dpCurve.ToDrawEndPoints)
            {
                this.Cp.Draw(i_draw, dpCurve.DPEndPoints);
            }
        }
Exemple #2
0
        /*
         *        I_DRAWABLE
         */
        public void Draw(I_Draw i_draw, DrawParam dp)
        {
            DrawParamCurve dpCurve = dp as DrawParamCurve;

            if (dpCurve == null)
            {
                return;
            }
            i_draw.DrawBez2(this.cp[0].X, this.cp[0].Y,
                            this.cp[1].X, this.cp[1].Y,
                            this.cp[2].X, this.cp[2].Y,
                            dpCurve.StrColor, dpCurve.ScrWidth);
            if (dpCurve.ToDrawEndPoints)
            {
                this.cp[0].Draw(i_draw, dpCurve.DPEndPoints);
                this.cp[2].Draw(i_draw, dpCurve.DPEndPoints);
            }
        }
Exemple #3
0
        /*
         *        METHODS: I_DRAWABLE
         */
        public void Draw(I_Draw i_draw, DrawParam dp)
        {
            DrawParamCurve dpCurve = dp as DrawParamCurve;

            if (dpCurve != null)
            {
                if (!this.IsDegen)
                {
                    VecD endToDraw = this.Start + i_draw.DrawWorldInfinity * (this as LCurve).DirTang;
                    i_draw.DrawSeg(this.cp[0].X, this.cp[0].Y,
                                   endToDraw.X, endToDraw.Y,
                                   dpCurve.StrColor, dpCurve.ScrWidth);
                }
            }
            if (dpCurve.ToDrawEndPoints)
            {
                this.Cp(0).Draw(i_draw, dpCurve.DPEndPoints);
                this.Cp(1).Draw(i_draw, dpCurve.DPEndPoints);
            }
        }
Exemple #4
0
        /*
         *        METHODS: I_DRAWABLE
         */
        public void Draw(I_Draw i_draw, DrawParam dp)
        {
            DrawParamCurve dpCurve = dp as DrawParamCurve;

            if (dpCurve == null)
            {
                return;
            }
            i_draw.DrawSeg(this.cp[0].X, this.cp[0].Y, this.cp[1].X, this.cp[1].Y,
                           dpCurve.StrColor, dpCurve.ScrWidth);
            if (dpCurve.ToDrawEndPoints)
            {
                DrawParamVec dpEndPoints = dpCurve.DPEndPoints;
                if (dpEndPoints != null)
                {
                    VecD vec = this.cp[0];
                    vec.Draw(i_draw, dpEndPoints);
                    vec = this.cp[1];
                    vec.Draw(i_draw, dpEndPoints);
                }
            }
        }
Exemple #5
0
        /*
         *        METHODS:    I_DRAWABLE
         */

        public void Draw(I_Draw i_draw, DrawParam dp)
        {
            // for debug only - begin

            /*
             * if (this.rayTmp!=null)
             * {
             *  DrawParamCurve dpCurve=new DrawParamCurve("Cyan",1,false,null);
             *  this.rayTmp.Draw(i_draw, dpCurve);
             * }
             */
            // for debug only - end
            DrawParamContour dpContour = dp as DrawParamContour;

            if (dpContour != null)
            {
                DrawParamKnot dpKnot = dpContour.DPKnot;
                if (dpKnot != null)
                {
                    foreach (Knot knot in this.knots)
                    {
                        knot.Draw(i_draw, dpKnot);
                    }
                }
                DrawParamCurve dpCurve = dpContour.DPCurve;
                if (dpCurve != null)
                {
                    for (int poz = 0; poz < this.NumKnot; poz++)
                    {
                        BCurve curve = this.CurveByPoz(poz);
                        if (curve != null)
                        {
                            curve.Draw(i_draw, dpCurve);
                        }
                    }
                }
            }
        }
Exemple #6
0
 override public void Draw(I_Draw i_Draw, DrawParam dp)
 {
     DrawParamGErr dpGErr=dp as DrawParamGErr;
     if (dpGErr==null)
         return;
     int numCont=this.indsKnotStart.Length;
     for (int iCont=0; iCont<numCont; iCont++)
     {
         Contour cont=dpGErr.G.Outl.ContByIndKnot(indsKnotStart[iCont]);
         DrawParamCurve dpCurve=new DrawParamCurve("Pink",2.0F,false,null);
         DrawParamContour dpCont=new DrawParamContour(dpCurve,null);
         cont.Draw(i_Draw, dpCont);
     }
 }
Exemple #7
0
 /*
  *        METHODS:    I_DRAWABLE
  */
 override public void Draw(I_Draw i_draw, DrawParam dp)
 {
     DrawParamGErr dpGErr=dp as DrawParamGErr;
     if (dpGErr==null)
         return;
     foreach (int indKnotStart in this.indsKnotStart)
     {
         Contour cont=dpGErr.G.Outl.ContByIndKnot(indKnotStart);
         DrawParamCurve dpCurve=new DrawParamCurve("Magenta",1.5F,false,null);
         DrawParamContour dpCont=new DrawParamContour(dpCurve,null);
         cont.Draw(i_draw, dpCont);
     }
 }
Exemple #8
0
        /*
         *        METHODS:    I_DRAWABLE
         */
        override public void Draw(I_Draw i_draw, DrawParam dp)
        {
            if (((object)this.bboxCP==null)||((object)this.bboxOutl==null))
                return;
            double xMinCP=this.bboxCP.VecMin.X;
            double yMinCP=this.bboxCP.VecMin.Y;
            double xMaxCP=this.bboxCP.VecMax.X;
            double yMaxCP=this.bboxCP.VecMax.Y;
            double xMinOutl=this.bboxOutl.VecMin.X;
            double yMinOutl=this.bboxOutl.VecMin.Y;
            double xMaxOutl=this.bboxOutl.VecMax.X;
            double yMaxOutl=this.bboxOutl.VecMax.Y;

            SegD seg;
            DrawParamCurve dpCurve;
            if (xMinCP<xMinOutl)
            {
                seg=new SegD(new VecD(xMinOutl,yMinCP),
                    new VecD(xMinOutl,yMaxCP));
                dpCurve=new DrawParamCurve("Orange",1.5F,false,null);
                seg.Draw(i_draw,dpCurve);
            }
            if (yMinCP<yMinOutl)
            {
                seg=new SegD(new VecD(xMinCP,yMinOutl),
                    new VecD(xMaxCP,yMinOutl));
                dpCurve=new DrawParamCurve("Orange",1.5F,false,null);
                seg.Draw(i_draw,dpCurve);
            }
            if (xMaxCP>xMaxOutl)
            {
                seg=new SegD(new VecD(xMaxOutl,yMinCP),
                    new VecD(xMaxOutl,yMaxCP));
                dpCurve=new DrawParamCurve("Orange",1.5F,false,null);
                seg.Draw(i_draw,dpCurve);
            }
            if (yMaxCP>yMaxOutl)
            {
                seg=new SegD(new VecD(xMinCP,yMaxOutl),
                    new VecD(xMaxCP,yMaxOutl));
                dpCurve=new DrawParamCurve("Orange",1.5F,false,null);
                seg.Draw(i_draw,dpCurve);
            }
        }
Exemple #9
0
 override public void Draw(I_Draw i_Draw, DrawParam dp)
 {
     DrawParamGErr dpGErr=dp as DrawParamGErr;
     if (dpGErr==null)
         return;
     foreach (PairInt pair in this.pairsIndGlyphComponent)
     {
         int indGlyph=pair[0];
         Component component=dpGErr.G.Comp.ComponentByIndGlyph(indGlyph);
         for (int pozCont=component.PozContStart; 
             pozCont<component.PozContStart+component.NumCont;
             pozCont++)
         {
             Contour cont=dpGErr.G.Outl.ContourByPoz(pozCont);
             DrawParamCurve dpCurve=new DrawParamCurve("Red",2.0F,false,null);
             DrawParamContour dpCont=new DrawParamContour(dpCurve,null);
             cont.Draw(i_Draw, dpCont);
         }
     }
 }
Exemple #10
0
        override public void Draw(I_Draw i_Draw, DrawParam dp)
        {
            DrawParamGErr dpGErr=dp as DrawParamGErr;
            if (dpGErr==null)
                return;
            foreach (ListInfoInters linters in this.arrLinters)
            {
                foreach (InfoInters inters in linters)
                {
                    switch(inters.GetType().ToString())
                    {
                        case "NS_GMath.IntersD0":
                            IntersD0 intersD0=inters as IntersD0;
                            double x=intersD0.PntInters.X;
                            double y=intersD0.PntInters.Y;
                            i_Draw.DrawPnt(x,y,2.0F,"Red",1,true);
                            break;
                        case "NS_GMath.IntersD1":
                            IntersD1 intersD1=inters as IntersD1;
                            Curve curveInters=intersD1.CurveInters;
                            DrawParamCurve dpCurve=new DrawParamCurve("Red",2.0F,false,null);
                            bool toDrawCurves=(curveInters.BBox.Diag<3.0);
                            try
                            {
                                curveInters.Draw(i_Draw, dpCurve);
                            }
                            catch(System.Exception)
                            {    
                                toDrawCurves=true;
                            }
                        
                            if (toDrawCurves)
                            {
                                CParam cparamInA=intersD1.IpiIn.Par(0) as CParam;
                                BCurve curve=dpGErr.G.Outl.CurveByIndKnot(cparamInA.IndKnot);
                                dpCurve=new DrawParamCurve("Red",2.0F,false,null);
                                curve.Draw(i_Draw, dpCurve);

                                CParam cparamInB=intersD1.IpiIn.Par(1) as CParam;
                                if (cparamInB!=null)
                                {
                                    curve=dpGErr.G.Outl.CurveByIndKnot(cparamInA.IndKnot);
                                    curve.Draw(i_Draw, dpCurve);
                                }
                            }
                            break;
                        default:
                            break;
                    }
                }
            }
        }
Exemple #11
0
 override public void Draw(I_Draw i_Draw, DrawParam dp)
 {
     DrawParamGErr dpGErr=dp as DrawParamGErr;
     if (dpGErr==null)
         return;
     foreach (PairInt pair in this.pairsIndKnotStart)
     {
         Contour cont=dpGErr.G.Outl.ContByIndKnot(pair[0]);
         DrawParamCurve dpCurve=new DrawParamCurve("Orange",2.0F,false,null);
         DrawParamContour dpCont=new DrawParamContour(dpCurve,null);
         cont.Draw(i_Draw, dpCont);
     }
 }
Exemple #12
0
 // members
 override public void ClearRelease()
 {
     this.dpCurve=null;
     this.dpKnot=null;
 }
Exemple #13
0
 // constructors
 public DrawParamContour(DrawParamCurve dpCurve, DrawParamKnot dpKnot)
     : base(null,0)
 {
     this.dpCurve=dpCurve;
     this.dpKnot=dpKnot;
 }
Exemple #14
0
        /*
         *        METHODS:    I_DRAWABLE
         */
        public void Draw(I_Draw i_draw, DrawParam dp)
        {

            if (this.bbox!=null)
            {
                DrawParam dpBBox=new DrawParam("Yellow",0.5F);
                this.bbox.Draw(i_draw, dpBBox);
            }

            if (this.outl!=null)
            {
                DrawParamKnot dpKnot=new DrawParamKnot("Blue",0.5F,1.5F,true);
                DrawParamVec dpEndPoints=new DrawParamVec("Orange",0.5F,0.7F,true);
                
                string colorCurve;
                if (this.typeGlyph==GConsts.TypeGlyph.Composite)
                {
                    colorCurve="Blue";
                }
                else
                {
                    bool isOrientDefined=
                        (this.statusGV[(int)DefsGV.TypeGV.ValidateSimpContMisor].IsValid)&&
                        (this.statusGV[(int)DefsGV.TypeGV.ValidateSimpContMisor].StatusExec==
                        StatusGV.TypeStatusExec.Completed);
                    colorCurve=isOrientDefined? "Blue": "Green";
                }
                DrawParamCurve dpCurve=new DrawParamCurve(colorCurve,1F,true,dpEndPoints);
                DrawParamContour dpContour=new DrawParamContour(dpCurve,dpKnot);
            
                this.outl.Draw(i_draw, dpContour);

                BoxD bboxComputed=this.outl.BBox;
                bboxComputed.SetEnlargeFU();
                DrawParam dpBBoxComputed=new DrawParam("Yellow",0.5F);
                bboxComputed.Draw(i_draw,dpBBoxComputed);
            }
        }
Exemple #15
0
 // members
 override public void ClearRelease()
 {
     this.dpCurve = null;
     this.dpKnot  = null;
 }
Exemple #16
0
 // constructors
 public DrawParamContour(DrawParamCurve dpCurve, DrawParamKnot dpKnot)
     : base(null, 0)
 {
     this.dpCurve = dpCurve;
     this.dpKnot  = dpKnot;
 }