mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
remove redundant QFontEngine::alphaMapForGlyph() overload
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
cecfa92375
commit
6923487cee
3 changed files with 3 additions and 20 deletions
|
@ -300,10 +300,7 @@ QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g, QFixed subPixelPosition
|
|||
#endif
|
||||
if (m_type == QFontEngineGlyphCache::Raster_RGBMask)
|
||||
return m_current_fontengine->alphaRGBMapForGlyph(g, subPixelPosition, m_transform);
|
||||
else
|
||||
return m_current_fontengine->alphaMapForGlyph(g, subPixelPosition, m_transform);
|
||||
|
||||
return QImage();
|
||||
return m_current_fontengine->alphaMapForGlyph(g, subPixelPosition, m_transform);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
|
|
@ -566,21 +566,8 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition*/)
|
|||
return alphaMapForGlyph(glyph);
|
||||
}
|
||||
|
||||
QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t)
|
||||
{
|
||||
QImage i = alphaMapForGlyph(glyph);
|
||||
if (t.type() > QTransform::TxTranslate)
|
||||
i = i.transformed(t).convertToFormat(QImage::Format_Indexed8);
|
||||
Q_ASSERT(i.depth() <= 8); // To verify that transformed didn't change the format...
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t)
|
||||
{
|
||||
if (! supportsSubPixelPositions())
|
||||
return alphaMapForGlyph(glyph, t);
|
||||
|
||||
QImage i = alphaMapForGlyph(glyph, subPixelPosition);
|
||||
if (t.type() > QTransform::TxTranslate)
|
||||
i = i.transformed(t).convertToFormat(QImage::Format_Indexed8);
|
||||
|
@ -589,9 +576,9 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, con
|
|||
return i;
|
||||
}
|
||||
|
||||
QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition*/, const QTransform &t)
|
||||
QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t)
|
||||
{
|
||||
QImage alphaMask = alphaMapForGlyph(glyph, t);
|
||||
QImage alphaMask = alphaMapForGlyph(glyph, subPixelPosition, t);
|
||||
QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32);
|
||||
|
||||
QVector<QRgb> colorTable = alphaMask.colorTable();
|
||||
|
|
|
@ -142,7 +142,6 @@ public:
|
|||
*/
|
||||
virtual QImage alphaMapForGlyph(glyph_t);
|
||||
virtual QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition);
|
||||
virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t);
|
||||
virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
|
||||
virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue