Documentation
¶
Overview ¶
Package rendercard ...
Index ¶
Constants ¶
View Source
const (
// Imgwight 图像宽
Imgwight = 1272.0
)
Variables ¶
This section is empty.
Functions ¶
func RenderText ¶ added in v0.0.2
RenderText 文字转图片 width 是图片宽度
Types ¶
type TextCardInfo ¶ added in v0.0.2
type TextCardInfo struct {
// 卡片规格:宽度,默认600
Width int
// 卡片规格:高度,默认由Title+Text内容决定
High int
// 卡片规格:背景图
Imgpath string
// 标题字体
FontOfTitle string
// 正文的字体
FontOfText string
// 标题规格:标题内容
Title string
// 是否显示标题
DisplayTitle bool
// 标题规格:标题布局[Left|Center|Right],默认Left
TitleSetting string
// 正文规格:正文内容
Text []string
// 正文规格:正文要求
//
// true为每个元素按行显示,false按空格分割显示;
TextSetting bool
}
TextCardInfo ...
func (TextCardInfo) DrawTextCard ¶ added in v0.0.2
func (g TextCardInfo) DrawTextCard() (imgForCard image.Image, err error)
DrawTextCard 绘制文字卡片
type Titleinfo ¶
type Titleinfo struct {
// 行数
Line int
// 左侧两行文本
Lefttitle string
Leftsubtitle string
// 右侧两行文本
Righttitle string
Rightsubtitle string
// 图片路径
Imgpath string
// 字体路径
Fontpath string
Fontpath2 string
// 状态
Status bool
}
Titleinfo ...
Click to show internal directories.
Click to hide internal directories.