ratz/src/communication/media/images/wordcloud/wordcloud.go

type wordCount

type word2D

type Wordcloud

type Options

var defaultOptions

type Option

// Path to font file
func FontFile(data []byte) Option {}

// Output file background color
func BackgroundColor(color color.Color) Option {}

// Colors to use for the words
func Colors(colors []color.Color) Option {}

// Max font size
func FontMaxSize(max int) Option {}

// Min font size
func FontMinSize(min int) Option {}

// A list of bounding boxes where words can not be placed.
// See Mask
func MaskBoxes(mask []*Box) Option {}

func Width(w int) Option {}

func Height(h int) Option {}

// Place words randomly
func RandomPlacement(do bool) Option {}

// Draw bounding boxes around words
func Debug() Option {}

// Initialize a wordcloud based on a map of word frequency.
func NewWordcloud(wordList map[string]int32, options ...Option) *Wordcloud {}

func (w *Wordcloud) getPreciseBoundingBoxes(b *Box) []*Box {}

func (w *Wordcloud) setFont(size float64) {}

func (w *Wordcloud) Place(wc wordCount) bool {}

// Draw tries to place words one by one, starting with the ones with the highest counts
func (w *Wordcloud) Draw() image.Image {}

func (w *Wordcloud) nextRandom(width float64, height float64) (x float64, y float64, space bool) {}

type workerData

type res

// Multithreaded word placement
func (w *Wordcloud) nextPos(width float64, height float64) (x float64, y float64, space bool) {}

// test a series of points on a circle and returns as soon as there's a match
func (w *Wordcloud) testRadius(radius float64, points []point, width float64, height float64) res {}