summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/coretext/ctfonts.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/coretext/ctfonts.cxx b/vcl/coretext/ctfonts.cxx
index c7dd57ba9115..626e7d2f5d67 100644
--- a/vcl/coretext/ctfonts.cxx
+++ b/vcl/coretext/ctfonts.cxx
@@ -258,8 +258,10 @@ bool CTTextStyle::GetGlyphOutline( sal_GlyphId nGlyphId, basegfx::B2DPolyPolygon
void CTTextStyle::SetTextColor( const RGBAColor& rColor )
{
- CGColorRef pCGColor = CGColorCreateGenericRGB( rColor.GetRed(),
- rColor.GetGreen(), rColor.GetBlue(), rColor.GetAlpha() );
+ CGFloat aColor[] = { rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue(), rColor.GetAlpha() };
+ CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB();
+ CGColorRef pCGColor = CGColorCreate( cs, aColor );
+ CGColorSpaceRelease( cs );
CFDictionarySetValue( mpStyleDict, kCTForegroundColorAttributeName, pCGColor );
CFRelease( pCGColor);
}