Example #1
0
 // constructors
 public DrawParamCurve(string strColor, float scrWidth,
     bool toDrawEndPoints, DrawParamVec dpEndPoints):
     base(strColor, scrWidth)
 {
     this.toDrawEndPoints=toDrawEndPoints;
     this.dpEndPoints=dpEndPoints;
 }    
Example #2
0
 // constructors
 public DrawParamCurve(string strColor, float scrWidth,
                       bool toDrawEndPoints, DrawParamVec dpEndPoints) :
     base(strColor, scrWidth)
 {
     this.toDrawEndPoints = toDrawEndPoints;
     this.dpEndPoints     = dpEndPoints;
 }
Example #3
0
        /*
         *        METHODS:    I_DRAWABLE
         */
        public void Draw(I_Draw i_Draw, DrawParam dp)
        {
            DrawParamVec dpVec = dp as DrawParamVec;

            if (dpVec != null)
            {
                i_Draw.DrawPnt(this.x, this.y,
                               dpVec.ScrRad, dpVec.StrColor, dpVec.ScrWidth, dpVec.ToFill);
            }
        }
Example #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);
                }
            }
        }
Example #5
0
 override public void ClearRelease()
 {
     this.dpEndPoints=null;
 }
Example #6
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);
            }
        }
Example #7
0
 override public void ClearRelease()
 {
     this.dpEndPoints = null;
 }