Fixed background drawing on Windows.
This commit is contained in:
parent
f2b158b529
commit
0f2b2b1fe5
|
@ -110,12 +110,15 @@ static int processAttribute(uiAttributedString *s, uiAttributeSpec *spec, size_t
|
|||
struct foreachParams *p = (struct foreachParams *) data;
|
||||
DWRITE_TEXT_RANGE range;
|
||||
WCHAR *wfamily;
|
||||
size_t ostart, oend;
|
||||
BOOL hasUnderline;
|
||||
uint32_t vertval;
|
||||
WCHAR *localeName;
|
||||
struct otParam op;
|
||||
HRESULT hr;
|
||||
|
||||
ostart = start;
|
||||
oend = end;
|
||||
start = attrstrUTF8ToUTF16(s, start);
|
||||
end = attrstrUTF8ToUTF16(s, end);
|
||||
range.startPosition = start;
|
||||
|
@ -170,7 +173,7 @@ static int processAttribute(uiAttributedString *s, uiAttributeSpec *spec, size_t
|
|||
break;
|
||||
case uiAttributeBackground:
|
||||
p->backgroundFuncs->push_back(
|
||||
mkBackgroundFunc(start, end,
|
||||
mkBackgroundFunc(ostart, oend,
|
||||
spec->R, spec->G, spec->B, spec->A));
|
||||
break;
|
||||
case uiAttributeVerticalForms:
|
||||
|
|
|
@ -500,7 +500,6 @@ void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y)
|
|||
textRenderer *renderer;
|
||||
HRESULT hr;
|
||||
|
||||
// TODO the "any combination of the above" one isn't drawn in the right place but the "multiple backgrounds" one is (at least for when there's a line break; TODO)
|
||||
for (const auto &f : *(tl->backgroundFuncs))
|
||||
f(c, tl, x, y);
|
||||
|
||||
|
|
Loading…
Reference in New Issue