mActor = Actor::New();
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mActor.SetSize( textSize );
+ mActor.SetProperty( Actor::Property::SIZE, textSize );
mActor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR );
}
}
// Move the origin (0,0) of the mesh to the center of the actor
- const Vector2 position = *( positionsBuffer + i ) - halfTextSize - lineOffsetPosition;
+ const Vector2& temp = *( positionsBuffer + i );
+ const Vector2 position = Vector2( roundf( temp.x ), temp.y ) - halfTextSize - lineOffsetPosition; // roundf() avoids pixel alignment issues.
if ( 0u != slot.mImageId ) // invalid slot id, glyph has failed to be added to atlas
{
// Keep all of the origins aligned
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
actor.RegisterProperty("uOffset", Vector2::ZERO );
actor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR );