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,14 +9593,9 @@ begin
EnsureGCColor(DC, dccCurrentTextColor, True, False); EnsureGCColor(DC, dccCurrentTextColor, True, False);
BackGroundColor := nil; BackGroundColor := nil;
if Assigned(DevCtx.GDIObjects[gdiBrush]) and (DevCtx.BkMode = OPAQUE) and if DevCtx.BkMode = OPAQUE then
Assigned(DevCtx.CurrentBackColor.Colormap) then
begin begin
EnsureGCColor(DC, dccCurrentBackColor, DevCtx.GDIObjects[gdiBrush]^.GDIBrushFill = GDK_SOLID, True); AllocGDIColor(DC, @DevCtx.CurrentBackColor);
//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; BackGroundColor := @DevCtx.CurrentBackColor.Color;
end; end;