image

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

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

图片

func NewImageFromImage

func NewImageFromImage(engine *g2d.Engine, img image.Image) Image

新建

func NewImageFromeData

func NewImageFromeData(engine *g2d.Engine, data []byte) (img Image, err error)

新建

func (*Image) Draw

func (i *Image) Draw()

渲染

func (*Image) GetAlpha

func (i *Image) GetAlpha() float64

获取透明

func (*Image) GetCentre

func (i *Image) GetCentre() (x, y int)

获取中点

func (*Image) GetOffset

func (i *Image) GetOffset() (x, y int)

获取偏移

func (*Image) GetRect

func (i *Image) GetRect() g2d.RECT

获取矩形

func (*Image) GetRotate

func (i *Image) GetRotate() float64

获取旋转

func (*Image) GetScale

func (i *Image) GetScale() (x, y float64)

获取缩放

func (*Image) GetTag

func (i *Image) GetTag() string

获取标签

func (*Image) SetAlpha

func (i *Image) SetAlpha(alpha float64)

设置透明

func (*Image) SetCentre

func (i *Image) SetCentre(x, y int)

设置中点

func (*Image) SetOffset

func (i *Image) SetOffset(x, y int)

设置偏移

func (*Image) SetRotate

func (i *Image) SetRotate(rotate float64)

设置旋转

func (*Image) SetScale

func (i *Image) SetScale(x, y float64)

设置缩放

func (*Image) SetTag

func (i *Image) SetTag(tag string)

设置标签

Jump to

Keyboard shortcuts

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