gtk2: allocate background color in TextOut when drawing opaque text (same as what was done for ExtTextOut in rev 38758 #06660654be). Issue #31187

git-svn-id: trunk@53838 -
This commit is contained in:
blikblum 2017-01-02 20:00:07 +00:00
parent 42132a8872
commit 9108c60199

View File

@ -9593,15 +9593,10 @@ begin
EnsureGCColor(DC, dccCurrentTextColor, True, False);
BackGroundColor := nil;
if Assigned(DevCtx.GDIObjects[gdiBrush]) and (DevCtx.BkMode = OPAQUE) and
Assigned(DevCtx.CurrentBackColor.Colormap) then
if DevCtx.BkMode = OPAQUE then
begin
EnsureGCColor(DC, dccCurrentBackColor, DevCtx.GDIObjects[gdiBrush]^.GDIBrushFill = GDK_SOLID, True);
//do not set BackGroundColor if CurrentBrush.Color = CurrentBackColor.
//issue #22719
if TGDKColorToTColor(DevCtx.CurrentBackColor.Color) <>
TGDKColorToTColor(DevCtx.GetBrush^.GDIBrushColor.Color) then
BackGroundColor := @DevCtx.CurrentBackColor.Color;
AllocGDIColor(DC, @DevCtx.CurrentBackColor);
BackGroundColor := @DevCtx.CurrentBackColor.Color;
end;
DevCtx.DrawTextWithColors(Str, Count,