-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major Rework - Placement, sizing, cleanliness, and speed. (#79)
* 🚧 Rework placement, sizing, & cleanup - Reworked placement algorithms and padding calculations. - Reworked size estimation algorithms to be much more accurate, which makes scaling estimates much more appropriate for the image size and dimensions. - Constrain maximum word widths based on a minimum word length so small words don't scale out of control and require several re-calcs to make things fit. ♻️ Split several things out into separate classes: - Constants.cs - hold constants used for calculations. - Extensions.cs - holds extension methods instead of WCUtils. - LockingRandom.cs - class-based implementation of the threadsafe Random logic that was already being used. - Word.cs - created a new type to simplify handling of words and sizes. * ♻️ bump lang version & is not null * 🔥 Remove `-Words` parameter alias Too similar to `-WordSizes` which was a separate parameter.
- Loading branch information
Showing
10 changed files
with
2,046 additions
and
1,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"omnisharp.enableRoslynAnalyzers": true, | ||
"cSpell.words": [ | ||
"AARRGGBB", | ||
"ARGB", | ||
"RRGGBB", | ||
"wcloud" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace PSWordCloud | ||
{ | ||
internal static class Constants | ||
{ | ||
internal const float BaseAngularIncrement = 360 / 7; | ||
internal const float BleedAreaScale = 1.5f; | ||
internal const float FocusWordScale = 1.15f; | ||
internal const float MaxWordAreaPercent = 0.9f; | ||
internal const float MaxWordWidthPercent = 0.95f; | ||
internal const int MinEffectiveWordWidth = 15; | ||
internal const float PaddingBaseScale = 1.5f; | ||
internal const float StrokeBaseScale = 0.01f; | ||
} | ||
} |
Oops, something went wrong.