diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-06-05 23:11:35 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-06-05 23:11:58 +0300 |
commit | f2e5461f5615650745f6a846be461d97f6caf2b5 (patch) | |
tree | 9d1aee8b4ad7e244b32997a6003194315a9e8935 | |
parent | b78adb500a21161e122603c25047a82db3997dfc (diff) |
CGColorCreateGenericRGB is not available on iOS
Change-Id: Id7c6077ea0e45d848be099d48ef4d7207e65a06f
-rw-r--r-- | vcl/coretext/ctfonts.cxx | 6 |
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); } |