1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

OpenGL rendering fix.

This commit is contained in:
jules 2013-08-13 15:12:54 +01:00
parent 48ae5d16a7
commit 87182ece27

View file

@ -1369,12 +1369,31 @@ public:
{
if (clip != nullptr)
{
if (trans.isOnlyTranslation() && transform.isOnlyTranslated)
if (trans.isOnlyTranslation() && ! transform.isRotated)
{
RenderingHelpers::GlyphCache <RenderingHelpers::CachedGlyphEdgeTable <SavedState>, SavedState>::getInstance()
.drawGlyph (*this, font, glyphNumber,
trans.getTranslationX(),
trans.getTranslationY());
typedef RenderingHelpers::GlyphCache <RenderingHelpers::CachedGlyphEdgeTable <SavedState>, SavedState> GlyphCacheType;
GlyphCacheType& cache = GlyphCacheType::getInstance();
Point<float> pos (trans.getTranslationX(), trans.getTranslationY());
if (transform.isOnlyTranslated)
{
cache.drawGlyph (*this, font, glyphNumber, pos + transform.offset.toFloat());
}
else
{
pos = transform.transformed (pos);
Font f (font);
f.setHeight (font.getHeight() * transform.complexTransform.mat11);
const float xScale = transform.complexTransform.mat00 / transform.complexTransform.mat11;
if (std::abs (xScale - 1.0f) > 0.01f)
f.setHorizontalScale (xScale);
cache.drawGlyph (*this, f, glyphNumber, pos);
}
}
else
{