Documentation
¶
Overview ¶
Package imagex 图片操作.
Index ¶
- type Image
- func NewImageByHandle(handle int) *Image
- func NewImageByName(name string) *Image
- func NewImageByNameEx(fileName, name string) *Image
- func NewImage_LoadFile(pFileName string) *Image
- func NewImage_LoadFileAdaptive(pFileName string, leftSize int, topSize int, rightSize int, bottomSize int) *Image
- func NewImage_LoadFileRect(pFileName string, x int, y int, cx int, cy int) *Image
- func NewImage_LoadFromExtractIcon(pFileName string) *Image
- func NewImage_LoadFromHBITMAP(hBitmap int) *Image
- func NewImage_LoadFromHICON(hIcon int) *Image
- func NewImage_LoadFromImage(pImage int) *Image
- func NewImage_LoadMemory(pBuffer []byte) *Image
- func NewImage_LoadMemoryAdaptive(pBuffer []byte, leftSize int, topSize int, rightSize int, bottomSize int) *Image
- func NewImage_LoadMemoryRect(pBuffer []byte, x int, y int, cx int, cy int) *Image
- func NewImage_LoadRes(id int, pType string, bStretch bool, hModule int) *Image
- func NewImage_LoadResAdaptive(id int, pType string, leftSize int, topSize int, rightSize int, ...) *Image
- func NewImage_LoadSrc(hImageSrc int) *Image
- func NewImage_LoadSvg(hSvg int) *Image
- func NewImage_LoadSvgFile(pFileName string) *Image
- func NewImage_LoadSvgString(pString string) *Image
- func NewImage_LoadSvgStringUtf8(pString string) *Image
- func NewImage_LoadSvgStringW(pString string) *Image
- func NewImage_LoadZip(pZipFileName string, pFileName string, pPassword string) *Image
- func NewImage_LoadZipAdaptive(pZipFileName string, pFileName string, pPassword string, x1 int, x2 int, ...) *Image
- func NewImage_LoadZipMem(data []byte, pFileName string, pPassword string) *Image
- func NewImage_LoadZipRect(pZipFileName string, pFileName string, pPassword string, x int, y int, cx int, ...) *Image
- func (i *Image) AddRef() int
- func (i *Image) Destroy() int
- func (i *Image) EnableAutoDestroy(bEnable bool) int
- func (i *Image) EnableCenter(bCenter bool) int
- func (i *Image) EnableTranColor(bEnable bool) int
- func (i *Image) GetDrawType() int
- func (i *Image) GetHeight() int
- func (i *Image) GetImageSrc() int
- func (i *Image) GetRefCount() int
- func (i *Image) GetSvg() int
- func (i *Image) GetWidth() int
- func (i *Image) IsAdaptive() bool
- func (i *Image) IsCenter() bool
- func (i *Image) IsStretch() bool
- func (i *Image) IsTile() bool
- func (i *Image) Release() int
- func (i *Image) SetDrawType(nType xcc.Image_Draw_Type_) bool
- func (i *Image) SetDrawTypeAdaptive(leftSize int, topSize int, rightSize int, bottomSize int) bool
- func (i *Image) SetRotateAngle(fAngle float32) int
- func (i *Image) SetSplitEqual(nCount int, iIndex int) int
- func (i *Image) SetTranColor(color int) int
- func (i *Image) SetTranColorEx(color int, tranColor uint8) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
objectbase.ObjectBase
}
图片操作.
func NewImage_LoadFileAdaptive ¶
func NewImage_LoadFileAdaptive(pFileName string, leftSize int, topSize int, rightSize int, bottomSize int) *Image
图片_加载从文件自适应, 加载图片从文件, 自适应图片.
pFileName: 图片文件.
leftSize: 坐标.
topSize: 坐标.
rightSize: 坐标.
bottomSize: 坐标.
func NewImage_LoadFileRect ¶
图片_加载从文件指定区域, 加载图片, 指定区位置及大小.
pFileName: 图片文件.
x: 坐标.
y: 坐标.
cx: 宽度.
cy: 高度.
func NewImage_LoadFromExtractIcon ¶
图片_加载文件图标, 加载文件图标, 从一个EXE文件或DLL文件或图标文件; 例如:*.exe文件的图标.
pFileName: 文件名.
func NewImage_LoadMemoryAdaptive ¶
func NewImage_LoadMemoryAdaptive(pBuffer []byte, leftSize int, topSize int, rightSize int, bottomSize int) *Image
图片_加载从内存自适应, 加载流图片压缩包, 自适应图片(九宫格).
pBuffer: 图片数据.
leftSize: 坐标.
topSize: 坐标.
rightSize: 坐标.
bottomSize: 坐标.
func NewImage_LoadMemoryRect ¶
图片_加载从内存指定区域, 加载流图片, 指定区位置及大小.
pBuffer: 图片数据.
x: 坐标.
y: 坐标.
cx: 宽度.
cy: 高度.
func NewImage_LoadRes ¶
图片_加载从资源.
id: 资源ID.
pType: 资源类型.
bStretch: 是否拉伸图片.
hModule: 从指定模块加载, 例如:DLL, EXE; 如果为空, 从当前EXE加载.
func NewImage_LoadResAdaptive ¶
func NewImage_LoadResAdaptive(id int, pType string, leftSize int, topSize int, rightSize int, bottomSize, hModule int) *Image
图片_加载从资源自适应, 加载图片从资源, 自适应图片.
id: 资源ID.
pType: 资源类型.
leftSize: 坐标.
topSize: 坐标.
rightSize: 坐标.
bottomSize: 坐标.
hModule: 从指定模块加载, 例如:DLL, EXE; 如果为空, 从当前EXE加载.
func NewImage_LoadZip ¶
图片_加载从ZIP, 加载图片从ZIP压缩包.
pZipFileName: ZIP压缩包文件名.
pFileName: 图片文件名.
pPassword: ZIP压缩包密码.
func NewImage_LoadZipAdaptive ¶
func NewImage_LoadZipAdaptive(pZipFileName string, pFileName string, pPassword string, x1 int, x2 int, y1 int, y2 int) *Image
图片_加载从ZIP自适应, 加载图片从ZIP压缩包, 自适应图片.
pZipFileName: ZIP压缩包文件名.
pFileName: 图片文件名.
pPassword: ZIP压缩包密码.
x1: 坐标.
x2: 坐标.
y1: 坐标.
y2: 坐标.
func NewImage_LoadZipRect ¶
func NewImage_LoadZipRect(pZipFileName string, pFileName string, pPassword string, x int, y int, cx int, cy int) *Image
图片_加载从ZIP指定区域, 加载ZIP图片, 指定区位置及大小.
pZipFileName: ZIP文件.
pFileName: 图片名称.
pPassword: 密码.
x: 坐标.
y: 坐标.
cx: 宽度.
cy: 高度.
func (*Image) GetDrawType ¶
图片_取绘制类型, 获取图片绘制类型, 返回: Image_Draw_Type_.
func (*Image) SetDrawType ¶
func (i *Image) SetDrawType(nType xcc.Image_Draw_Type_) bool
图片_置绘制类型, 设置图片绘制类型.
nType: 图片绘制类型, Image_Draw_Type_.
func (*Image) SetDrawTypeAdaptive ¶
图片_置绘制类型自适应, 设置图片自适应(九宫格).
leftSize: 坐标.
topSize: 坐标.
rightSize: 坐标.
bottomSize: 坐标.