summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qglyphrun.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-10-12 08:25:45 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-14 23:39:46 +0200
commit23e559473594b4d671405923ecd07d0f04047239 (patch)
tree4b9ff0e46dc00adf9b2999a784b47a2c729dd1cc /src/gui/text/qglyphrun.cpp
parentb2a45e02a23fcbc9db29d700e2abaf627a1fdedf (diff)
Add QGlyphRun::SplitLigature flag
If the glyph run is generated based on characters which split a ligature glyph, it needs to include the ligature glyph in the run, and when painting, we need to clip the painter to the reported bounding rect of the run in order to avoid painting too much of the ligature. To make it possible to reduce clipping to a minimum, we need a flag to inform of whether the glyph run contains a split ligature or not. Change-Id: Id787e0bec6d6e8e06cc818700ae0fca22cf81e98 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/gui/text/qglyphrun.cpp')
-rw-r--r--src/gui/text/qglyphrun.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp
index a4e9048678..0457202a18 100644
--- a/src/gui/text/qglyphrun.cpp
+++ b/src/gui/text/qglyphrun.cpp
@@ -100,6 +100,14 @@ QT_BEGIN_NAMESPACE
\value RightToLeft Indicates that the glyphs are ordered right to left. This can affect the
positioning of other screen elements that are relative to the glyph run, such as an inline
text object.
+ \value SplitLigature Indicates that the glyph run splits a ligature glyph. This means
+ that a ligature glyph is included in the run, but the characters represented by it corresponds
+ only to part of that ligature. The glyph run's boundingRect() function can in this case be used
+ to retrieve the area covered by glyphs that correspond to the characters represented by the
+ glyph run. When visualizing the glyphs, care needs to be taken to clip to this bounding rect to
+ ensure that only the corresponding part of the ligature is painted. In particular, this can be
+ the case when retrieving a glyph run from a QTextLayout for a specific character range, e.g.
+ when retrieving the selected area of a QTextLayout.
*/
/*!