Skip to content

Commit f1cd496

Browse files
authored
🔧 Use distance to corner for maxRadius (#46)
1 parent 47ee65c commit f1cd496

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Module/src/PSWordCloud/NewWordCloudCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,8 @@ protected override void EndProcessing()
686686
// Remove all words that were cut from the final rendering list
687687
sortedWordList.RemoveAll(x => !scaledWordSizes.ContainsKey(x));
688688

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

691692
if (AllowOverflow)
692693
{

0 commit comments

Comments
 (0)