本文整理汇总了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);
}
}
示例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 ) );
}
示例3: dump
//печать анимации
void dump (const Timeline& timeline, int level)
{
print_space (level++);
printf ("Timeline '%s'\n", timeline.Name ());
dump ("layers", timeline.Layers (), level);
}
示例4: onChecked
bool TimelineCommand::onChecked(Context* ctx) {
MainWindow* mainWin = App::instance()->mainWindow();
if (!mainWin)
return false;
Timeline* timelineWin = mainWin->getTimeline();
return (timelineWin && timelineWin->isVisible());
}
示例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 });
}
示例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;
}
示例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);
}
}
}
示例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);
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
}
示例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();
}
示例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 ();
}