Documentation ¶
Index ¶
- Constants
- func CalculateFontSize(maxChatNumInOneLine int, width int) float64
- func Export(imgBytes []byte, filePath string) error
- func Generate(text string, width int, height int, fontColor string, externalFontPath string, ...) ([]byte, error)
- func GenerateRandomHexColor() (string, error)
- func LoadFont(fontSize float64, externalFontFilePath string) (font.Face, error)
- func ParseHexColor(s string) (c color.RGBA, err error)
Constants ¶
View Source
const ( MARGIN_PER_LINE = 24 MIN_CHAR_NUM_IN_LINE = 3 )
Variables ¶
This section is empty.
Functions ¶
func CalculateFontSize ¶
CalculateFontSize calculates the font size based on the maximum number of characters in one line and the width.
func GenerateRandomHexColor ¶
GenerateRandomHexColor generates a random hex color.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.