void LottieView::setFilePath(const char *filePath)
{
mPlayer->setFilePath(filePath);
- mFrameRate = mPlayer->getFrameRate();
- mTotalFrame = mPlayer->getTotalFrame();
+ mFrameRate = mPlayer->frameRate();
+ mTotalFrame = mPlayer->totalFrame();
}
void LottieView::setSize(int w, int h)
float pos() const;
- float getFrameRate() const;
+ float frameRate() const;
- long getTotalFrame() const;
+ long totalFrame() const;
const std::vector<LOTNode *> &renderList(float pos) const;
VSize size() const;
float playTime() const;
float pos();
- float getFrameRate() const;
- long getTotalFrame() const;
+ float frameRate() const;
+ long totalFrame() const;
const std::vector<LOTNode *> &renderList(float pos);
bool render(float pos, const LOTBuffer &buffer, bool forceRender);
float mPos = 0.0;
};
-float LOTPlayerPrivate::getFrameRate() const
+float LOTPlayerPrivate::frameRate() const
{
if (!mModel) {
vWarning << "Model Data is not existed yet, please setFilePath() first.";
return mModel->frameRate();
}
-long LOTPlayerPrivate::getTotalFrame() const
+long LOTPlayerPrivate::totalFrame() const
{
if (!mModel) {
vWarning << "Model Data is not existed yet, please setFilePath() first.";
return d->pos();
}
-float LOTPlayer::getFrameRate() const
+float LOTPlayer::frameRate() const
{
- return d->getFrameRate();
+ return d->frameRate();
}
-long LOTPlayer::getTotalFrame() const
+long LOTPlayer::totalFrame() const
{
- return d->getTotalFrame();
+ return d->totalFrame();
}
-
const std::vector<LOTNode *> &LOTPlayer::renderList(float pos) const
{
return d->renderList(pos);