Example #1
0
        /**
         * @return {@link java.util.List} containing points of piecewise linear approximation
         *         for this subpath.
         * @since 5.5.6
         */
        public virtual IList <Point2D> GetPiecewiseLinearApproximation()
        {
            IList <Point2D> result = new List <Point2D>();

            if (segments.Count == 0)
            {
                return(result);
            }

            if (segments[0] is BezierCurve)
            {
                Util.AddAll(result, ((BezierCurve)segments[0]).GetPiecewiseLinearApproximation());
            }
            else
            {
                Util.AddAll(result, segments[0].GetBasePoints());
            }

            for (int i = 1; i < segments.Count; ++i)
            {
                if (segments[i] is BezierCurve)
                {
                    Util.AddAll(result, ((BezierCurve)segments[i]).GetPiecewiseLinearApproximation(), 1);
                }
                else
                {
                    Util.AddAll(result, segments[i].GetBasePoints(), 1);
                }
            }

            return(result);
        }
Example #2
0
 public Path(IList <Subpath> subpaths)
 {
     if (subpaths.Count > 0)
     {
         Util.AddAll(this.subpaths, subpaths);
         currentPoint = this.subpaths[subpaths.Count - 1].GetLastPoint();
     }
 }
Example #3
0
 public TestType(bool v1, sbyte v2, short v3, int v4, long v5, float v6, double v7, Octets v8, string v9, ICollection <bool> v10, ICollection <sbyte> v11, ICollection <int> v12, ICollection <long> v13, ICollection <float> v14, ICollection <double> v15, IDictionary <long, string> v16, IDictionary <TestBean, bool> v17, IDictionary <Octets, TestBean> v18, TestBean v19)
 {
     this.v1  = v1;
     this.v2  = v2;
     this.v3  = v3;
     this.v4  = v4;
     this.v5  = v5;
     this.v6  = v6;
     this.v7  = v7;
     this.v8  = v8 ?? new Octets();
     this.v9  = v9 ?? string.Empty;
     this.v10 = new List <bool>(10); if (v10 != null)
     {
         this.v10.AddRange(v10);
     }
     this.v11 = new LinkedList <sbyte>(); if (v11 != null)
     {
         Util.AddAll(this.v11, v11);
     }
     this.v12 = new LinkedList <int>(); if (v12 != null)
     {
         Util.AddAll(this.v12, v12);
     }
     this.v13 = new HashSet <long>(); if (v13 != null)
     {
         this.v13.UnionWith(v13);
     }
     this.v14 = new HashSet <float>(); if (v14 != null)
     {
         this.v14.UnionWith(v14);
     }
     this.v15 = new HashSet <double>(); if (v15 != null)
     {
         this.v15.UnionWith(v15);
     }
     this.v16 = new Dictionary <long, string>(0); if (v16 != null)
     {
         Util.AddAll(this.v16, v16);
     }
     this.v17 = new SortedDictionary <TestBean, bool>(); if (v17 != null)
     {
         Util.AddAll(this.v17, v17);
     }
     this.v18 = new Dictionary <Octets, TestBean>(); if (v18 != null)
     {
         Util.AddAll(this.v18, v18);
     }
     this.v19 = TestBean.Create();
 }
Example #4
0
 /**
  * Copy constuctor.
  * @param subpath
  */
 public Subpath(Subpath subpath)
 {
     this.startPoint = subpath.startPoint;
     Util.AddAll(this.segments, subpath.GetSegments());
     this.closed = subpath.closed;
 }
Example #5
0
 public void Assign(TestType b)
 {
     this.v1 = b.v1;
     this.v2 = b.v2;
     this.v3 = b.v3;
     this.v4 = b.v4;
     this.v5 = b.v5;
     this.v6 = b.v6;
     this.v7 = b.v7;
     if (this.v8 == null)
     {
         if (b.v8 != null)
         {
             this.v8 = new Octets(b.v8);
         }
     }
     else if (b.v8 != null)
     {
         this.v8.Replace(b.v8);
     }
     else
     {
         this.v8.Clear();
     }
     this.v9 = b.v9 ?? string.Empty;
     if (this.v10 == null)
     {
         this.v10 = new List <bool>(10);
     }
     else
     {
         this.v10.Clear();
     } if (b.v10 != null)
     {
         this.v10.AddRange(b.v10);
     }
     if (this.v11 == null)
     {
         this.v11 = new LinkedList <sbyte>();
     }
     else
     {
         this.v11.Clear();
     } if (b.v11 != null)
     {
         Util.AddAll(this.v11, b.v11);
     }
     if (this.v12 == null)
     {
         this.v12 = new LinkedList <int>();
     }
     else
     {
         this.v12.Clear();
     } if (b.v12 != null)
     {
         Util.AddAll(this.v12, b.v12);
     }
     if (this.v13 == null)
     {
         this.v13 = new HashSet <long>();
     }
     else
     {
         this.v13.Clear();
     } if (b.v13 != null)
     {
         this.v13.UnionWith(v13);
     }
     if (this.v14 == null)
     {
         this.v14 = new HashSet <float>();
     }
     else
     {
         this.v14.Clear();
     } if (b.v14 != null)
     {
         this.v14.UnionWith(v14);
     }
     if (this.v15 == null)
     {
         this.v15 = new HashSet <double>();
     }
     else
     {
         this.v15.Clear();
     } if (b.v15 != null)
     {
         this.v15.UnionWith(v15);
     }
     if (this.v16 == null)
     {
         this.v16 = new Dictionary <long, string>(0);
     }
     else
     {
         this.v16.Clear();
     } if (b.v16 != null)
     {
         Util.AddAll(this.v16, b.v16);
     }
     if (this.v17 == null)
     {
         this.v17 = new SortedDictionary <TestBean, bool>();
     }
     else
     {
         this.v17.Clear();
     } if (b.v17 != null)
     {
         Util.AddAll(this.v17, b.v17);
     }
     if (this.v18 == null)
     {
         this.v18 = new Dictionary <Octets, TestBean>();
     }
     else
     {
         this.v18.Clear();
     } if (b.v18 != null)
     {
         Util.AddAll(this.v18, b.v18);
     }
     if (this.v19 == null)
     {
         this.v19 = TestBean.Create();
     }
     else
     {
         this.v19.Reset();
     } if (b.v19 != null)
     {
         this.v19.Assign(b.v19);
     }
 }