Documentation
¶
Index ¶
- Constants
- func Angle2Pi(angle float64) float64
- func CeilT(value float64) float64
- func Clear(dc *gg.Context)
- func CosT(angle float64) float64
- func DrawText(dc *gg.Context, text string, xpos, ypos, rotation float64)
- func GetTextBound(measureDc *gg.Context, text string) (w, h, xdiff, ydiff float64)
- func Rotate(grid *Grid, angle float64, centerX, centerY int)
- func SinT(angle float64) float64
- type CheckResult
- type Grid
- type Position
- type WordCloudRender
- type WorldMap
Constants ¶
View Source
const ( IS_NOT_FIT = 1 IS_FIT = 2 OUT_INDEX = 3 DEGREE_360 = 360 DEGREE_180 = 180 IS_EMPTY = 0 XUNIT = 2 YUNIT = 2 )
Variables ¶
This section is empty.
Functions ¶
func GetTextBound ¶
Types ¶
type Grid ¶
type Grid struct { Width int Height int XScale int YScale int // contains filtered or unexported fields }
func (*Grid) SetCollisionMap ¶
type Position ¶
func NewPosition ¶
type WordCloudRender ¶
type WordCloudRender struct { MaxFontSize float64 MinFontSize float64 FontPath string OutlineImgPath string MeasureDc *gg.Context DrawDc *gg.Context TextList []string Angles []int Colors []*color.RGBA OutImgPath string // contains filtered or unexported fields }
func NewWordCloudRender ¶
func (*WordCloudRender) Render ¶
func (w *WordCloudRender) Render()
func (*WordCloudRender) ResetMeasureDc ¶
func (w *WordCloudRender) ResetMeasureDc(fontSize float64)
func (*WordCloudRender) UpdateFontSize ¶
func (w *WordCloudRender) UpdateFontSize(fontSize float64)
Click to show internal directories.
Click to hide internal directories.