summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f9486e8)
In painter, restrting paining regions does not really work when region is empty.
Fixes bug #11198.
int const height = fm.maxAscent() + fm.maxDescent();
int xmin = fm.pos2x(str, from, dir == RtL, wordspacing);
int xmax = fm.pos2x(str, to, dir == RtL, wordspacing);
int const height = fm.maxAscent() + fm.maxDescent();
int xmin = fm.pos2x(str, from, dir == RtL, wordspacing);
int xmax = fm.pos2x(str, to, dir == RtL, wordspacing);
+ // Avoid this case, since it would make the `other' text spill in some cases
+ if (xmin == xmax) {
+ text(x, y, str, fi, dir, wordspacing, tw);
+ return;
+ } else if (xmin > xmax)
swap(xmin, xmax);
// First the part in other color
swap(xmin, xmax);
// First the part in other color