Documentation ¶
Index ¶
- func BgColor(color *image.Uniform) textDrawOption
- func BgHexColor(hex string) textDrawOption
- func BoxAlign(align box.Align) textDrawOption
- func BoxPadding(bp config.Padding) textDrawOption
- func BoxSpacing(px int) textDrawOption
- func FgColor(color *image.Uniform) textDrawOption
- func FgHexColor(hex string) textDrawOption
- func FontFace(ff font.Face) textDrawOption
- func FontFaceFromFFA(ffa *fontfamily.FontFamily, style fontfamily.Style, size float64) textDrawOption
- func Hex(hex string) (*image.Uniform, error)
- func LineSpacing(px int) textDrawOption
- func LoadFromFile(filename string) (image.Image, error)
- func MaxWidth(max int) textDrawOption
- func SaveAsPNG(filename string, img image.Image) error
- type Canvas
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoxPadding ¶
BoxPadding sets box padding(px).
func FontFaceFromFFA ¶
func FontFaceFromFFA(ffa *fontfamily.FontFamily, style fontfamily.Style, size float64) textDrawOption
FontFaceFromFFA sets font face from FontFamily.
func LineSpacing ¶
func LineSpacing(px int) textDrawOption
LineSpace sets line space(px) of multi-line text.
func LoadFromFile ¶
LoadFromFile loads an image file and generate image.Image from it. Supported image types are JPEG and PNG.
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func (*Canvas) DrawBoxTexts ¶
func (*Canvas) DrawTextAtPoint ¶
DrawTextAtPoint draws text on this canvas at the specified point.
Click to show internal directories.
Click to hide internal directories.