/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
if(lastGlyphIndexOfLine == index)
{
- penY += -line->descender;
+ penY += -line->descender + line->lineSpacing;
// Get the next line.
++lineIndex;
lastGlyphIndexOfLine = (line->isSplitToTwoHalves ? line->glyphRunSecondHalf.glyphIndex + line->glyphRunSecondHalf.numberOfGlyphs : line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs) - 1u;
- penY += line->ascender + line->lineSpacing;
+ penY += line->ascender;
}
}
}
return 0.0f;
}
+Text::Underline::Type View::GetUnderlineType() const
+{
+ Text::Underline::Type type = Text::Underline::Type::SOLID;
+ if(mImpl->mVisualModel)
+ {
+ type = mImpl->mVisualModel->GetUnderlineType();
+ }
+ return type;
+}
+
+float View::GetDashedUnderlineWidth() const
+{
+ float width = 0.0f;
+ if(mImpl->mVisualModel)
+ {
+ width = mImpl->mVisualModel->GetDashedUnderlineWidth();
+ }
+ return width;
+}
+
+float View::GetDashedUnderlineGap() const
+{
+ float gap = 0.0f;
+ if(mImpl->mVisualModel)
+ {
+ gap = mImpl->mVisualModel->GetDashedUnderlineGap();
+ }
+ return gap;
+}
+
Length View::GetNumberOfUnderlineRuns() const
{
if(mImpl->mVisualModel)
return secondMiddleIndexOfElidedGlyphs;
}
+const Vector4& View::GetStrikethroughColor() const
+{
+ return (mImpl->mVisualModel) ? mImpl->mVisualModel->GetStrikethroughColor() : Vector4::ZERO;
+}
+
+bool View::IsStrikethroughEnabled() const
+{
+ return (mImpl->mVisualModel) ? mImpl->mVisualModel->IsStrikethroughEnabled() : false;
+}
+
+float View::GetStrikethroughHeight() const
+{
+ return (mImpl->mVisualModel) ? mImpl->mVisualModel->GetStrikethroughHeight() : 0.0f;
+}
+
+Length View::GetNumberOfStrikethroughRuns() const
+{
+ if(mImpl->mVisualModel)
+ {
+ return mImpl->mVisualModel->GetNumberOfStrikethroughRuns();
+ }
+
+ return 0u;
+}
+
+void View::GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns,
+ StrikethroughRunIndex index,
+ Length numberOfRuns) const
+{
+ if(mImpl->mVisualModel)
+ {
+ mImpl->mVisualModel->GetStrikethroughRuns(strikethroughRuns,
+ index,
+ numberOfRuns);
+ }
+}
+
} // namespace Text
} // namespace Toolkit