本文整理汇总了C++中Animation::Resize方法的典型用法代码示例。如果您正苦于以下问题:C++ Animation::Resize方法的具体用法?C++ Animation::Resize怎么用?C++ Animation::Resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Animation
的用法示例。
在下文中一共展示了Animation::Resize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetResizeAnimation
void RollLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const
{
if(animation)
{
animation.Resize(actor, size);
}
}
示例2: UtcDaliControlImplSizeAnimation
int UtcDaliControlImplSizeAnimation(void)
{
ToolkitTestApplication application;
{
DummyControl dummy = DummyControl::New( true );
DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
Stage::GetCurrent().Add(dummy);
DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, false, TEST_LOCATION );
Animation animation = Animation::New(1.0f);
animation.Resize(dummy, Vector3(100.0f, 150.0f, 200.0f));
animation.Play();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
Stage::GetCurrent().Add(dummy);
Animation animation = Animation::New(1.0f);
animation.Resize(dummy, Vector3(100.0f, 150.0f, 200.0f));
animation.Play();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
Stage::GetCurrent().Remove(dummy);
}
END_TEST;
}
示例3: Create
// The Init signal is received once (only) during the Application lifetime
void Create( Application& application )
{
//std::cout << "HelloWorldController::Create" << std::endl;
// Get a handle to the stage
Stage stage = Stage::GetCurrent();
//ImageActor bgActor = ImageActor::New(CreateBitmapImage(480, 800));
Control bgActor = Control::New();
bgActor.SetSize(64 * STAGE_COL, 64 * STAGE_ROW);
//bgActor.SetBackgroundColor(Vector4(.125f, .125f, .125f, 1.f));
bgActor.SetBackgroundColor(Vector4(1.f, 1.f, 1.f, 1.f));
bgActor.SetParentOrigin(ParentOrigin::CENTER);
bgActor.SetAnchorPoint(AnchorPoint::CENTER);
bgActor.SetZ(0.1f);
//stage.Add(bgActor);
ResourceImage spriteImage = ResourceImage::New(PUYO_IMAGE);
// background
{
ResourceImage image = ResourceImage::New(BACKGROUND_IMAGE);
ImageActor actor = ImageActor::New(image);
actor.SetParentOrigin(ParentOrigin::BOTTOM_LEFT);
actor.SetAnchorPoint(AnchorPoint::BOTTOM_LEFT);
stage.Add(actor);
}
// sprites
{
ImageActor actor[STAGE_COL * STAGE_ROW];
for (int i = 0; i < STAGE_ROW; i++)
{
for (int j = 0; j < STAGE_COL; j++)
{
actor[i * STAGE_COL + j] = ImageActor::New(spriteImage, PUYO_OFFSET[int(Random::Range(0.f, NUM_PUYO))]);
actor[i * STAGE_COL + j].SetParentOrigin(ParentOrigin::BOTTOM_LEFT);
actor[i * STAGE_COL + j].SetAnchorPoint(AnchorPoint::BOTTOM_LEFT);
actor[i * STAGE_COL + j].SetX(i * 60.f);
actor[i * STAGE_COL + j].SetY(j * -1.f * 60.f);
actor[i * STAGE_COL + j].SetZ(0.1f);
stage.Add(actor[i * STAGE_COL + j]);
}
}
#if 0
Animation anim = Animation::New(1.f);
for (int i = 0; i < STAGE_ROW; i++)
{
for (int j = 0; j < STAGE_COL; j++)
{
anim.MoveBy(actor[i * STAGE_COL + j], Vector3(0.f, j * _(7), 0.1f), AlphaFunctions::Bounce);
anim.Resize(actor[i * STAGE_COL + j], _(32), _(25), AlphaFunctions::Bounce);
anim.SetLooping(true);
}
}
anim.Play();
#endif
}
{
ImageActor actor = ImageActor::New(spriteImage, ImageActor::PixelArea(0, 224, 64, 64));
actor.SetParentOrigin(ParentOrigin::CENTER);
actor.SetAnchorPoint(AnchorPoint::CENTER);
actor.SetSize(_(32), _(32));
actor.SetZ(0.1f);
//stage.Add(actor);
}
// Respond to a click anywhere on the stage
stage.GetRootLayer().TouchedSignal().Connect( this, &HelloWorldController::OnTouch );
}