HaikuDepot: Removed no longer needed info from GlyphInfo.

This commit is contained in:
Stephan Aßmus
2013-09-05 15:52:55 +02:00
parent 68dfaf0f9d
commit 169de499b5
2 changed files with 6 additions and 23 deletions
@@ -320,8 +320,6 @@ ParagraphLayout::_Layout()
// advanceX = tabOffset - x; // advanceX = tabOffset - x;
// } // }
glyph.advanceX = advanceX;
if (glyph.charCode == '\n') { if (glyph.charCode == '\n') {
nextLine = true; nextLine = true;
lineBreak = true; lineBreak = true;
@@ -461,8 +459,7 @@ ParagraphLayout::_AppendGlyphInfo(uint32 charCode, float width,
width += style.GlyphSpacing(); width += style.GlyphSpacing();
GlyphInfo glyph(charCode, 0.0f, width, width, 0, style); return fGlyphInfos.Add(GlyphInfo(charCode, 0.0f, width, 0));
return fGlyphInfos.Add(glyph);
} }
@@ -23,21 +23,16 @@ public:
charCode(0), charCode(0),
x(0.0f), x(0.0f),
width(0.0f), width(0.0f),
advanceX(0.0f), lineIndex(0)
lineIndex(0),
style()
{ {
} }
GlyphInfo(uint32 charCode, float x, float width, float advanceX, GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)
int32 lineIndex, const CharacterStyle& style)
: :
charCode(charCode), charCode(charCode),
x(x), x(x),
width(width), width(width),
advanceX(advanceX), lineIndex(lineIndex)
lineIndex(lineIndex),
style(style)
{ {
} }
@@ -46,9 +41,7 @@ public:
charCode(other.charCode), charCode(other.charCode),
x(other.x), x(other.x),
width(other.width), width(other.width),
advanceX(other.advanceX), lineIndex(other.lineIndex)
lineIndex(other.lineIndex),
style(other.style)
{ {
} }
@@ -57,9 +50,7 @@ public:
charCode = other.charCode; charCode = other.charCode;
x = other.x; x = other.x;
width = other.width; width = other.width;
advanceX = other.advanceX;
lineIndex = other.lineIndex; lineIndex = other.lineIndex;
style = other.style;
return *this; return *this;
} }
@@ -68,9 +59,7 @@ public:
return charCode == other.charCode return charCode == other.charCode
&& x == other.x && x == other.x
&& width == other.width && width == other.width
&& advanceX == other.advanceX && lineIndex == other.lineIndex;
&& lineIndex == other.lineIndex
&& style == other.style;
} }
bool operator!=(const GlyphInfo& other) const bool operator!=(const GlyphInfo& other) const
@@ -83,11 +72,8 @@ public:
float x; float x;
float width; float width;
float advanceX;
int32 lineIndex; int32 lineIndex;
CharacterStyle style;
}; };