mirror of
https://github.com/overte-org/overte.git
synced 2025-08-13 19:49:42 +02:00
Slight fix for shadows; we were drawing an unnecessary layer of text.
This commit is contained in:
parent
700d3de4aa
commit
00171eccbb
2 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ const Glyph& TextRenderer::getGlyph(char c) {
|
|||
painter.setFont(_font);
|
||||
if (_effectType == SHADOW_EFFECT) {
|
||||
for (int i = 0; i < _effectThickness; i++) {
|
||||
painter.drawText(-bounds.x() - i, -bounds.y() + i, ch);
|
||||
painter.drawText(-bounds.x() - 1 - i, -bounds.y() + 1 + i, ch);
|
||||
}
|
||||
} else if (_effectType == OUTLINE_EFFECT) {
|
||||
QPainterPath path;
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
enum EffectType { NO_EFFECT, SHADOW_EFFECT, OUTLINE_EFFECT };
|
||||
|
||||
TextRenderer(const char* family, int pointSize = -1, int weight = -1, bool italic = false,
|
||||
EffectType effect = NO_EFFECT, int effectThickness = 2);
|
||||
EffectType effect = NO_EFFECT, int effectThickness = 1);
|
||||
~TextRenderer();
|
||||
|
||||
const QFontMetrics& metrics() const { return _metrics; }
|
||||
|
|
Loading…
Reference in a new issue