Пример #1
0
 void DrawSplineBySmothingThePolyline(PolyIntEdge edgePath, bool optimizeShortEdges) {
     var smoothedPolyline = new SmoothedPolylineCalculator(edgePath, Database.Anchors, OriginalGraph, settings,
                                                           LayerArrays,
                                                           ProperLayeredGraph, Database);
     ICurve spline = smoothedPolyline.GetSpline(optimizeShortEdges);
     if (edgePath.Reversed) {
         edgePath.Curve = spline.Reverse();
         edgePath.UnderlyingPolyline = smoothedPolyline.Reverse().GetPolyline;
     }
     else {
         edgePath.Curve = spline;
         edgePath.UnderlyingPolyline = smoothedPolyline.GetPolyline;
     }
 }
        internal SmoothedPolylineCalculator Reverse()
        {
            SmoothedPolylineCalculator ret = new SmoothedPolylineCalculator(this.edgePath, this.anchors, this.originalGraph, this.settings, this.layerArrays, this.layeredGraph, this.database);
            Site site = this.headSite;
            Site v    = null;

            while (site != null)
            {
                ret.headSite      = site.Clone();
                ret.headSite.Next = v;
                if (v != null)
                {
                    v.Previous = ret.headSite;
                }
                v    = ret.headSite;
                site = site.Next;
            }
            return(ret);
        }
 internal SmoothedPolylineCalculator Reverse() {
     SmoothedPolylineCalculator ret = new SmoothedPolylineCalculator(this.edgePath, this.anchors, this.originalGraph, this.settings, this.layerArrays, this.layeredGraph, this.database);
     Site site = this.headSite;
     Site v = null;
     while (site != null) {
         ret.headSite = site.Clone();
         ret.headSite.Next = v;
         if (v != null)
             v.Previous = ret.headSite;
         v = ret.headSite;
         site = site.Next;
     }
     return ret;
 }
 void DrawSplineBySmothingThePolyline(IntEdge edgePath) {
     var smoothedPolyline = new SmoothedPolylineCalculator(edgePath, Database.Anchors, OriginalGraph, settings,
                                                           LayerArrays,
                                                           ProperLayeredGraph, Database);
     ICurve spline = smoothedPolyline.GetSpline();
     if (edgePath.Reversed) {
         edgePath.Curve = spline.Reverse();
         edgePath.UnderlyingPolyline = smoothedPolyline.Reverse().GetPolyline;
     }
     else {
         edgePath.Curve = spline;
         edgePath.UnderlyingPolyline = smoothedPolyline.GetPolyline;
     }
 }