Skip to content

Commit

Permalink
🔧 Use distance to corner for maxRadius (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
vexx32 authored Mar 23, 2020
1 parent 47ee65c commit f1cd496
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Module/src/PSWordCloud/NewWordCloudCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@ protected override void EndProcessing()
// Remove all words that were cut from the final rendering list
sortedWordList.RemoveAll(x => !scaledWordSizes.ContainsKey(x));

maxRadius = 9 * Math.Max(viewbox.Width, viewbox.Height) / 16f;
// Max radius should reach to the corner of the image; location is top-left of the box
maxRadius = SKPoint.Distance(viewbox.Location, centrePoint);

if (AllowOverflow)
{
Expand Down

0 comments on commit f1cd496

Please sign in to comment.