Documentation ¶ Index ¶ type HDC func (this *HDC) DrawText(pen Pen, text string) bool func (this *HDC) GetBgSize() (w, h int) func (this *HDC) Save(imagePath string) bool func (this *HDC) SetBg(imagePath string) bool type ImageInfo func ImageBaseInfo(source []byte, quality, width int) (*ImageInfo, error) func ImageResizeChange(source []byte, quality, width int) (*ImageInfo, error) type Pen func OnGetPen(fontPath string, R, G, B, A uint8) (pen Pen, b bool) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type HDC ¶ added in v0.2.19 type HDC struct { //Bg image.Image Rgba *image.RGBA } func (*HDC) DrawText ¶ added in v0.2.19 func (this *HDC) DrawText(pen Pen, text string) bool 图片上画文字 func (*HDC) GetBgSize ¶ added in v0.2.19 func (this *HDC) GetBgSize() (w, h int) func (*HDC) Save ¶ added in v0.2.19 func (this *HDC) Save(imagePath string) bool 保存图片 func (*HDC) SetBg ¶ added in v0.2.19 func (this *HDC) SetBg(imagePath string) bool type ImageInfo ¶ type ImageInfo struct { Content []byte ExtName string Height int Width int } func ImageBaseInfo ¶ func ImageBaseInfo(source []byte, quality, width int) (*ImageInfo, error) func ImageResizeChange ¶ func ImageResizeChange(source []byte, quality, width int) (*ImageInfo, error) type Pen ¶ added in v0.2.19 type Pen struct { FontSize float64 Dpi float64 Font *truetype.Font StartPoint image.Point Color *image.Uniform } func OnGetPen ¶ added in v0.2.19 func OnGetPen(fontPath string, R, G, B, A uint8) (pen Pen, b bool) 获取画笔 Source Files ¶ View all Source files image.gomydraw.go Click to show internal directories. Click to hide internal directories.