[Libreoffice-commits] core.git: vcl/coretext
Tor Lillqvist
tml at iki.fi
Wed Jun 5 13:12:27 PDT 2013
vcl/coretext/ctfonts.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit f2e5461f5615650745f6a846be461d97f6caf2b5
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Jun 5 23:11:35 2013 +0300
CGColorCreateGenericRGB is not available on iOS
Change-Id: Id7c6077ea0e45d848be099d48ef4d7207e65a06f
diff --git a/vcl/coretext/ctfonts.cxx b/vcl/coretext/ctfonts.cxx
index c7dd57b..626e7d2 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);
}
More information about the Libreoffice-commits
mailing list