X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-model.cpp;h=2d60854e0fc65416de16519d30d5f04f0d9f01af;hb=d74d70d51ed70b00e29a2b6feac5419124fffc49;hp=65494e5ce0b43eb5489c7d3f68f73418ddcaa958;hpb=9346cf33ef49063185d54fbbfc186864d96c51ca;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-model.cpp b/dali-toolkit/internal/text/text-model.cpp old mode 100755 new mode 100644 index 65494e5..2d60854 --- a/dali-toolkit/internal/text/text-model.cpp +++ b/dali-toolkit/internal/text/text-model.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -20,16 +20,13 @@ namespace Dali { - namespace Toolkit { - namespace Text { - ModelPtr Model::New() { - return ModelPtr( new Model() ); + return ModelPtr(new Model()); } const Size& Model::GetControlSize() const @@ -112,6 +109,16 @@ const ColorIndex* const Model::GetColorIndices() const return mVisualModel->mColorIndices.Begin(); } +const Vector4* const Model::GetBackgroundColors() const +{ + return mVisualModel->mBackgroundColors.Begin(); +} + +const ColorIndex* const Model::GetBackgroundColorIndices() const +{ + return mVisualModel->mBackgroundColorIndices.Begin(); +} + const Vector4& Model::GetDefaultColor() const { return mVisualModel->mTextColor; @@ -152,9 +159,9 @@ Length Model::GetNumberOfUnderlineRuns() const return mVisualModel->GetNumberOfUnderlineRuns(); } -void Model::GetUnderlineRuns( GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns ) const +void Model::GetUnderlineRuns(GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns) const { - mVisualModel->GetUnderlineRuns( underlineRuns, index, numberOfRuns ); + mVisualModel->GetUnderlineRuns(underlineRuns, index, numberOfRuns); } const Vector4& Model::GetOutlineColor() const @@ -162,7 +169,7 @@ const Vector4& Model::GetOutlineColor() const return mVisualModel->GetOutlineColor(); } -float Model::GetOutlineWidth() const +uint16_t Model::GetOutlineWidth() const { return mVisualModel->GetOutlineWidth(); } @@ -182,16 +189,17 @@ Model::Model() mVisualModel(), mScrollPosition(), mScrollPositionLast(), - mHorizontalAlignment( Text::HorizontalAlignment::BEGIN ), - mVerticalAlignment( Text::VerticalAlignment::TOP ), - mVerticalLineAlignment( DevelText::VerticalLineAlignment::TOP ), - mLineWrapMode( Text::LineWrap::WORD ), - mAlignmentOffset( 0.0f ), - mElideEnabled( false ), - mIgnoreSpacesAfterText( true ) + mHorizontalAlignment(Text::HorizontalAlignment::BEGIN), + mVerticalAlignment(Text::VerticalAlignment::TOP), + mVerticalLineAlignment(DevelText::VerticalLineAlignment::TOP), + mLineWrapMode(Text::LineWrap::WORD), + mAlignmentOffset(0.0f), + mElideEnabled(false), + mIgnoreSpacesAfterText(true), + mMatchSystemLanguageDirection(false) { mLogicalModel = LogicalModel::New(); - mVisualModel = VisualModel::New(); + mVisualModel = VisualModel::New(); } Model::~Model()