/*
- * 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.
memcpy(glyphPositions, mGlyphPositions.Begin() + glyphIndex, numberOfGlyphs * sizeof(Vector2));
}
+Length VisualModel::GetTotalNumberOfLines() const
+{
+ return mLines.Size();
+}
+
void VisualModel::GetNumberOfLines(GlyphIndex glyphIndex,
Length numberOfGlyphs,
LineIndex& firstLine,
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;
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;
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;
return mUnderlineRuns.Count();
}
+const Vector4& VisualModel::GetStrikethroughColor() const
+{
+ return mStrikethroughColor;
+}
+
+bool VisualModel::IsStrikethroughEnabled() const
+{
+ return mStrikethroughEnabled;
+}
+
+float VisualModel::GetStrikethroughHeight() const
+{
+ return mStrikethroughHeight;
+}
+
+void VisualModel::GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns,
+ StrikethroughRunIndex index,
+ Length numberOfRuns) const
+{
+ memcpy(strikethroughRuns,
+ mStrikethroughRuns.Begin() + index,
+ numberOfRuns * sizeof(StrikethroughGlyphRun));
+}
+
+Length VisualModel::GetNumberOfStrikethroughRuns() const
+{
+ return mStrikethroughRuns.Count();
+}
+
void VisualModel::ClearCaches()
{
mCachedLineIndex = 0u;
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(),
mUnderlineEnabled(false),
mUnderlineColorSet(false),
mBackgroundEnabled(false),
- mMarkupProcessorEnabled(false)
+ mMarkupProcessorEnabled(false),
+ mStrikethroughEnabled(false)
{
}