Documentation ¶
Index ¶
- Variables
- func CalcAbs(a int) (ret int)
- func DrawCircle(centerX, centerY, radius, thick int, c color.RGBA, rgba *image.RGBA)
- func DrawDataLineByData(data map[string]int, thick int, rgba *image.RGBA, ...)
- func DrawDataLineByPercentage(data map[string]int, thick int, rgba *image.RGBA, ...)
- func DrawLine(x0, y0, x1, y1, thick int, c color.RGBA, rgba *image.RGBA)
- func DrawString(x, y int, content string, rgba *image.RGBA, fontColor color.RGBA)
- func GCD(x, y int) int
- func GetRadiusRadians(img *image.RGBA, n int) (radius int, radians float64)
- func NewImagePath() (string, error)
- func Pow(x, n int) int
- func SetSize(size ...int) (img image.Rectangle)
- func ToInt(f float64) int
Constants ¶
This section is empty.
Variables ¶
var Config config
Functions ¶
func DrawCircle ¶
func DrawDataLineByData ¶
func DrawDataLineByData(data map[string]int, thick int, rgba *image.RGBA, lineColor, fontColor color.RGBA)
********* Start DrawDataLineByData ******** The first parameter is a map In this map, string is the subject's title on each vertex
func DrawDataLineByPercentage ¶
func DrawDataLineByPercentage(data map[string]int, thick int, rgba *image.RGBA, lineColor, fontColor color.RGBA)
********* Start DrawDataLineByPercentage ******** The first parameter is a map In this map, string is the subject's title on each vertex
func GetRadiusRadians ¶
This function only used for generate point position.
Get Radius according to the img's X & Y axis.
Get Radians according to N and radius.
func NewImagePath ¶
Create a new image
The first parameter(A int array) indicates the maximum value of X-axis & Y-axis
This function could create PNG & JPEG file, you can determine it with a specific imageType string, you can ignore it to use default type -- PNG.
If you enter a wrong imageType string or not supported imageType, it would be change to default imageType.
This function returns a string -- new picture's path.
Types ¶
This section is empty.