mOffscreenRootActor = Layer::New();
mOffscreenRootActor.SetColorMode( USE_OWN_COLOR );
mOffscreenRootActor.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
mOffscreenRootActor = Layer::New();
mOffscreenRootActor.SetColorMode( USE_OWN_COLOR );
mOffscreenRootActor.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
- mOffscreenRootActor.SetSize( offscreenSize );
- mOffscreenRootActor.SetPosition( 0.0f, 0.0f, 0.0f );
+ mOffscreenRootActor.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ mOffscreenRootActor.SetPreferredSize( offscreenSize );
mImageActor.SetParentOrigin( ParentOrigin::CENTER );
mImageActor.SetBlendFunc( BlendingFactor::ONE, BlendingFactor::ONE_MINUS_SRC_ALPHA,
BlendingFactor::ONE, BlendingFactor::ONE );
mImageActor.SetScale( Vector3( 1.0f, -1.0f, 1.0f ) );
mImageActor.SetParentOrigin( ParentOrigin::CENTER );
mImageActor.SetBlendFunc( BlendingFactor::ONE, BlendingFactor::ONE_MINUS_SRC_ALPHA,
BlendingFactor::ONE, BlendingFactor::ONE );
mImageActor.SetScale( Vector3( 1.0f, -1.0f, 1.0f ) );
// Creates a new camera actor.
mOffscreenCameraActor = CameraActor::New();
mOffscreenCameraActor.SetParentOrigin( ParentOrigin::CENTER );
// Creates a new camera actor.
mOffscreenCameraActor = CameraActor::New();
mOffscreenCameraActor.SetParentOrigin( ParentOrigin::CENTER );
mOffscreenCameraActor.SetOrthographicProjection( offscreenSize );
mOffscreenRootActor.Add( mOffscreenCameraActor ); // camera to shoot the offscreen text
// Creates a new render task.
mRenderTask = Stage::GetCurrent().GetRenderTaskList().CreateTask();
mRenderTask.SetSourceActor( mOffscreenRootActor );
mOffscreenCameraActor.SetOrthographicProjection( offscreenSize );
mOffscreenRootActor.Add( mOffscreenCameraActor ); // camera to shoot the offscreen text
// Creates a new render task.
mRenderTask = Stage::GetCurrent().GetRenderTaskList().CreateTask();
mRenderTask.SetSourceActor( mOffscreenRootActor );
mRenderTask.SetClearColor( Color::TRANSPARENT );
mRenderTask.SetClearEnabled( true );
mRenderTask.SetExclusive( true );
mRenderTask.SetClearColor( Color::TRANSPARENT );
mRenderTask.SetClearEnabled( true );
mRenderTask.SetExclusive( true );