public static void DrawCloud(WordsCollectionBuilder wcbuilder, WordNormalizator normalizator, IEnumerable<string> words, CloudBuilder cloudBuilder, WordRenderer renderer, RenderTarget target)
        {
            if (wcbuilder == null)
                throw new ArgumentNullException(nameof(wcbuilder));
            if (normalizator == null)
                throw new ArgumentNullException(nameof(normalizator));

            var wordsSorted = wcbuilder(normalizator, words);
            DrawCloud(wordsSorted, cloudBuilder, renderer, target);
        }
        public static void DrawCloud(WordsCollection words, CloudBuilder cloudBuilder, WordRenderer renderer, RenderTarget target)
        {
            if (words == null)
                throw new ArgumentNullException(nameof(words));
            if (cloudBuilder == null)
                throw new ArgumentNullException(nameof(cloudBuilder));
            if (renderer == null)
                throw new ArgumentNullException(nameof(renderer));

            target.Render(g =>
                renderer.Render(cloudBuilder(words, renderer, g), g)
                );
        }
 private IEnumerable<Block> ContinousBuild(IEnumerable<Word> words, WordRenderer renderer, Graphics g) 
     => from word in words
        let sz = renderer.CalculateSize(word, g)
        let region = new RectangleF(g.VisibleClipBounds.Location, g.VisibleClipBounds.Size - sz)
        select new Block(_r.RandomPoint(region), sz) {Data = word};
 public Cloud Build(WordsCollection words, WordRenderer renderer, Graphics g) 
     => new Cloud(ContinousBuild(words, renderer, g));
 public static Cloud BuildCloud(WordsCollection words, WordRenderer renderer, Graphics g)
     => new RandomCloudBuilder().Build(words, renderer, g);
 private static IEnumerable<Block> BuildBlocks(IEnumerable<Word> words, WordRenderer renderer, Graphics g)
 {
     // ReSharper disable once LoopCanBeConvertedToQuery
     foreach (var word in words)
     {
         var sz = renderer.CalculateSize(word, g);
         if (sz.Width > g.VisibleClipBounds.Width || sz.Height > g.VisibleClipBounds.Height)
             continue;
         yield return new Block(new PointF(-sz.Width, -sz.Height), sz) { Data = word };
     }
 }
 public Cloud Build(WordsCollection words, WordRenderer renderer, Graphics g)
 {
     var blocks = BuildBlocks(words, renderer, g).ToList();
     Pack(blocks, g);
     return new Cloud(blocks);
 }