Ejemplo n.º 1
0
        public ITagsCloud CreateCloud(List <string> words, Size minLetterSize)
        {
            var wordsSizes = wordsSizer.GetWordsSizes(words, minLetterSize);

            foreach (var pair in wordsSizes)
            {
                var rectangle = layouter.PutNextRectangle(pair.Value);
                layouter.TagsCloud.AddWord(new TagsCloudWord(pair.Key, rectangle));
            }

            return(layouter.TagsCloud);
        }
Ejemplo n.º 2
0
        public Result <ITagsCloud> CreateCloud(ReadOnlyCollection <string> words, Size minLetterSize)
        {
            var wordsSizes = wordsSizer.GetWordsSizes(words.ToList(), minLetterSize);

            foreach (var pair in wordsSizes)
            {
                var rectangle = layouter.PutNextRectangle(pair.Value);
                layouter.TagsCloud.AddWord(new TagsCloudWord(pair.Key, rectangle));
            }

            return(Result.Ok(layouter.TagsCloud));
        }