Versions in this module Expand all Collapse all v0 v0.0.9 Feb 7, 2023 v0.0.8 Jan 12, 2023 Changes in this version type Card + func (c *Card) Sum64() uint64 type Title + func (t *Title) Sum64() uint64 v0.0.7 Jan 12, 2023 Changes in this version + func DrawRoundShadowedRectangle(canvas *gg.Context, x, y, w, h, r, sr, sigma float64, ox, oy int, ...) + func DrawShadowedRectangle(canvas *gg.Context, x, y, w, h, r, sigma float64, ox, oy int, ...) + func DrawShadowedString(canvas *gg.Context, s, fontfile string, x, y, point, sigma float64, ox, oy int, ...) (err error) + func DrawShadowedStringAnchored(canvas *gg.Context, s, fontfile string, x, y, point, sigma float64, ox, oy int, ...) (err error) type Title + TextFontOffsetPoint float64 + TitleFontOffsetPoint float64 v0.0.6 Jan 11, 2023 v0.0.5 Jan 11, 2023 v0.0.4 Jan 11, 2023 Changes in this version + const DefaultWidth + var ErrNilTextFont = errors.New("nil TextFont") + var ErrNilTitleFont = errors.New("nil TitleFont") + func RandJPColor() (r, g, b int) + func Truncate(fontfile string, texts []string, maxW, fontsize float64) ([]string, error) + type Alignment uint8 + const AlignCenter + const AlignLeft + const AlignRight + const NilAlign + type Card struct + BackgroundImage string + CanTitleShown bool + Height int + IsTextSplitPerElement bool + Text []string + TextFont string + Title string + TitleAlign Alignment + TitleFont string + Width int + func (g *Card) DrawTextCard() (imgForCard image.Image, err error) + type Title struct + ImagePath string + IsEnabled bool + LeftSubtitle string + LeftTitle string + Line int + OffsetX float64 + OffsetY float64 + RightSubtitle string + RightTitle string + TextFont string + TitleFont string + func (t *Title) DrawCard() (imgs image.Image, err error) + func (t *Title) DrawTitle() (imgs image.Image, err error) + func (t *Title) DrawTitleWithText(info []string) (imgs image.Image, err error) v0.0.3 Jan 4, 2023 v0.0.2 Dec 30, 2022 Changes in this version + func Fillet(dst image.Image, r int) image.Image + func RenderText(text, font string, width, fontSize int) (txtPic image.Image, err error) + func Transparency(dst image.Image, magnification float64) image.Image + type TextCardInfo struct + DisplayTitle bool + FontOfText string + FontOfTitle string + High int + Imgpath string + Text []string + TextSetting bool + Title string + TitleSetting string + Width int + func (g TextCardInfo) DrawTextCard() (imgForCard image.Image, err error) type Titleinfo + Fontpath string + Fontpath2 string + Line int v0.0.1 Nov 13, 2022 Changes in this version + const Imgwight + type Titleinfo struct + Imgpath string + Leftsubtitle string + Lefttitle string + Rightsubtitle string + Righttitle string + Status bool + Textpath string + Textpath2 string + func (t Titleinfo) Drawcard() (imgs image.Image, err error) + func (t Titleinfo) Drawtitle() (imgs image.Image, err error) + func (t Titleinfo) Drawtitledtext(info []string) (imgs []byte, err error)