X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Ftext%2Ftext-visual.cpp;h=61dcdfc4d57c9a9ac0c3786e2c9bafe8b9e95650;hp=9ddbf3b21d1ca61b3da03e8101beb12791916d3b;hb=29540fc153880d6949c85786b78b8583ae8f1d37;hpb=3ed4510ab5a2673eb62a6dafe327d8cd0e78d96a diff --git a/dali-toolkit/internal/visuals/text/text-visual.cpp b/dali-toolkit/internal/visuals/text/text-visual.cpp old mode 100755 new mode 100644 index 9ddbf3b..61dcdfc --- a/dali-toolkit/internal/visuals/text/text-visual.cpp +++ b/dali-toolkit/internal/visuals/text/text-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -383,7 +383,7 @@ void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const TextVisual::TextVisual( VisualFactoryCache& factoryCache ) -: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO ), +: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO, Toolkit::Visual::TEXT ), mController( Text::Controller::New() ), mTypesetter( Text::Typesetter::New( mController->GetTextModel() ) ), mAnimatableTextColorPropertyIndex( Property::INVALID_INDEX ), @@ -421,7 +421,7 @@ void TextVisual::DoSetProperties( const Property::Map& propertyMap ) engine.SetCursorWidth( 0u ); // Do not layout space for the cursor. } -void TextVisual::DoSetOnStage( Actor& actor ) +void TextVisual::DoSetOnScene( Actor& actor ) { mControl = actor; @@ -476,7 +476,7 @@ void TextVisual::RemoveRenderer( Actor& actor ) mRendererList.clear(); } -void TextVisual::DoSetOffStage( Actor& actor ) +void TextVisual::DoSetOffScene( Actor& actor ) { RemoveRenderer( actor ); @@ -820,8 +820,11 @@ void TextVisual::AddRenderer( Actor& actor, const Vector2& size, bool hasMultipl // Get the current offset for recalculate the offset when tiling. Property::Map retMap; mImpl->mTransform.GetPropertyMap( retMap ); - Vector2 offSet = retMap.Find( Dali::Toolkit::Visual::Transform::Property::OFFSET )->Get< Vector2 >(); - info.offSet = offSet; + Property::Value* offsetValue = retMap.Find( Dali::Toolkit::Visual::Transform::Property::OFFSET ); + if( offsetValue ) + { + offsetValue->Get( info.offSet ); + } // Create a textureset in the default renderer. CreateTextureSet( info, mImpl->mRenderer, sampler, hasMultipleTextColors, containsColorGlyph, styleEnabled );