mydraw

package
v0.0.0-...-4215923 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HDC

type HDC struct {
	//Bg   image.Image
	Rgba *image.RGBA
}

func (*HDC) DrawText

func (this *HDC) DrawText(pen Pen, text string) bool

图片上画文字

func (*HDC) GetBgSize

func (this *HDC) GetBgSize() (w, h int)

func (*HDC) Save

func (this *HDC) Save(imagePath string) bool

保存图片

func (*HDC) SetBg

func (this *HDC) SetBg(imagePath string) bool

type Pen

type Pen struct {
	FontSize   float64
	Dpi        float64
	Font       *truetype.Font
	StartPoint image.Point
	Color      *image.Uniform
}

func OnGetPen

func OnGetPen(fontPath string, R, G, B, A uint8) (pen Pen, b bool)

获取画笔

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL