当前位置: 首页>>代码示例>>C++>>正文


C++ Timeline类代码示例

本文整理汇总了C++中Timeline的典型用法代码示例。如果您正苦于以下问题:C++ Timeline类的具体用法?C++ Timeline怎么用?C++ Timeline使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Timeline类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getNewObjectInfoInstance

void Variable::setupDefaultInAnimation(Animation * animation, int objectId, int variableId)
{
    Timeline *newVariableTimeline = animation->setVariableTimeline(objectId, variableId);
    if (newVariableTimeline)
    {
        UniversalObjectInterface *newObjectInfo = getNewObjectInfoInstance();
        switch (variableType)
        {
        case VARIABLETYPE_STRING:
            newObjectInfo->setStringValue(defaultValue->getStringValue());
            break;

        case VARIABLETYPE_INT:
            newObjectInfo->setIntValue(defaultValue->getIntValue());
            break;

        case VARIABLETYPE_REAL:
            newObjectInfo->setRealValue(defaultValue->getRealValue());
            break;

        default:
            Settings::error("Variable::setupDefaultInAnimation - invalid variable type");
            break;
        }

        TimelineKey *newTimelineKey = newVariableTimeline->pushBackKey(new TimeInfo(0, 0, new InstantEasingCurve()), newObjectInfo);
        newTimelineKey->setNextObjectInfo(newObjectInfo);
    }
}
开发者ID:Riyyi,项目名称:engine,代码行数:29,代码来源:variable.cpp

示例2: assemble

void Swatch::assemble( Timeline &timeline )
{
	float dur = 0.2f;
//	mPos = mAnchorPos + vec2( 15.0f, 0.0f );
	timeline.apply( &mPos, mAnchorPos, dur, EaseOutAtan( 10 ) ).finishFn( bind( &Swatch::setDeselected, this ) );
	timeline.apply( &mScale, 1.0f, dur, EaseOutAtan( 10 ) );
}
开发者ID:ChristophPacher,项目名称:Cinder,代码行数:7,代码来源:Swatch.cpp

示例3: dump

//печать анимации
void dump (const Timeline& timeline, int level)
{
  print_space (level++);
  printf      ("Timeline '%s'\n", timeline.Name ());

  dump ("layers", timeline.Layers (), level);
}
开发者ID:untgames,项目名称:funner,代码行数:8,代码来源:xfl_load.cpp

示例4: onChecked

bool TimelineCommand::onChecked(Context* ctx) {
  MainWindow* mainWin = App::instance()->mainWindow();
  if (!mainWin)
    return false;

  Timeline* timelineWin = mainWin->getTimeline();
  return (timelineWin && timelineWin->isVisible());
}
开发者ID:aseprite,项目名称:aseprite,代码行数:8,代码来源:cmd_timeline.cpp

示例5: TEST

TEST(Timeline,empty) {
	EXPECT_TRUE(Timeline().empty());
	Timeline t;
	t.emplace_back();
	t.emplace_back();
	EXPECT_TRUE(t.empty());
	t.front().add(0, Clip { 1 });
}
开发者ID:JohanAberg,项目名称:duke,代码行数:8,代码来源:timeline.cpp

示例6: isDocRangeEnabled

bool CmdTransaction::isDocRangeEnabled() const
{
#ifdef ENABLE_UI
  if (App::instance()) {
    Timeline* timeline = App::instance()->timeline();
    if (timeline && timeline->range().enabled())
      return true;
  }
#endif
  return false;
}
开发者ID:imeteora,项目名称:aseprite,代码行数:11,代码来源:cmd_transaction.cpp

示例7:

void
TimelineGroup::OnCollectionChanged (Collection *col, CollectionChangedEventArgs *args)
{
	if (PropertyHasValueNoAutoCreate (TimelineGroup::ChildrenProperty, col)) {
		if (args->GetChangedAction() == CollectionChangedActionAdd ||
		    args->GetChangedAction() == CollectionChangedActionReplace) {
			Timeline *timeline = args->GetNewItem()->AsTimeline ();
			if (timeline)
				timeline->SetHadParent (true);
		}
	}
}
开发者ID:lewing,项目名称:moon,代码行数:12,代码来源:timeline.cpp

示例8: clone

Timeline* Timeline::clone()
{
    Timeline* timeline = Timeline::create();
    timeline->_actionTag = _actionTag;

    CCObject* object = NULL;
    CCARRAY_FOREACH(_frames, object)
    {
        Frame* frame = static_cast<Frame*>(object);
        Frame* newFrame = frame->clone();
        timeline->addFrame(newFrame);
    }
开发者ID:1085075003,项目名称:quick-cocos2d-x,代码行数:12,代码来源:CCTimeLine.cpp

示例9: Get

bool Timelines::Get(const string& key, Timeline& results) {
	int size = (int)sizeof(double);
	void* records = tcbdbget(this->database, key.c_str(), key.size(), &size);
	
	if(records != NULL) {
		size_t count = size / sizeof(double);
		results.insert(results.end(), (double*)records, (double*)records + count);
		free(records);
		return true;
	} else {
		return false;
	}
}
开发者ID:besquared,项目名称:Twazlr,代码行数:13,代码来源:Timelines.cpp

示例10: Timeline

NS_TIMELINE_BEGIN

Timeline* Timeline::create()
{
    Timeline* object = new Timeline();
    if (object && object->init())
    {
        object->autorelease();
        return object;
    }
    CC_SAFE_DELETE(object);
    return NULL;
}
开发者ID:1085075003,项目名称:quick-cocos2d-x,代码行数:13,代码来源:CCTimeLine.cpp

示例11: clone

Timeline* Timeline::clone()
{
    Timeline* timeline = Timeline::create();
    timeline->_actionTag = _actionTag;

    for (auto frame : _frames)
    {
        Frame* newFrame = frame->clone();
        timeline->addFrame(newFrame);
    }

    return timeline;
}
开发者ID:RyunosukeOno,项目名称:rayjack,代码行数:13,代码来源:CCTimeLine.cpp

示例12: new

NS_TIMELINE_BEGIN

Timeline* Timeline::create()
{
    Timeline* object = new (std::nothrow) Timeline();
    if (object)
    {
        object->autorelease();
        return object;
    }
    CC_SAFE_DELETE(object);
    return nullptr;
}
开发者ID:RyunosukeOno,项目名称:rayjack,代码行数:13,代码来源:CCTimeLine.cpp

示例13: testFind

void testFind(const Timeline<int>& timeline, FindMode findMode, const initializer_list<Timed<int>*> expectedResults) {
	int i = -1;
	for (Timed<int>* expectedResult : expectedResults) {
		auto it = timeline.find(centiseconds(++i), findMode);
		if (expectedResult != nullptr) {
			EXPECT_NE(it, timeline.end()) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
			if (it != timeline.end()) {
				EXPECT_EQ(*expectedResult, *it) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
			}
		} else {
			EXPECT_EQ(timeline.end(), it) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
		}
	}
}
开发者ID:DanielSWolf,项目名称:rhubarb-lip-sync,代码行数:14,代码来源:TimelineTests.cpp

示例14: calcDocRange

DocRange CmdTransaction::calcDocRange() const
{
#ifdef ENABLE_UI
  // TODO We cannot use Context::activeSite() because it losts
  //      important information about the DocRange() (type and
  //      flags).
  if (App::instance()) {
    Timeline* timeline = App::instance()->timeline();
    if (timeline)
      return timeline->range();
  }
#endif
  return DocRange();
}
开发者ID:imeteora,项目名称:aseprite,代码行数:14,代码来源:cmd_transaction.cpp

示例15: GetChildren

// Validate this TimelineGroup by validating all of it's children
bool
TimelineGroup::Validate ()
{
	TimelineCollection *collection = GetChildren ();
	Timeline *timeline;
	
	int count = collection->GetCount ();
	for (int i = 0; i < count; i++) {
		timeline = collection->GetValueAt (i)->AsTimeline ();
		if (!timeline->Validate ())
			return false;
	}
	
	return Timeline::Validate ();
}
开发者ID:lewing,项目名称:moon,代码行数:16,代码来源:timeline.cpp


注:本文中的Timeline类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。