[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : gavin
Repository : xara
Revision   : 1340
Date       : Tue Jun 20 10:24:25 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/grndrgn.cpp

Altered grndrgn.cpp so that colours will be displayed correctly on Linux. This change will result in colours being displayed incorrectly unless the new version of CDraw is used.


Diff:
Index: Trunk/XaraLX/wxOil/grndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1339)
+++ Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1340)
@@ -6344,10 +6344,18 @@
 		// so inverting the alpha channel would not be correct, and it's
 		// possible that the transparency channel will not always be zero).
 		//
+#if defined(__WXGTK__)
 		for( UINT32 x=0; x<Width; ++x )
-#if defined(__WXGTK__)
-			pDLine[x] = pSBuffer[x] | 0xff000000;
+		{
+			BYTE* pS = pBYTE(pSBuffer+x);
+			BYTE* pD = pBYTE(pDLine  +x);
+			pD[0] = pS[2];
+			pD[1] = pS[1];
+			pD[2] = pS[0];
+			pD[3] = 0xFF;
+		}
 #else
+		for( UINT32 x=0; x<Width; ++x )
 			pDLine[x] = pSBuffer[x];
 #endif
 		pSBuffer -= lpBitmapInfo->bmiHeader.biWidth;


Xara