Skip to content

Commit

Permalink
Create namespace for colorizers
Browse files Browse the repository at this point in the history
  • Loading branch information
jjonescz committed Apr 4, 2022
1 parent ba43e6f commit 06bb048
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion examples/WordFrequency.ConsoleApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using KnowledgePicker.WordCloud;
using KnowledgePicker.WordCloud.Coloring;
using KnowledgePicker.WordCloud.Drawing;
using KnowledgePicker.WordCloud.Layouts;
using KnowledgePicker.WordCloud.Primitives;
Expand Down Expand Up @@ -56,7 +57,7 @@ static int Main(string[] args)
var sizer = new LogSizer(wordCloud);
using var engine = new SkGraphicEngine(sizer, wordCloud);
var layout = new SpiralLayout(wordCloud);
var colorizer = new RandomColorizer(); //new DefaultColorizer(); uses default color set in WordCloudInput
var colorizer = new RandomColorizer(); //new DefaultColorizer(); uses default color set in WordCloudInput
var wcg = new WordCloudGenerator<SKBitmap>(wordCloud, engine, layout, colorizer);

// Draw the bitmap on white background.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace KnowledgePicker.WordCloud.Drawing
namespace KnowledgePicker.WordCloud.Coloring
{
/// <summary>
/// Gets the default color set in the WordCloudInput
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace KnowledgePicker.WordCloud.Drawing
namespace KnowledgePicker.WordCloud.Coloring
{
public interface IColorizer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Drawing;

namespace KnowledgePicker.WordCloud.Drawing
namespace KnowledgePicker.WordCloud.Coloring
{
/// <summary>
/// Allows random colors for the word cloud text
Expand Down
3 changes: 2 additions & 1 deletion src/KnowledgePicker.WordCloud/WordCloudGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using KnowledgePicker.WordCloud.Coloring;
using KnowledgePicker.WordCloud.Drawing;
using KnowledgePicker.WordCloud.Layouts;
using KnowledgePicker.WordCloud.Primitives;
Expand Down Expand Up @@ -61,7 +62,7 @@ private T Process<T>(
/// cref="IGraphicEngine{TBitmap}.Bitmap"/>.
/// </summary>
public TBitmap Draw()
{
{
return Process((engine, items) =>
{
// Draw words.
Expand Down

0 comments on commit 06bb048

Please sign in to comment.