private void AddRandomSegment(IGeometrySink sink) { double which = Random.NextDouble(); if (which < 0.25) { sink.AddLine(RandomNearPoint()); } else if (which < 0.5) { sink.AddArc(RandomArc()); } else if (which < 0.75) { sink.AddBezier(RandomBezier()); } else if (which < 1.0) { sink.AddQuadraticBezier(RandomQuadraticBezier()); } }
private void AddRandomSegment(IGeometrySink sink) { double which = Random.NextDouble(); if (which < 0.25) sink.AddLine(RandomNearPoint()); else if (which < 0.5) sink.AddArc(RandomArc()); else if (which < 0.75) sink.AddBezier(RandomBezier()); else if (which < 1.0) sink.AddQuadraticBezier(RandomQuadraticBezier()); }