summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-23 16:26:59 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-23 16:47:40 (GMT)
commit6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f (patch)
tree7f01eabffcea2c3ece4d953470e0d1db76a3bc02 /src/gui/image
parent283b6815586a87e458732534bc3c9c76b38ba49f (diff)
downloadQt-6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f.zip
Qt-6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f.tar.gz
Qt-6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f.tar.bz2
Add private qt_draw_glyphs() API
In some use cases where you use an external font engine and want to use Qt's font engine for painting, you might need a function which will give you direct access to the underlying font. A generic API for this requires a lot of API changes, so in the meantime, we implement an internal, specialized API to support the use cases where it is required. The API is considered internal and experimental, and not guaranteed to be stable or even exist across releases. This is API which provides several fun ways to shoot yourself in the foot, but if used properly, it will allow you to paint glyph ids at precalculated positions. Task-number: QTBUG-7844 Reviewed-by: Trond
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpaintengine_pic.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/image/qpaintengine_pic.cpp b/src/gui/image/qpaintengine_pic.cpp
index 1aeb524..029154b 100644
--- a/src/gui/image/qpaintengine_pic.cpp
+++ b/src/gui/image/qpaintengine_pic.cpp
@@ -486,8 +486,11 @@ void QPicturePaintEngine::drawTextItem(const QPointF &p , const QTextItem &ti)
qDebug() << " -> drawTextItem():" << p << ti.text();
#endif
+ const QTextItemInt &si = static_cast<const QTextItemInt &>(ti);
+ if (si.chars == 0)
+ QPaintEngine::drawTextItem(p, ti); // Draw as path
+
if (d->pic_d->formatMajor >= 9) {
- const QTextItemInt &si = static_cast<const QTextItemInt &>(ti);
int pos;
SERIALIZE_CMD(QPicturePrivate::PdcDrawTextItem);
QFont fnt = ti.font();