X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fvisual-model-impl.cpp;h=6ac00cd2ac821a6638bc63e350cd422226e8b96b;hb=29a52105283ce8ced672ed92545daeacf882316a;hp=5fa384335036580b94e7e9feb557cb550e34ce31;hpb=22fd3cd73ef12d4ef88f12eed11a2d6665a34c5a;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/visual-model-impl.cpp b/dali-toolkit/internal/text/visual-model-impl.cpp index 5fa3843..6ac00cd 100644 --- a/dali-toolkit/internal/text/visual-model-impl.cpp +++ b/dali-toolkit/internal/text/visual-model-impl.cpp @@ -204,6 +204,11 @@ void VisualModel::GetGlyphPositions(Vector2* glyphPositions, memcpy(glyphPositions, mGlyphPositions.Begin() + glyphIndex, numberOfGlyphs * sizeof(Vector2)); } +Length VisualModel::GetTotalNumberOfLines() const +{ + return mLines.Size(); +} + void VisualModel::GetNumberOfLines(GlyphIndex glyphIndex, Length numberOfGlyphs, LineIndex& firstLine, @@ -375,6 +380,21 @@ void VisualModel::SetUnderlineHeight(float height) mUnderlineHeight = height; } +void VisualModel::SetUnderlineType(Text::Underline::Type type) +{ + mUnderlineType = type; +} + +void VisualModel::SetDashedUnderlineWidth(float width) +{ + mDashedUnderlineWidth = width; +} + +void VisualModel::SetDashedUnderlineGap(float gap) +{ + mDashedUnderlineGap = gap; +} + void VisualModel::SetOutlineWidth(uint16_t width) { mOutlineWidth = width; @@ -425,6 +445,21 @@ void VisualModel::SetSecondMiddleIndexOfElidedGlyphs(GlyphIndex secondMiddleInde mSecondMiddleIndexOfElidedGlyphs = secondMiddleIndexOfElidedGlyphs; } +void VisualModel::SetStrikethroughColor(const Vector4& color) +{ + mStrikethroughColor = color; +} + +void VisualModel::SetStrikethroughEnabled(bool enabled) +{ + mStrikethroughEnabled = enabled; +} + +void VisualModel::SetStrikethroughHeight(float height) +{ + mStrikethroughHeight = height; +} + const Vector4& VisualModel::GetTextColor() const { return mTextColor; @@ -465,6 +500,21 @@ float VisualModel::GetUnderlineHeight() const return mUnderlineHeight; } +Text::Underline::Type VisualModel::GetUnderlineType() const +{ + return mUnderlineType; +} + +float VisualModel::GetDashedUnderlineWidth() const +{ + return mDashedUnderlineWidth; +} + +float VisualModel::GetDashedUnderlineGap() const +{ + return mDashedUnderlineGap; +} + uint16_t VisualModel::GetOutlineWidth() const { return mOutlineWidth; @@ -520,6 +570,21 @@ Length VisualModel::GetNumberOfUnderlineRuns() const return mUnderlineRuns.Count(); } +const Vector4& VisualModel::GetStrikethroughColor() const +{ + return mStrikethroughColor; +} + +bool VisualModel::IsStrikethroughEnabled() const +{ + return mStrikethroughEnabled; +} + +float VisualModel::GetStrikethroughHeight() const +{ + return mStrikethroughHeight; +} + void VisualModel::ClearCaches() { mCachedLineIndex = 0u; @@ -542,9 +607,14 @@ VisualModel::VisualModel() mUnderlineColor(Color::BLACK), mOutlineColor(Color::WHITE), mBackgroundColor(Color::TRANSPARENT), + mStrikethroughColor(Color::BLACK), mControlSize(), mShadowOffset(), mUnderlineHeight(0.0f), + mStrikethroughHeight(0.0f), + mUnderlineType(Text::Underline::SOLID), + mDashedUnderlineWidth(2.0f), + mDashedUnderlineGap(1.0f), mShadowBlurRadius(0.0f), mOutlineWidth(0u), mNaturalSize(), @@ -559,7 +629,8 @@ VisualModel::VisualModel() mUnderlineEnabled(false), mUnderlineColorSet(false), mBackgroundEnabled(false), - mMarkupProcessorEnabled(false) + mMarkupProcessorEnabled(false), + mStrikethroughEnabled(false) { }