Public Member Functions | |
| DEF_OBJ_BASE (IAnimation, Animation) long AddRef() PURE | |
| 添加引用 | |
| long | Release () PURE |
| 释放引用 | |
| void | OnFinalRelease () PURE |
| 释放对象 | |
| BOOL | IsClass (LPCWSTR lpszName) SCONST PURE |
| 判断this是不是属于指定的类型 | |
| LPCWSTR | GetObjectClass () SCONST PURE |
| 获得类型名 | |
| int | GetObjectType () SCONST PURE |
| 获得对象类型 | |
| int | GetID () SCONST PURE |
| 获取对象ID | |
| void | SetID (int nID) PURE |
| 设置对象ID | |
| LPCWSTR | GetName () SCONST PURE |
| 获取对象Name | |
| LPCSTR | GetNameA () SCONST PURE |
| void | SetName (LPCWSTR pszName) PURE |
| 设置对象Name | |
| BOOL | InitFromXml (IXmlNode *xmlNode) PURE |
| 从XML结节初始化SObject对象 | |
| void | OnInitFinished (IXmlNode *xmlNode) PURE |
| 属性初始化完成处理接口 | |
| HRESULT | ISetAttribute (const IStringW *strAttribName, const IStringW *strValue, BOOL bLoading) PURE |
| 设置一个对象属性 | |
| HRESULT | SetAttributeA (LPCSTR pszAttr, LPCSTR pszValue, BOOL bLoading DEF_VAL(FALSE)) PURE |
| 设置一个对象属性 | |
| HRESULT | SetAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading DEF_VAL(FALSE)) PURE |
| 设置一个对象属性 | |
| BOOL | GetAttribute (LPCWSTR strAttr, IStringW *pValue) SCONST PURE |
| 通过属性名查询属性值 | |
| HRESULT | AfterAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading, HRESULT hr) PURE |
| 属性处理后调用的方法 | |
| void | SetAttrHandler (FunAttrHandler attrHandler) PURE |
| 设置属性处理回调方法 | |
| IAnimation * | clone () SCONST PURE |
| 克隆动画对象 | |
| void | copy (const IAnimation *src) PURE |
| 复制动画对象 | |
| void | reset () PURE |
| 重置动画的初始化状态 | |
| void | cancel () PURE |
| 取消动画。取消动画会调用动画监听器(如果设置了)来通知动画结束。 | |
| void | setInterpolator (IInterpolator *i) PURE |
| 设置动画的加速曲线。默认为线性插值。 | |
| void | setDuration (long durationMillis) PURE |
| 设置动画持续时间。持续时间不能为负数。 | |
| void | scaleCurrentDuration (float scale) PURE |
| 缩放当前持续时间 | |
| void | setFillBefore (BOOL bFill) PURE |
| 设置动画开始前是否应用动画效果 | |
| void | setFillAfter (BOOL bFill) PURE |
| 设置动画结束后是否应用动画效果 | |
| BOOL | getFillBefore () SCONST PURE |
| 获取动画开始前是否应用动画效果 | |
| BOOL | getFillAfter () SCONST PURE |
| 获取动画结束后是否应用动画效果 | |
| void | setStartOffset (long offset) PURE |
| 设置动画开始偏移时间 | |
| BOOL | isFillEnabled () SCONST PURE |
| 获取动画是否启用填充效果 | |
| void | setFillEnabled (BOOL fillEnabled) PURE |
| 设置动画是否启用填充效果 | |
| void | setStartTime (int64_t startTimeMillis) PURE |
| 设置动画开始时间 | |
| void | start () PURE |
| 方便方法,设置动画在第一次调用getTransformation时开始 | |
| void | startNow () PURE |
| 方便方法,设置动画在当前时间开始 | |
| void | setRepeatMode (RepeatMode repeatMode) PURE |
| 设置动画结束时的行为 | |
| void | setRepeatCount (int repeatCount) PURE |
| 设置动画重复次数 | |
| void | setZAdjustment (ZAdjustment zAdjustment) PURE |
| 设置动画运行时的Z顺序模式 | |
| IInterpolator * | getInterpolator () SCONST PURE |
| 获取动画的加速曲线类型 | |
| int64_t | getStartTime () SCONST PURE |
| 获取动画开始时间 | |
| long | getDuration () SCONST PURE |
| 获取动画持续时间 | |
| long | getStartOffset () SCONST PURE |
| 获取动画开始偏移时间 | |
| RepeatMode | getRepeatMode () SCONST PURE |
| 获取动画结束时的行为 | |
| int | getRepeatCount () SCONST PURE |
| 获取动画重复次数 | |
| ZAdjustment | getZAdjustment () SCONST PURE |
| 获取动画运行时的Z顺序模式 | |
| void | setAnimationListener (IAnimationListener *listener) PURE |
| 绑定动画监听器 | |
| long | computeDurationHint () SCONST PURE |
| 计算整个动画可能持续的时间(毫秒) | |
| BOOL | getTransformation2 (uint64_t currentTime, ITransformation *outTransformation, float scale) PURE |
| 获取指定时间点的变换 | |
| BOOL | getTransformation (uint64_t currentTime, ITransformation *outTransformation) PURE |
| 获取指定时间点的变换 | |
| BOOL | hasStarted () SCONST PURE |
| 判断动画是否已开始 | |
| BOOL | hasEnded () SCONST PURE |
| 判断动画是否已结束 | |
| void | applyTransformation (float interpolatedTime, ITransformation *t) PURE |
| 应用变换 | |
| BOOL | hasAlpha () SCONST PURE |
| 判断动画是否改变视图的alpha属性 | |
| void | initialize (int width, int height, int parentWidth, int parentHeight, int nScale) PURE |
| 初始化动画 | |
| void | setUserData (ULONG_PTR data) PURE |
| 设置用户数据 | |
| ULONG_PTR | getUserData () SCONST PURE |
| 获取用户数据 | |
| void | pause () PURE |
| 暂停动画 | |
| void | resume () PURE |
| 恢复动画 | |
Public Member Functions inherited from IObject | |
| long | AddRef () PURE |
| 添加引用 | |
| long | Release () PURE |
| 释放引用 | |
| void | OnFinalRelease () PURE |
| 释放对象 | |
| BOOL | IsClass (LPCWSTR lpszName) SCONST PURE |
| 判断this是不是属于指定的类型 | |
| LPCWSTR | GetObjectClass () SCONST PURE |
| 获得类型名 | |
| int | GetObjectType () SCONST PURE |
| 获得对象类型 | |
| int | GetID () SCONST PURE |
| 获取对象ID | |
| void | SetID (int nID) PURE |
| 设置对象ID | |
| LPCWSTR | GetName () SCONST PURE |
| 获取对象Name | |
| LPCSTR | GetNameA () SCONST PURE |
| void | SetName (LPCWSTR pszName) PURE |
| 设置对象Name | |
| BOOL | InitFromXml (IXmlNode *xmlNode) PURE |
| 从XML结节初始化SObject对象 | |
| void | OnInitFinished (IXmlNode *xmlNode) PURE |
| 属性初始化完成处理接口 | |
| HRESULT | ISetAttribute (const IStringW *strAttribName, const IStringW *strValue, BOOL bLoading) PURE |
| 设置一个对象属性 | |
| HRESULT | SetAttributeA (LPCSTR pszAttr, LPCSTR pszValue, BOOL bLoading DEF_VAL(FALSE)) PURE |
| 设置一个对象属性 | |
| HRESULT | SetAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading DEF_VAL(FALSE)) PURE |
| 设置一个对象属性 | |
| BOOL | GetAttribute (LPCWSTR strAttr, IStringW *pValue) SCONST PURE |
| 通过属性名查询属性值 | |
| HRESULT | AfterAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading, HRESULT hr) PURE |
| 属性处理后调用的方法 | |
| void | SetAttrHandler (FunAttrHandler attrHandler) PURE |
| 设置属性处理回调方法 | |
Public Member Functions inherited from IObjRef | |
| long | AddRef () PURE |
| Increases the reference count. | |
| long | Release () PURE |
| Decreases the reference count. | |
| void | OnFinalRelease () PURE |
| Called when the reference count reaches zero and the object is about to be released. | |
Definition at line 127 of file SAnimation-i.h.
| HRESULT IAnimation::AfterAttribute | ( | LPCWSTR | pszAttr, |
| LPCWSTR | pszValue, | ||
| BOOL | bLoading, | ||
| HRESULT | hr ) |
属性处理后调用的方法
OnAttribute
| LPCWSTR | pszAttr– 属性名 |
| LPCWSTR | pszValue – 属性值 |
| BOOL | bLoading – 对象创建时由系统调用标志 |
| HRESULT | hr – 属性处理结果 Describe 不做处理,直接返回 |
| void IAnimation::applyTransformation | ( | float | interpolatedTime, |
| ITransformation * | t ) |
应用变换
| interpolatedTime | float – 插值时间 |
| t | ITransformation* – 变换对象 |
| void IAnimation::cancel | ( | ) |
取消动画。取消动画会调用动画监听器(如果设置了)来通知动画结束。
| IAnimation * IAnimation::clone | ( | ) |
克隆动画对象
| long IAnimation::computeDurationHint | ( | ) |
计算整个动画可能持续的时间(毫秒)
| void IAnimation::copy | ( | const IAnimation * | src | ) |
复制动画对象
| src | const IAnimation* – 源动画对象 |
| BOOL IAnimation::GetAttribute | ( | LPCWSTR | strAttr, |
| IStringW * | pValue ) |
通过属性名查询属性值
GetAttribute
| LPCWSTR | strAttr – 属性名 |
| IStringW | * pValue – 属性值 |
| long IAnimation::getDuration | ( | ) |
获取动画持续时间
| BOOL IAnimation::getFillAfter | ( | ) |
获取动画结束后是否应用动画效果
| BOOL IAnimation::getFillBefore | ( | ) |
获取动画开始前是否应用动画效果
| int IAnimation::GetID | ( | ) |
获取对象ID
GetID
| IInterpolator * IAnimation::getInterpolator | ( | ) |
获取动画的加速曲线类型
| LPCWSTR IAnimation::GetName | ( | ) |
获取对象Name
GetName
| LPCWSTR IAnimation::GetObjectClass | ( | ) |
获得类型名
GetObjectClass
| int IAnimation::GetObjectType | ( | ) |
获得对象类型
GetObjectType
| int IAnimation::getRepeatCount | ( | ) |
获取动画重复次数
| RepeatMode IAnimation::getRepeatMode | ( | ) |
获取动画结束时的行为
| long IAnimation::getStartOffset | ( | ) |
获取动画开始偏移时间
| int64_t IAnimation::getStartTime | ( | ) |
获取动画开始时间
| BOOL IAnimation::getTransformation | ( | uint64_t | currentTime, |
| ITransformation * | outTransformation ) |
获取指定时间点的变换
| currentTime | uint64_t – 当前时间(毫秒) |
| outTransformation | ITransformation* – 输出变换对象 |
| BOOL IAnimation::getTransformation2 | ( | uint64_t | currentTime, |
| ITransformation * | outTransformation, | ||
| float | scale ) |
获取指定时间点的变换
| currentTime | uint64_t – 当前时间(毫秒) |
| outTransformation | ITransformation* – 输出变换对象 |
| scale | float – 缩放比例 |
| ULONG_PTR IAnimation::getUserData | ( | ) |
获取用户数据
| ZAdjustment IAnimation::getZAdjustment | ( | ) |
获取动画运行时的Z顺序模式
| BOOL IAnimation::hasAlpha | ( | ) |
判断动画是否改变视图的alpha属性
| BOOL IAnimation::hasEnded | ( | ) |
判断动画是否已结束
| BOOL IAnimation::hasStarted | ( | ) |
判断动画是否已开始
| BOOL IAnimation::InitFromXml | ( | IXmlNode * | xmlNode | ) |
| void IAnimation::initialize | ( | int | width, |
| int | height, | ||
| int | parentWidth, | ||
| int | parentHeight, | ||
| int | nScale ) |
初始化动画
| width | int – 宽度 |
| height | int – 高度 |
| parentWidth | int – 父级宽度 |
| parentHeight | int – 父级高度 |
| nScale | int – 缩放比例 |
| BOOL IAnimation::IsClass | ( | LPCWSTR | lpszName | ) |
判断this是不是属于指定的类型
IsClass
| LPCWSTR | lpszName – 测试类型名 |
| BOOL IAnimation::isFillEnabled | ( | ) |
获取动画是否启用填充效果
| void IAnimation::OnInitFinished | ( | IXmlNode * | xmlNode | ) |
| void IAnimation::pause | ( | ) |
暂停动画
| void IAnimation::reset | ( | ) |
重置动画的初始化状态
| void IAnimation::resume | ( | ) |
恢复动画
| void IAnimation::scaleCurrentDuration | ( | float | scale | ) |
缩放当前持续时间
| scale | float – 缩放比例 |
| void IAnimation::setAnimationListener | ( | IAnimationListener * | listener | ) |
绑定动画监听器
| listener | IAnimationListener* – 动画监听器 |
| void IAnimation::SetAttrHandler | ( | FunAttrHandler | attrHandler | ) |
设置属性处理回调方法
SetAttrHandler
| FunAttrHandler | attrHandler– 属性处理回调方法 |
| HRESULT IAnimation::SetAttribute | ( | LPCWSTR | pszAttr, |
| LPCWSTR | pszValue, | ||
| BOOL bLoading | DEF_VALFALSE ) |
设置一个对象属性
SetAttribute
| LPCWSTR | pszAttr – 属性名 |
| LPCWSTR | pszValue – 属性值 |
| BOOL | bLoading – 对象创建时由系统调用标志 |
| HRESULT IAnimation::SetAttributeA | ( | LPCSTR | pszAttr, |
| LPCSTR | pszValue, | ||
| BOOL bLoading | DEF_VALFALSE ) |
设置一个对象属性
SetAttribute
| LPCSTR | pszAttr – 属性名 |
| LPCSTR | pszValue – 属性值 |
| BOOL | bLoading – 对象创建时由系统调用标志 |
| void IAnimation::setDuration | ( | long | durationMillis | ) |
设置动画持续时间。持续时间不能为负数。
| durationMillis | long – 持续时间(毫秒) |
| void IAnimation::setFillAfter | ( | BOOL | bFill | ) |
设置动画结束后是否应用动画效果
| bFill | BOOL – TRUE: 应用,FALSE: 不应用 |
| void IAnimation::setFillBefore | ( | BOOL | bFill | ) |
设置动画开始前是否应用动画效果
| bFill | BOOL – TRUE: 应用,FALSE: 不应用 |
| void IAnimation::setFillEnabled | ( | BOOL | fillEnabled | ) |
设置动画是否启用填充效果
| fillEnabled | BOOL – TRUE: 启用,FALSE: 不启用 |
| void IAnimation::SetID | ( | int | nID | ) |
设置对象ID
| nID | int–对象ID |
| void IAnimation::setInterpolator | ( | IInterpolator * | i | ) |
设置动画的加速曲线。默认为线性插值。
| i | IInterpolator* – 定义加速曲线的插值器 |
| void IAnimation::SetName | ( | LPCWSTR | pszName | ) |
设置对象Name
| pszName | LPCWSTR – 对象Name |
| void IAnimation::setRepeatCount | ( | int | repeatCount | ) |
设置动画重复次数
| repeatCount | int – 重复次数 |
| void IAnimation::setRepeatMode | ( | RepeatMode | repeatMode | ) |
设置动画结束时的行为
| repeatMode | RepeatMode – RESTART或REVERSE |
| void IAnimation::setStartOffset | ( | long | offset | ) |
设置动画开始偏移时间
| offset | long – 偏移时间(毫秒) |
| void IAnimation::setStartTime | ( | int64_t | startTimeMillis | ) |
设置动画开始时间
| startTimeMillis | int64_t – 开始时间(毫秒) |
| void IAnimation::setUserData | ( | ULONG_PTR | data | ) |
设置用户数据
| data | ULONG_PTR – 用户数据 |
| void IAnimation::setZAdjustment | ( | ZAdjustment | zAdjustment | ) |
设置动画运行时的Z顺序模式
| zAdjustment | ZAdjustment – ZORDER_NORMAL, ZORDER_TOP, 或 ZORDER_BOTTOM |
| void IAnimation::start | ( | ) |
方便方法,设置动画在第一次调用getTransformation时开始
| void IAnimation::startNow | ( | ) |
方便方法,设置动画在当前时间开始