From 8df1188cc77ff7275bfcafec30b15c02d3746df8 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Thu, 27 Oct 2016 19:34:24 +0000 Subject: [PATCH] cocoa: Patch from bug #30778 fix Textout BG color git-svn-id: trunk@53241 - --- lcl/interfaces/cocoa/cocoagdiobjects.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/cocoa/cocoagdiobjects.pas b/lcl/interfaces/cocoa/cocoagdiobjects.pas index 752215329f..1f695e5a5b 100644 --- a/lcl/interfaces/cocoa/cocoagdiobjects.pas +++ b/lcl/interfaces/cocoa/cocoagdiobjects.pas @@ -3027,6 +3027,7 @@ var AROP2: Integer; APatternSpace: CGColorSpaceRef; BaseSpace: CGColorSpaceRef; + AColor: CGColorRef; begin if ADC = nil then Exit; @@ -3061,7 +3062,10 @@ begin CGContextSetFillPattern(ADC.CGcontext, FCGPattern, @RGBA[0]); end else - CGContextSetRGBFillColor(ADC.CGContext, RGBA[0], RGBA[1], RGBA[2], RGBA[3]); + begin + AColor := CGColorCreateGenericRGB(RGBA[0], RGBA[1], RGBA[2], RGBA[3]); + CGContextSetFillColorWithColor(ADC.CGContext, AColor); + end; end; { TCocoaGDIObject }