Exemplo n.º 1
0
        public void CreateAndSave(string text, Options options)
        {
            var cloudBrushes = new List <Brush> {
                Brushes.Blue, Brushes.BlueViolet, Brushes.DarkSlateBlue
            };
            var imgSize = new Size(options.ImgWidth, options.ImgHeight);

            var tagsCollection = StatProvider.GetStatistic(text, options.MaxWordQuant);
            var tagRectangles  = TagsCreator.Create(tagsCollection, options.MinFontSize, options.MaxFontSize, options.Font);
            var bitmap         = Renderer.Draw(tagRectangles, imgSize, cloudBrushes);

            bitmap.Save(options.ImgPath);
        }
Exemplo n.º 2
0
        public IEnumerable <Tag> CreateTags(string text, Options options)
        {
            var tagsCollection = StatProvider.GetStatistic(text, options.MaxWordQuant);

            return(TagsCreator.Create(tagsCollection, options.MinFontSize, options.MaxFontSize, options.Font));
        }