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); }
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)); }