incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yda...@apache.org
Subject svn commit: r1292826 - in /incubator/ooo/trunk/main/vcl: inc/os2/salgdi.h os2/source/gdi/salgdi.cxx os2/source/gdi/salgdi2.cxx os2/source/gdi/salgdi3.cxx
Date Thu, 23 Feb 2012 15:19:04 GMT
Author: ydario
Date: Thu Feb 23 15:19:04 2012
New Revision: 1292826

URL: http://svn.apache.org/viewvc?rev=1292826&view=rev
Log:
i118923 - OS/2 port: use standard macro to create RGB colors, fixes vcl black backgrounds.

Modified:
    incubator/ooo/trunk/main/vcl/inc/os2/salgdi.h
    incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi.cxx
    incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi2.cxx
    incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi3.cxx

Modified: incubator/ooo/trunk/main/vcl/inc/os2/salgdi.h
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/inc/os2/salgdi.h?rev=1292826&r1=1292825&r2=1292826&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/inc/os2/salgdi.h (original)
+++ incubator/ooo/trunk/main/vcl/inc/os2/salgdi.h Thu Feb 23 15:19:04 2012
@@ -340,7 +340,6 @@ void ImplSalDeInitGraphics( Os2SalGraphi
 // - Defines -
 // -----------
 
-#define RGBCOLOR(r,g,b) 	((ULONG)(((PM_BYTE)(b)|((USHORT)(g)<<8))|(((ULONG)(PM_BYTE)(r))<<16)))
 #define TY( y ) 			(mnHeight-(y)-1)
 
 // offset for lcid field, used for fallback font selection

Modified: incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi.cxx?rev=1292826&r1=1292825&r2=1292826&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi.cxx (original)
+++ incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi.cxx Thu Feb 23 15:19:04 2012
@@ -295,7 +295,7 @@ void Os2SalGraphics::SetLineColor( SalCo
 	LINEBUNDLE lb;
 
 	// set color
-	lb.lColor = RGBCOLOR( SALCOLOR_RED( nSalColor ),
+	lb.lColor = MAKE_SALCOLOR( SALCOLOR_RED( nSalColor ),
 						  SALCOLOR_GREEN( nSalColor ),
 						  SALCOLOR_BLUE( nSalColor ) );
 
@@ -324,7 +324,7 @@ void Os2SalGraphics::SetFillColor( SalCo
 	AREABUNDLE ab;
 
 	// set color
-	ab.lColor = RGBCOLOR( SALCOLOR_RED( nSalColor ),
+	ab.lColor = MAKE_SALCOLOR( SALCOLOR_RED( nSalColor ),
 						  SALCOLOR_GREEN( nSalColor ),
 						  SALCOLOR_BLUE( nSalColor ) );
 
@@ -413,7 +413,7 @@ void Os2SalGraphics::drawPixel( long nX,
 
 	// set new color
 	LINEBUNDLE lb;
-	lb.lColor = RGBCOLOR( SALCOLOR_RED( nSalColor ),
+	lb.lColor = MAKE_SALCOLOR( SALCOLOR_RED( nSalColor ),
 						  SALCOLOR_GREEN( nSalColor ),
 						  SALCOLOR_BLUE( nSalColor ) );
 	Ft2SetAttrs( mhPS,

Modified: incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi2.cxx?rev=1292826&r1=1292825&r2=1292826&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi2.cxx (original)
+++ incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi2.cxx Thu Feb 23 15:19:04 2012
@@ -563,13 +563,13 @@ void Os2SalGraphics::drawMask( const Sal
 	HPS 		hPS = mhPS;
 	IMAGEBUNDLE aBundle, aOldBundle;
 	AREABUNDLE	aAreaBundle, aOldAreaBundle;
-	const ULONG    nColor = RGBCOLOR( SALCOLOR_RED( nMaskColor ),
+	const ULONG    nColor = MAKE_SALCOLOR( SALCOLOR_RED( nMaskColor ),
 									SALCOLOR_GREEN( nMaskColor ),
 									SALCOLOR_BLUE( nMaskColor ) );
 
 	GpiQueryAttrs( hPS, PRIM_IMAGE, IBB_COLOR | IBB_BACK_COLOR, &aOldBundle );
-	aBundle.lColor = RGBCOLOR( 0, 0, 0 );
-	aBundle.lBackColor = RGBCOLOR( 0xFF, 0xFF, 0xFF );
+	aBundle.lColor = MAKE_SALCOLOR( 0, 0, 0 );
+	aBundle.lBackColor = MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF );
 	Ft2SetAttrs( hPS, PRIM_IMAGE, IBB_COLOR | IBB_BACK_COLOR, 0, &aBundle );
 
 	GpiQueryAttrs( hPS, PRIM_AREA, ABB_COLOR | ABB_BACK_COLOR | ABB_SYMBOL |
@@ -674,7 +674,7 @@ void Os2SalGraphics::invert( long nX, lo
 		GpiQueryAttrs( mhPS, PRIM_LINE, LBB_MIX_MODE | LBB_TYPE | LBB_COLOR, &oldLb );
 
 		// set linetype to short dash
-		lb.lColor = RGBCOLOR( 255, 255, 255 );
+		lb.lColor = MAKE_SALCOLOR( 255, 255, 255 );
 		lb.usMixMode = FM_XOR;
 		lb.usType = LINETYPE_ALTERNATE;
 		Ft2SetAttrs( mhPS, PRIM_LINE, LBB_MIX_MODE | LBB_TYPE | LBB_COLOR, 0, &lb );
@@ -705,7 +705,7 @@ void Os2SalGraphics::invert( long nX, lo
 		GpiQueryAttrs( mhPS, PRIM_AREA, ABB_COLOR | ABB_MIX_MODE | ABB_SYMBOL, &oldAb );
 
 		// set fill color to black
-		ab.lColor = RGBCOLOR( 255, 255, 255 );
+		ab.lColor = MAKE_SALCOLOR( 255, 255, 255 );
 		ab.usMixMode = FM_XOR;
 		ab.usSymbol = (nFlags & SAL_INVERT_50) ? PATSYM_DENSE5 : PATSYM_SOLID;
 		Ft2SetAttrs( mhPS, PRIM_AREA, ABB_COLOR | ABB_MIX_MODE | ABB_SYMBOL, 0, &ab );
@@ -740,7 +740,7 @@ void Os2SalGraphics::invert( ULONG nPoin
 		GpiQueryAttrs( mhPS, PRIM_LINE, LBB_MIX_MODE | LBB_TYPE | LBB_COLOR, &oldLb );
 
 		// set linetype to short dash
-		lb.lColor = RGBCOLOR( 255, 255, 255 );
+		lb.lColor = MAKE_SALCOLOR( 255, 255, 255 );
 		lb.usMixMode = FM_XOR;
 		lb.usType = LINETYPE_ALTERNATE;
 		Ft2SetAttrs( mhPS, PRIM_LINE, LBB_MIX_MODE | LBB_TYPE | LBB_COLOR, 0, &lb );
@@ -760,7 +760,7 @@ void Os2SalGraphics::invert( ULONG nPoin
 		GpiQueryAttrs( mhPS, PRIM_AREA, ABB_COLOR | ABB_MIX_MODE | ABB_SYMBOL, &oldAb );
 
 		// set fill color to black
-		ab.lColor = RGBCOLOR( 255, 255, 255 );
+		ab.lColor = MAKE_SALCOLOR( 255, 255, 255 );
 		ab.usMixMode = FM_XOR;
 		ab.usSymbol = (nFlags & SAL_INVERT_50) ? PATSYM_DENSE5 : PATSYM_SOLID;
 		Ft2SetAttrs( mhPS, PRIM_AREA, ABB_COLOR | ABB_MIX_MODE | ABB_SYMBOL, 0, &ab );

Modified: incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi3.cxx?rev=1292826&r1=1292825&r2=1292826&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi3.cxx (original)
+++ incubator/ooo/trunk/main/vcl/os2/source/gdi/salgdi3.cxx Thu Feb 23 15:19:04 2012
@@ -609,7 +609,7 @@ void Os2SalGraphics::SetTextColor( SalCo
 {
 	CHARBUNDLE cb;
 
-	cb.lColor = RGBCOLOR( SALCOLOR_RED( nSalColor ),
+	cb.lColor = MAKE_SALCOLOR( SALCOLOR_RED( nSalColor ),
 						  SALCOLOR_GREEN( nSalColor ),
 						  SALCOLOR_BLUE( nSalColor ) );
 
@@ -1157,7 +1157,7 @@ void Os2SalGraphics::GetDevFontList( Imp
 	{
 		PFONTMETRICS pFontMetric = &pFontMetrics[i];
 
-#if OSL_DEBUG_LEVEL>1
+#if OSL_DEBUG_LEVEL>2
 		debug_printf("Os2SalGraphics::GetDevFontList #%d,'%s'\n", i, pFontMetric->szFacename);
 #endif
 



Mime
View raw message