public Bitmap CreateCloud(string inputFile, int width, int height) { if (!wordsReader.CanHandle(inputFile)) { throw new Exception($"Could not read file {inputFile}"); } var inputWords = wordsReader.GetAllWords(inputFile); var wordsSizes = normalizer.NormalizeToWordsSizes(inputWords); Rectangle maze; var wordsContainers = wordsLayouter.GetWordsLayout(wordsSizes, out maze); return(layoutPainter.GetImage(wordsContainers, maze.Width, maze.Height)); }
public WordsRepository(IWordsReader wordsReader) { _wordsReader = wordsReader; _allWords = wordsReader.GetAllWords(); }