From f1cd496f8e28719a9ed5955af664d1b83c710272 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Sun, 22 Mar 2020 23:52:12 -0400 Subject: [PATCH] :wrench: Use distance to corner for maxRadius (#46) --- Module/src/PSWordCloud/NewWordCloudCommand.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Module/src/PSWordCloud/NewWordCloudCommand.cs b/Module/src/PSWordCloud/NewWordCloudCommand.cs index 453ee09..50cb489 100644 --- a/Module/src/PSWordCloud/NewWordCloudCommand.cs +++ b/Module/src/PSWordCloud/NewWordCloudCommand.cs @@ -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) {