diff options
author | Yuri Dario <ydario@apache.org> | 2012-02-23 14:19:04 +0000 |
---|---|---|
committer | Yuri Dario <ydario@apache.org> | 2012-02-23 14:19:04 +0000 |
commit | f5158da10ad7d0fdc5fc3ea9f25ad6ed3ea16838 (patch) | |
tree | 55c4028b7852daf362461351097daad43a4e5ed7 /vcl | |
parent | f8b0e55085f0541fe1dadc5052c43dc1fd73a746 (diff) |
i118923 - OS/2 port: use standard macro to create RGB colors, fixes vcl black backgrounds.
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/os2/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/os2/source/gdi/salgdi.cxx | 6 | ||||
-rw-r--r-- | vcl/os2/source/gdi/salgdi2.cxx | 14 | ||||
-rw-r--r-- | vcl/os2/source/gdi/salgdi3.cxx | 4 |
4 files changed, 12 insertions, 13 deletions
diff --git a/vcl/inc/os2/salgdi.h b/vcl/inc/os2/salgdi.h index 7a5c475adec0..702b28aeaa7f 100644 --- a/vcl/inc/os2/salgdi.h +++ b/vcl/inc/os2/salgdi.h @@ -340,7 +340,6 @@ void ImplSalDeInitGraphics( Os2SalGraphics* mpData ); // - 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 diff --git a/vcl/os2/source/gdi/salgdi.cxx b/vcl/os2/source/gdi/salgdi.cxx index 03d1de465d57..20c6d1388e07 100644 --- a/vcl/os2/source/gdi/salgdi.cxx +++ b/vcl/os2/source/gdi/salgdi.cxx @@ -295,7 +295,7 @@ void Os2SalGraphics::SetLineColor( SalColor nSalColor ) 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( SalColor nSalColor ) 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, long nY, SalColor nSalColor ) // 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, diff --git a/vcl/os2/source/gdi/salgdi2.cxx b/vcl/os2/source/gdi/salgdi2.cxx index 7b7011ab3f2c..aba94c85fe50 100644 --- a/vcl/os2/source/gdi/salgdi2.cxx +++ b/vcl/os2/source/gdi/salgdi2.cxx @@ -563,13 +563,13 @@ void Os2SalGraphics::drawMask( const SalTwoRect* pPosAry, 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, long nY, long nWidth, long nHeight, SalInv 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, long nY, long nWidth, long nHeight, SalInv 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 nPoints, const SalPoint* pPtAry, SalInvert nF 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 nPoints, const SalPoint* pPtAry, SalInvert nF 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 ); diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx index 96d94898f559..72c7896ccfc1 100644 --- a/vcl/os2/source/gdi/salgdi3.cxx +++ b/vcl/os2/source/gdi/salgdi3.cxx @@ -609,7 +609,7 @@ void Os2SalGraphics::SetTextColor( SalColor nSalColor ) { 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( ImplDevFontList* pList ) { 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 |