예제 #1
0
        public void TagMaker_ShouldGetSizeInDescendingOrder()
        {
            var dict = new Dictionary <string, int> {
                { "asfe", 6 }, { "ava", 2 }, { "sdfs", 1 }
            };
            var dictRect = tagMaker.MakeCloud(dict, Size.Empty);

            dictRect.Select(rect => rect.Value.Height).Should().BeInDescendingOrder();
        }
예제 #2
0
        public void FromTextToImg(string inputPath, string imagePath, Size imageSize)
        {
            var englishWords       = parser.Parse(inputPath);
            var goodEnglishWords   = wordListUpdater.UpdateWordList(englishWords);
            var tagsList           = getterFrequancy.GetProperty(goodEnglishWords);
            var tagsRectanglesDict = tagMaker.MakeCloud(tagsList, imageSize);
            var bitmap             = cloudDrawer.Draw(tagsRectanglesDict);

            bitmap.Save(imagePath);
        }