text

package
v0.0.0-...-59843aa Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Text

type Text struct {
	// contains filtered or unexported fields
}

func NewText

func NewText(engine *g2d.Engine, font []byte) (text Text, err error)

新建

func (*Text) Draw

func (t *Text) Draw()

渲染文本

func (*Text) GetColor

func (t *Text) GetColor() string

获取颜色

func (*Text) GetOffset

func (t *Text) GetOffset() (x, y int)

获取偏移

func (*Text) GetSize

func (t *Text) GetSize() float64

获取大小

func (*Text) GetText

func (t *Text) GetText() string

获取文本

func (*Text) SetColor

func (t *Text) SetColor(str string) (err error)

设置颜色

func (*Text) SetOffset

func (t *Text) SetOffset(x, y int)

设置偏移

func (*Text) SetSize

func (t *Text) SetSize(size float64) (err error)

设置大小

func (*Text) SetText

func (t *Text) SetText(str string) (err error)

设置文本

Jump to

Keyboard shortcuts

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