AR_Engine_SDK
载入中...
搜索中...
未找到
函数 | 变量
XUIImage.lua 文件参考

#include <XUIImage.h>

类 XUIImage 继承关系图:
Inheritance graph

函数

function XUIImage Create () end
 
function XUIImage Create (nTag, strTextureName, texType) end
 
function XUIImage SetUseTexture (bUse) end
 
function XUIImage IsUseTexture () end
 
function XUIImage LoadTexture (nTag, strTextureName, texType) end
 
function XUIImage ShowTexture (nTag) end
 
function XUIImage RemoveTexture (nTag) end
 
function XUIImage GetTextureNum () end
 
function XUIImage GetCurrentTag () end
 
function XUIImage GetTexturePath (nTag) end
 
function XUIImage IsTextureExisted (nTag) end
 
function XUIImage IsFollowTextureSize () end
 
function XUIImage SetFollowTextureSize (bFollow) end
 
function XUIImage SetRectPercent (vLTPercent, vBRPercent) end
 
function XUIImage SetFlipX (bFlip) end
 
function XUIImage IsFlipX () end
 
function XUIImage GetTextureOriginalSize (nTag) end
 
function XUIImage SetUseSequence (bUse) end
 
function XUIImage IsUseSequence () end
 
function XUIImage IsSequencePlaying () end
 
function XUIImage PlaySequence (bPlay) end
 
function XUIImage ResetSequence () end
 
function XUIImage SetUVTile (vTile) end
 
function XUIImage SetUVTile (fUTile, fVTile) end
 
function XUIImage GetUVTile () end
 
function XUIImage SetSequenceFPS (fFPS) end
 
function XUIImage GetSequenceFPS () end
 
function XUIImage SetActualFrameNum (nNum) end
 
function XUIImage GetActualFrameNum () end
 
function XUIImage SetActualFrameBegin (nNum) end
 
function XUIImage GetActualFrameBegin () end
 
function XUIImage SetCurrentFrame (nFrame) end
 
function XUIImage GetCurrentFrame () end
 
function XUIImage Enable9Slice (bSet) end
 
function XUIImage Is9SliceEnabled () end
 
function XUIImage SetSliceLeft (fLeft) end
 
function XUIImage GetSliceLeft () end
 
function XUIImage SetSliceRight (fRight) end
 
function XUIImage GetSliceRight () end
 
function XUIImage SetSliceTop (fTop) end
 
function XUIImage GetSliceTop () end
 
function XUIImage SetSliceBottom (fBottom) end
 
function XUIImage GetSliceBottom () end
 
function XUIImage SetTListUV (vLT, vBR) end
 
function XUIImage GetTlistUV () end
 
function XUIImage GetUITexture () end
 
function XUIImage SetUseMaskTexture (bUse) end
 
function XUIImage IsUseMaskTexture () end
 
function XUIImage LoadMaskTexture (strTextureNamek) end
 
function XUIImage GetMaskTexturePath () end
 
function XUIImage GetUIMaskTexture () end
 
function XUIImage GetCurrentPlistSpriteName () end
 
function XUIImage SetImageType (type) end
 
function XUIImage GetImageType () end
 
function XUIImage SetFillMode (type) end
 
function XUIImage GetImageFillMode () end
 
function XUIImage SetFillAmount (amount) end
 
function XUIImage GetFillAmount () end
 
function XUIImage SetHorizontalFillOrigin (origin) end
 
function XUIImage SetVerticalFillOrigin (origin) end
 
function XUIImage Set90FillOrigin (origin) end
 
function XUIImage Set180FillOrigin (origin) end
 
function XUIImage Set360FillOrigin (origin) end
 
function XUIImage SetFillOrigin (origin) end
 
function XUIImage GetFillOrigin () end
 
function XUIImage SetFillReverse (reverse) end
 
function XUIImage GetFillReverse () end
 
function XUIImage GetSubviewParam () end
 
function XUIImage UseSubViewFromMainEditor () end
 
function XUIImage SetUseSubViewFromMainEditor (use) end
 
function XUIImage LoadPlistTexture (spritename, tag) end
 

变量

 XUIImage = {}
 
XUIImage Simple = 0
 
XUIImage Sliced = 0
 
XUIImage Fill = 0
 
XUIImage Polygon = 0
 
XUIImage Quad = 0
 
XUIImage Horizontal = 0
 
XUIImage Vertical = 0
 
XUIImage Radial90 = 0
 
XUIImage Radial180 = 0
 
XUIImage Radial360 = 0
 
XUIImage Left = 0
 
XUIImage Right = 0
 
XUIImage Top = 0
 
XUIImage Bottom = 0
 
XUIImage BottomLeft = 0
 
XUIImage TopLeft = 0
 
XUIImage TopRight = 0
 
XUIImage BottomRight = 0
 

函数说明

◆ Create() [1/2]

function XUIImage Create ( )

创建并返回一个空的控件实例的指针

返回
XUIImage

◆ Create() [2/2]

function XUIImage Create ( nTag  ,
strTextureName  ,
texType   
)

根据图片名字创建一个Image

参数
nTagnumber 该纹理路径的索引值,XUIImage可以持有多张纹理,即不同nTag可以对应不同纹理路径,默认从0开始
strTextureNamestring 纹理的文件路径,该路径若是pvr/ktx则不需要传后缀名,引擎通过当前平台是android/ios自动补后缀,若是png/jpg则需要传后缀名。
texTypenumber 路径的类型,相对路径/绝对路径。
返回
XUIImage 创建的XUIImage实例

◆ Enable9Slice()

function XUIImage Enable9Slice ( bSet  )

设置是否使用九宫格

参数
bSetboolean 是否使用九宫格
返回
void

◆ GetActualFrameBegin()

function XUIImage GetActualFrameBegin ( )

XUIImage_GetActualFrameBegin00

返回
number

◆ GetActualFrameNum()

function XUIImage GetActualFrameNum ( )

获取当前序列帧图片中保存的真正的帧数

返回
number 返回值为通过SetActualFrameNum传入的值,默认为1

◆ GetCurrentFrame()

function XUIImage GetCurrentFrame ( )

返回当前播放到第nFrame帧。

返回
number 当前播放到第nFrame帧。

◆ GetCurrentPlistSpriteName()

function XUIImage GetCurrentPlistSpriteName ( )

返回合图中小图名称

返回
string 合图中小图名称

◆ GetCurrentTag()

function XUIImage GetCurrentTag ( )

获取当前正在显示的纹理索引

返回
number 正在显示的纹理索引

◆ GetFillAmount()

function XUIImage GetFillAmount ( )

XUIImage_GetFillAmount00

返回
number

◆ GetFillOrigin()

function XUIImage GetFillOrigin ( )

XUIImage_GetFillOrigin00

返回
number

◆ GetFillReverse()

function XUIImage GetFillReverse ( )

XUIImage_GetFillReverse00

返回
boolean

◆ GetImageFillMode()

function XUIImage GetImageFillMode ( )

XUIImage_GetImageFillMode00

返回
number

◆ GetImageType()

function XUIImage GetImageType ( )

XUIImage_GetImageType00

返回
number

◆ GetMaskTexturePath()

function XUIImage GetMaskTexturePath ( )

获取遮罩纹理路径

返回
string 遮罩纹理路径

◆ GetSequenceFPS()

function XUIImage GetSequenceFPS ( )

获取序列帧动画的FPS

返回
number 序列帧动画的FPS

◆ GetSliceBottom()

function XUIImage GetSliceBottom ( )

获取九宫格下侧部分宽度(单位:像素)

返回
number 下侧部分宽度

◆ GetSliceLeft()

function XUIImage GetSliceLeft ( )

获取九宫格左侧部分宽度(单位:像素)

返回
number 左侧部分宽度

◆ GetSliceRight()

function XUIImage GetSliceRight ( )

获取九宫格右侧部分宽度(单位:像素)

返回
number 右侧部分宽度

◆ GetSliceTop()

function XUIImage GetSliceTop ( )

获取九宫格上侧部分宽度(单位:像素)

返回
number 上侧部分宽度

◆ GetSubviewParam()

function XUIImage GetSubviewParam ( )

XUIImage_GetSubviewParam00

返回
SubviewParam

◆ GetTextureNum()

function XUIImage GetTextureNum ( )

获取纹理数目

返回
number 纹理数目

◆ GetTextureOriginalSize()

function XUIImage GetTextureOriginalSize ( nTag  )

获取指定tag的纹理原始大小

参数
nTagnumber 指定tag
返回
XVECTOR2 纹理原始大小(返回类型XVECTOR2)

◆ GetTexturePath()

function XUIImage GetTexturePath ( nTag  )

获取指定tag的纹理路径,并返回

参数
nTagnumber 指定tag
返回
string 纹理路径

◆ GetTlistUV()

function XUIImage GetTlistUV ( )

获取九宫格下侧部分宽度(单位:像素)

返回
XVECTOR2
XVECTOR2
void

◆ GetUIMaskTexture()

function XUIImage GetUIMaskTexture ( )

获取遮罩纹理指针

返回
XUITexture 遮罩纹理指针

◆ GetUITexture()

function XUIImage GetUITexture ( )

获取纹理指针

返回
XUITexture 纹理指针

◆ GetUVTile()

function XUIImage GetUVTile ( )

获取序列帧UV

返回
XVECTOR2 获取当前序列帧UV设置。

◆ Is9SliceEnabled()

function XUIImage Is9SliceEnabled ( )

判断是否使用九宫格

返回
boolean 是否使用九宫格

◆ IsFlipX()

function XUIImage IsFlipX ( )

XUIImage_IsFlipX00

返回
boolean

◆ IsFollowTextureSize()

function XUIImage IsFollowTextureSize ( )

获取是否使用纹理的尺寸

返回
boolean 是否使用纹理的尺寸

◆ IsSequencePlaying()

function XUIImage IsSequencePlaying ( )

获取XUIImage是否正在播放序列帧

返回
boolean 是否正在播放序列帧

◆ IsTextureExisted()

function XUIImage IsTextureExisted ( nTag  )

查询指定tag的纹理是否存在

参数
nTagnumber 指定tag
返回
boolean 纹理是否存在

◆ IsUseMaskTexture()

function XUIImage IsUseMaskTexture ( )

获取是否使用遮罩纹理

返回
boolean 是否使用遮罩纹理

◆ IsUseSequence()

function XUIImage IsUseSequence ( )

获取XUIImage是否启用序列帧模式

返回
boolean 是否启用序列帧模式

◆ IsUseTexture()

function XUIImage IsUseTexture ( )

获取是否使用纹理

返回
boolean 是否使用纹理

◆ LoadMaskTexture()

function XUIImage LoadMaskTexture ( strTextureNamek  )

加载遮罩纹理

参数
strTextureNamekstring 遮罩纹理路径
返回
boolean

◆ LoadPlistTexture()

function XUIImage LoadPlistTexture ( spritename  ,
tag   
)

加载plist 快捷方式

参数
spritenamestring 小图名称可不带后缀会自行匹配pvrtgapngktx
tagnumber
返回
void

◆ LoadTexture()

function XUIImage LoadTexture ( nTag  ,
strTextureName  ,
texType   
)

加载纹理

参数
nTagnumber 该纹理路径的索引值,XUIImage可以持有多张纹理,即不同nTag可以对应不同纹理路径,默认从0开始。
strTextureNamestring 纹理的文件路径,该路径若是pvr/ktx则不需要传后缀名,引擎通过当前平台是android/ios自动补后缀,若是png/jpg则需要传后缀名。
texTypenumber 路径的类型,相对路径/绝对路径。
返回
boolean 是否加载成功。

◆ PlaySequence()

function XUIImage PlaySequence ( bPlay  )

设置播放序列帧

参数
bPlayboolean 是否播放序列帧
返回
void

◆ RemoveTexture()

function XUIImage RemoveTexture ( nTag  )

删除指定tag对应的纹理

参数
nTagnumber 对应的索引
返回
void

◆ ResetSequence()

function XUIImage ResetSequence ( )

重置序列帧,重置序列帧为未播放时的初始状态。

返回
void

◆ Set180FillOrigin()

function XUIImage Set180FillOrigin ( origin  )

XUIImage_Set180FillOrigin00

参数
originnumber
返回
void

◆ Set360FillOrigin()

function XUIImage Set360FillOrigin ( origin  )

XUIImage_Set360FillOrigin00

参数
originnumber
返回
void

◆ Set90FillOrigin()

function XUIImage Set90FillOrigin ( origin  )

XUIImage_Set90FillOrigin00

参数
originnumber
返回
void

◆ SetActualFrameBegin()

function XUIImage SetActualFrameBegin ( nNum  )

XUIImage_SetActualFrameBegin00

参数
nNumnumber
返回
void

◆ SetActualFrameNum()

function XUIImage SetActualFrameNum ( nNum  )

设置序列帧图片中保存的真正的帧数

参数
nNumnumber 序列帧图片中保存的真正的帧数。举例:有个序列帧图片,图片格式为34共12帧图片,但是最后一帧是空白的(并没有图片),那么参数应当传为11。
返回
void

◆ SetCurrentFrame()

function XUIImage SetCurrentFrame ( nFrame  )

设置当前播放到第nFrame帧。

参数
nFramenumber 当前播放到第nFrame帧。
返回
void

◆ SetFillAmount()

function XUIImage SetFillAmount ( amount  )

设置填充数值

参数
amountnumber [0,1]
返回
void

◆ SetFillMode()

function XUIImage SetFillMode ( type  )

设置填充模式

参数
typenumber 水平、垂直、径向90、径向180、径向360
返回
void

◆ SetFillOrigin()

function XUIImage SetFillOrigin ( origin  )

XUIImage_SetFillOrigin00

参数
originnumber
返回
void

◆ SetFillReverse()

function XUIImage SetFillReverse ( reverse  )

设置填充是否翻转

参数
reverseboolean
返回
void

◆ SetFlipX()

function XUIImage SetFlipX ( bFlip  )

XUIImage_SetFlipX00

参数
bFlipboolean
返回
void

◆ SetFollowTextureSize()

function XUIImage SetFollowTextureSize ( bFollow  )

设置是否使用纹理的尺寸

参数
bFollowboolean 是否使用纹理的尺寸
返回
void

◆ SetHorizontalFillOrigin()

function XUIImage SetHorizontalFillOrigin ( origin  )

设置填充起点

参数
originnumber
返回
void

◆ SetImageType()

function XUIImage SetImageType ( type  )

设置图片类型

参数
typenumber 普通、九宫格、填充模式为兼容之前九宫格亦可通过enable9slice开启
返回
void

◆ SetRectPercent()

function XUIImage SetRectPercent ( vLTPercent  ,
vBRPercent   
)

按百分比显示图片的一部分

参数
vLTPercentXVECTOR2 图片左上角的百分比
vBRPercentXVECTOR2 图片右下角的百分比
返回
void

◆ SetSequenceFPS()

function XUIImage SetSequenceFPS ( fFPS  )

设置序列帧动画的FPS

参数
fFPSnumber 序列帧动画的FPS
返回
void

◆ SetSliceBottom()

function XUIImage SetSliceBottom ( fBottom  )

设置九宫格下侧部分宽度(单位:像素)

参数
fBottomnumber
返回
void

◆ SetSliceLeft()

function XUIImage SetSliceLeft ( fLeft  )

设置九宫格左侧部分宽度(单位:像素)

参数
fLeftnumber 左侧部分宽度
返回
void

◆ SetSliceRight()

function XUIImage SetSliceRight ( fRight  )

设置九宫格右侧部分宽度(单位:像素)

参数
fRightnumber 右侧部分宽度
返回
void

◆ SetSliceTop()

function XUIImage SetSliceTop ( fTop  )

设置九宫格上侧部分宽度(单位:像素)

参数
fTopnumber 上侧部分宽度
返回
void

◆ SetTListUV()

function XUIImage SetTListUV ( vLT  ,
vBR   
)

设置九宫格小图的UV 通常情况不需要调用

参数
vLTXVECTOR2
vBRXVECTOR2
返回
void

◆ SetUseMaskTexture()

function XUIImage SetUseMaskTexture ( bUse  )

设置是否使用遮罩纹理

参数
bUseboolean 是否使用遮罩纹理
返回
void

◆ SetUseSequence()

function XUIImage SetUseSequence ( bUse  )

XUIImage_SetUseSequence00

参数
bUseboolean
返回
void

◆ SetUseSubViewFromMainEditor()

function XUIImage SetUseSubViewFromMainEditor ( use  )

XUIImage_SetUseSubViewFromMainEditor00

参数
useboolean
返回
void

◆ SetUseTexture()

function XUIImage SetUseTexture ( bUse  )

XUIImage_SetUseTexture00

参数
bUseboolean
返回
void

◆ SetUVTile() [1/2]

function XUIImage SetUVTile ( fUTile  ,
fVTile   
)

设置序列帧UV

参数
fUTilenumber
fVTilenumber
返回
void

◆ SetUVTile() [2/2]

function XUIImage SetUVTile ( vTile  )

设置序列帧UV

参数
vTileXVECTOR2 参数为XVECTOR2类型,对应的x为序列帧图片横向的帧图片个数,y为纵向的帧图片个数。举例:有个序列帧图片,图片上为34共12帧图片,那么参数需要传入为XVECTOR2(3,4)。
返回
void

◆ SetVerticalFillOrigin()

function XUIImage SetVerticalFillOrigin ( origin  )

XUIImage_SetVerticalFillOrigin00

参数
originnumber
返回
void

◆ ShowTexture()

function XUIImage ShowTexture ( nTag  )

显示索引为nTag的图片

参数
nTagnumber 该值为Create、或者LoadTexture时传入的nTag值,XUIImage控件会展示对应的图片。
返回
void

◆ UseSubViewFromMainEditor()

function XUIImage UseSubViewFromMainEditor ( )

XUIImage_UseSubViewFromMainEditor00

返回
boolean

变量说明

◆ Bottom

XUIImage Bottom = 0

◆ BottomLeft

XUIImage BottomLeft = 0

◆ BottomRight

XUIImage BottomRight = 0

◆ Fill

XUIImage Fill = 0

◆ Horizontal

XUIImage Horizontal = 0

◆ Left

XUIImage Left = 0

◆ Polygon

XUIImage Polygon = 0

◆ Quad

XUIImage Quad = 0

◆ Radial180

XUIImage Radial180 = 0

◆ Radial360

XUIImage Radial360 = 0

◆ Radial90

XUIImage Radial90 = 0

◆ Right

XUIImage Right = 0

◆ Simple

XUIImage Simple = 0

◆ Sliced

XUIImage Sliced = 0

◆ Top

XUIImage Top = 0

◆ TopLeft

XUIImage TopLeft = 0

◆ TopRight

XUIImage TopRight = 0

◆ Vertical

XUIImage Vertical = 0

◆ XUIImage

XUIImage = {}