Releases: knowledgepicker/word-cloud
Releases · knowledgepicker/word-cloud
v1.3.1
💅 Improvements
- You can get color for an item from
WordCloudGenerator
- it uses the configured colorizer (and returnsnull
if the colorizer doesn't provide color - to avoid that, you can useGetColorHexStringOrDefault
which returns the text color configured inWordCloudInput
or black). For example, in a loop:var wcg = new WordCloudGenerator<SKBitmap>(...); foreach (var (item, fontSize) in wcg.Arrange()) { var color = wcg.GetColorHexString(item); // ... }
v1.3.0
🚀 Features
- Current word is passed to colorizer (#20).
⚠️ This is a breaking change if you implementIColorizer
yourself.- There's also new
SpecificColorizer
. It can be used as follows (see README for details):var colorizer = new SpecificColorizer( new Dictionary<string, Color> { ["KnowledgePicker"] = Color.FromArgb(0x0f3057), ["WordCloud"] = Color.FromArgb(0xe25a5a) }, fallback: new RandomColorizer()); // fallback argument is optional
- There's also new
🐛 Bug fixes
- Fixed cloned graphic engine not being disposed properly.