diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-12-11 18:11:22 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-12-11 18:17:18 +0200 |
commit | 69baf700b6ac9c069022714c3d661a632ade93a3 (patch) | |
tree | 26ca14be48b3fe46753dd6131974ee7fde0d6489 /vcl/quartz | |
parent | Related: rhbz#1040291 Change language name from 'Oriya' to 'Odia' (diff) | |
download | core-69baf700b6ac9c069022714c3d661a632ade93a3.tar.gz core-69baf700b6ac9c069022714c3d661a632ade93a3.zip |
Try to fix colour issues
Use RGBA consistenly. Wonder why the code was changed to use BGRA at
some point?
I got the picture in the document to show up with correct colours but
unfortunately not the RED GREEN BLUE etc text. Weird. Even weirder, if
I add a temporary hack in CoreTextStyle::SetTextColor() to use some
other colours for non-black text (instead of the ones passed in the
parameter), those colours do show up. This is a mystery.
Change-Id: I591424a19fa02b3f095035e989cbc49fff94b8ca
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salgdi.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 0a48e2d6b2f6..ee802056a2d3 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -302,6 +302,7 @@ AquaSalGraphics::~AquaSalGraphics() void AquaSalGraphics::SetTextColor( SalColor nSalColor ) { maTextColor = RGBAColor( nSalColor ); + // SAL_ DEBUG(std::hex << nSalColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}"); if( mpTextStyle) mpTextStyle->SetTextColor( maTextColor ); } @@ -819,6 +820,13 @@ bool SvpSalGraphics::CheckContext() CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipLast); break; + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: + mrContext = CGBitmapContextCreate(pixelBuffer.get(), + bufferSize.getX(), bufferSize.getY(), + 8, scanlineStride, + CGColorSpaceCreateDeviceRGB(), + kCGImageAlphaNoneSkipFirst); + break; case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: mrContext = CGBitmapContextCreate(pixelBuffer.get(), bufferSize.getX(), bufferSize.getY(), @@ -826,6 +834,13 @@ bool SvpSalGraphics::CheckContext() CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little); break; + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: + mrContext = CGBitmapContextCreate(pixelBuffer.get(), + bufferSize.getX(), bufferSize.getY(), + 8, scanlineStride, + CGColorSpaceCreateDeviceRGB(), + kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Little); + break; default: SAL_WARN( "vcl.ios", "CheckContext: unsupported color format " << basebmp::formatName( m_aDevice->getScanlineFormat() ) ); warned = true; |