Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Юдин Павел #198

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove stopwatch
PavelUd committed Jan 30, 2024
commit eff85b91377c2c7c532bdbfb0b1fae0f1288fc30
4 changes: 0 additions & 4 deletions TagsCloud/CloudVisualizer/TagCloudVisualizer.cs
Original file line number Diff line number Diff line change
@@ -31,13 +31,9 @@ public void DrawTagCloud(ISpiral spiral, IEnumerable<WordInfo> wordInfo)

private Tag GetTag(WordInfo wordInfo, ICloudLayouter cloudLayouter)
{
var f = new Stopwatch();
var font = new Font(tagSettings.FontFamily, wordInfo.Count * tagSettings.Size);
var textSize = TextRenderer.MeasureText(wordInfo.Word, font);
f.Start();
var textRectangle = cloudLayouter.PutNextRectangle(new Size(textSize.Width, textSize.Height));
f.Stop();
Console.WriteLine(f.Elapsed);
return new Tag(font, wordInfo.Word, textRectangle, tagSettings.Color);
}