}
}
+LineIndex VisualModel::GetLineOfGlyph( GlyphIndex glyphIndex )
+{
+ const CharacterIndex characterIndex = *(mGlyphsToCharacters.Begin() + glyphIndex);
+ return GetLineOfCharacter(characterIndex);
+}
+
void VisualModel::GetLinesOfGlyphRange(LineRun* lines,
GlyphIndex glyphIndex,
Length numberOfGlyphs) const
return index;
}
-void VisualModel::GetUnderlineRuns(GlyphRun* underlineRuns,
- UnderlineRunIndex index,
- Length numberOfRuns) const
+void VisualModel::GetUnderlineRuns(UnderlinedGlyphRun* underlineRuns,
+ UnderlineRunIndex index,
+ Length numberOfRuns) const
{
memcpy(underlineRuns,
mUnderlineRuns.Begin() + index,
- numberOfRuns * sizeof(GlyphRun));
+ numberOfRuns * sizeof(UnderlinedGlyphRun));
}
void VisualModel::SetNaturalSize(const Vector2& size)
return mLayoutSize;
}
+void VisualModel::SetHeightForWidth(const Vector2& size)
+{
+ mHeightForWidth = size;
+}
+
+const Vector2& VisualModel::GetHeightForWidth() const
+{
+ return mHeightForWidth;
+}
+
void VisualModel::SetTextColor(const Vector4& textColor)
{
mTextColor = textColor;
return mStrikethroughRuns.Count();
}
+Length VisualModel::GetNumberOfCharacterSpacingGlyphRuns() const
+{
+ return mCharacterSpacingRuns.Count();
+}
+
+const Vector<CharacterSpacingGlyphRun>& VisualModel::GetCharacterSpacingGlyphRuns() const
+{
+ return mCharacterSpacingRuns;
+}
+
void VisualModel::ClearCaches()
{
mCachedLineIndex = 0u;
mOutlineWidth(0u),
mNaturalSize(),
mLayoutSize(),
+ mHeightForWidth(0.0f, 0.0f),
mCachedLineIndex(0u),
mEllipsisPosition(DevelText::EllipsisPosition::END),
mStartIndexOfElidedGlyphs(0u),