text

package
Version: v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTextImage

func GenerateTextImage(texts []Text, bgImage image.Image) (image.Image, error)

生成文字图片

func GenerateTextImageFile

func GenerateTextImageFile(texts []Text, bgImagePath string) (image.Image, error)

生成文字图片文件

Types

type Text

type Text struct {
	TextFont
	Tps []TextPt `json:"tps"`
}

字体综合

type TextFont

type TextFont struct {
	Path  string      `json:"path"`
	DPI   float64     `json:"dpi"`
	Size  float64     `json:"size"`
	Color color.Color `json:"color"`
}

字体:路径、像素、尺码、颜色

type TextPt

type TextPt struct {
	Value string `json:"value"`
	X     int    `json:"x"`
	Y     int    `json:"y"`
}

文本:内容及坐标

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL