- Image image = ResourceImage::New( DEFAULT_FRAME_IMAGE_PATH );
- mFrame = ImageActor::New( image );
- mFrame.SetStyle( ImageActor::STYLE_NINE_PATCH );
- mFrame.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
- mFrame.SetInheritScale(true);
- mFrame.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
- Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
- mFrame.SetSizeModeFactor( sizeOffset );
-
- Constraint constraint = Constraint::New<Vector3>( mFrame, Actor::Property::POSITION, EqualToConstraint() );
- constraint.AddSource( ParentSource( Actor::Property::WORLD_POSITION ) );
+ mFrame = Actor::New();
+ mFrame.SetProperty(Actor::Property::INHERIT_POSITION, false);
+ mFrame.SetProperty(Actor::Property::INHERIT_SCALE, true);
+ mFrame.SetResizePolicy(ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS);
+ Vector3 sizeOffset(IMAGE_BORDER_INDENT * 2.f - 2.f, IMAGE_BORDER_INDENT * 2.f - 2.f, 0.0f);
+ mFrame.SetProperty(Actor::Property::SIZE_MODE_FACTOR, sizeOffset);
+
+ Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
+
+ Property::Map map;
+ map[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::BORDER;
+ map[Toolkit::BorderVisual::Property::COLOR] = Color::WHITE;
+ map[Toolkit::BorderVisual::Property::SIZE] = IMAGE_BORDER_INDENT;
+ Toolkit::Visual::Base borderVisual = visualFactory.CreateVisual(map);
+ Toolkit::GetImplementation(borderVisual).SetOnScene(mFrame);
+
+ Constraint constraint = Constraint::New<Vector3>(mFrame, Actor::Property::POSITION, EqualToConstraint());
+ constraint.AddSource(ParentSource(Actor::Property::WORLD_POSITION));