From f2e5461f5615650745f6a846be461d97f6caf2b5 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 5 Jun 2013 23:11:35 +0300 Subject: CGColorCreateGenericRGB is not available on iOS Change-Id: Id7c6077ea0e45d848be099d48ef4d7207e65a06f --- vcl/coretext/ctfonts.cxx | 6 ++++-- 1 file 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); } -- cgit v1.2.3