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
This commit is contained in:
@@ -156,7 +156,7 @@ public:
|
||||
sal_uLong nSalFrameStyle,
|
||||
SystemParentData *pSysParent )
|
||||
: SvpSalFrame( pInstance, pParent, nSalFrameStyle,
|
||||
true, basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA,
|
||||
true, basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA,
|
||||
pSysParent )
|
||||
{
|
||||
enableDamageTracker();
|
||||
@@ -361,7 +361,7 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg )
|
||||
CGImageCreate( aDevice->getSize().getX(), aDevice->getSize().getY(),
|
||||
8, 32, aDevice->getScanlineStride(),
|
||||
CGColorSpaceCreateDeviceRGB(),
|
||||
kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little,
|
||||
kCGImageAlphaNoneSkipLast,
|
||||
provider,
|
||||
NULL,
|
||||
false,
|
||||
@@ -403,7 +403,7 @@ touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeigh
|
||||
32,
|
||||
sourceBytesPerRow,
|
||||
CGColorSpaceCreateDeviceRGB(),
|
||||
kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little,
|
||||
kCGImageAlphaNoneSkipLast,
|
||||
provider,
|
||||
NULL,
|
||||
false,
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user