- // Set the colors.
- const GlyphIndex lastLaidOutGlyphIndex = glyphIndex + numberOfLaidOutGlyphs;
-
- for( Vector<ColorGlyphRun>::ConstIterator it = mImpl->mVisualModel->mColorRuns.Begin(),
- endIt = mImpl->mVisualModel->mColorRuns.End();
- it != endIt;
- ++it )
- {
- const ColorGlyphRun& colorGlyphRun = *it;
- const GlyphIndex lastGlyphIndex = colorGlyphRun.glyphRun.glyphIndex + colorGlyphRun.glyphRun.numberOfGlyphs;
-
- if( ( colorGlyphRun.glyphRun.glyphIndex < lastLaidOutGlyphIndex ) &&
- ( glyphIndex < lastGlyphIndex ) )
- {
- for( GlyphIndex index = glyphIndex < colorGlyphRun.glyphRun.glyphIndex ? colorGlyphRun.glyphRun.glyphIndex : glyphIndex,
- endIndex = lastLaidOutGlyphIndex < lastGlyphIndex ? lastLaidOutGlyphIndex : lastGlyphIndex;
- index < endIndex;
- ++index )
- {
- *( glyphColors + index - glyphIndex ) = colorGlyphRun.color;
- }
- }
- }
-