diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-10 12:15:36 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-10 12:15:36 +0100 |
commit | 2849a7757f4152ca8f20ba2809ded8fa2c64433c (patch) | |
tree | 7e9a875de5fd4acad81eb49802663378f2202b2a /canvas | |
parent | a1331d45d308d6e1c426d1cc17012ac84d1113a4 (diff) |
removetooltypes01: #i112600# adjust canvas
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper_texturefill.cxx | 2 | ||||
-rwxr-xr-x | canvas/source/directx/dx_5rm.cxx | 6 | ||||
-rwxr-xr-x | canvas/source/directx/dx_winstuff.hxx | 6 | ||||
-rw-r--r-- | canvas/source/tools/image.cxx | 44 | ||||
-rw-r--r-- | canvas/source/vcl/canvashelper_texturefill.cxx | 40 |
5 files changed, 46 insertions, 52 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx index ee8aff6980cf..43447645daf9 100644 --- a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx +++ b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx @@ -82,7 +82,7 @@ namespace cairocanvas const ::Size& rTileSize, const GraphicAttr& rAttr) { - BOOL bRet( false ); + bool bRet( false ); Point aCurrPos; int nX, nY; diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx index 642ef7bd7db6..ecc8e6af2a9b 100755 --- a/canvas/source/directx/dx_5rm.cxx +++ b/canvas/source/directx/dx_5rm.cxx @@ -1108,7 +1108,7 @@ namespace dxcanvas const_cast<Window *>(&rWindow), 0) ); // system child window must not receive mouse events - mpWindow->SetMouseTransparent( TRUE ); + mpWindow->SetMouseTransparent( sal_True ); // parent should receive paint messages as well // [PARENTCLIPMODE_NOCLIP], the argument is here @@ -1117,11 +1117,11 @@ namespace dxcanvas mpWindow->SetParentClipMode(0x0002); // the system child window must not clear its background - mpWindow->EnableEraseBackground( FALSE ); + mpWindow->EnableEraseBackground( sal_False ); mpWindow->SetControlForeground(); mpWindow->SetControlBackground(); - mpWindow->EnablePaint(FALSE); + mpWindow->EnablePaint(sal_False); const SystemEnvData *pData = mpWindow->GetSystemData(); const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd)); diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx index d1718b07f3d1..f4dc1fcd0496 100755 --- a/canvas/source/directx/dx_winstuff.hxx +++ b/canvas/source/directx/dx_winstuff.hxx @@ -55,9 +55,6 @@ #endif -#define BOOL win32BOOL -#define INT32 win32INT32 -#define UINT32 win32UINT32 #define GradientStyle_RECT win32GradientStyle_RECT #define Polygon win32Polygon #define PolyPolygon win32PolyPolygon @@ -211,9 +208,6 @@ namespace dxcanvas #endif #undef DELETE -#undef BOOL -#undef INT32 -#undef UINT32 #undef PolyPolygon #endif /* _DXCANVAS_WINSTUFF_HXX */ diff --git a/canvas/source/tools/image.cxx b/canvas/source/tools/image.cxx index b6183e463e99..4b8a2a334873 100644 --- a/canvas/source/tools/image.cxx +++ b/canvas/source/tools/image.cxx @@ -417,7 +417,7 @@ namespace canvas { namespace // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++; } } break; @@ -437,7 +437,7 @@ namespace canvas { namespace // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++; } } break; @@ -469,7 +469,7 @@ namespace canvas { namespace // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++; } } break; @@ -661,8 +661,8 @@ namespace canvas { namespace else { // *no* alpha mask - ULONG nFormat = pReadAccess->GetScanlineFormat(); - BYTE *pBuffer = reinterpret_cast<BYTE *>(rBmpData.mpBitmapData); + sal_uIntPtr nFormat = pReadAccess->GetScanlineFormat(); + sal_uInt8 *pBuffer = reinterpret_cast<sal_uInt8 *>(rBmpData.mpBitmapData); switch(nFormat) { @@ -672,14 +672,14 @@ namespace canvas { namespace sal_Int32 height = pReadAccess->Height(); for(sal_Int32 y=0; y<height; ++y) { - BYTE *pScanline=pReadAccess->GetScanline(y); + sal_uInt8 *pScanline=pReadAccess->GetScanline(y); sal_Int32 width = pReadAccess->Width(); for(sal_Int32 x=0; x<width; ++x) { // BGR -> RGB - BYTE b(*pScanline++); - BYTE g(*pScanline++); - BYTE r(*pScanline++); + sal_uInt8 b(*pScanline++); + sal_uInt8 g(*pScanline++); + sal_uInt8 r(*pScanline++); *pBuffer++ = r; *pBuffer++ = g; *pBuffer++ = b; @@ -694,14 +694,14 @@ namespace canvas { namespace sal_Int32 height = pReadAccess->Height(); for(sal_Int32 y=0; y<height; ++y) { - BYTE *pScanline=pReadAccess->GetScanline(y); + sal_uInt8 *pScanline=pReadAccess->GetScanline(y); sal_Int32 width = pReadAccess->Width(); for(sal_Int32 x=0; x<width; ++x) { // RGB -> RGB - BYTE r(*pScanline++); - BYTE g(*pScanline++); - BYTE b(*pScanline++); + sal_uInt8 r(*pScanline++); + sal_uInt8 g(*pScanline++); + sal_uInt8 b(*pScanline++); *pBuffer++ = r; *pBuffer++ = g; *pBuffer++ = b; @@ -720,7 +720,7 @@ namespace canvas { namespace sal_Int32 height = pReadAccess->Height(); for(sal_Int32 y=0; y<height; ++y) { - BYTE *pScanline=pReadAccess->GetScanline(y); + sal_uInt8 *pScanline=pReadAccess->GetScanline(y); sal_Int32 width = pReadAccess->Width(); for(sal_Int32 x=0; x<width; ++x) { @@ -1263,11 +1263,11 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl( sal_uInt8 *pDst=pDstBuffer; for(sal_Int32 x=0; x<dwWidth; ++x) { - BYTE r(*pSrc++); - BYTE g(*pSrc++); - BYTE b(*pSrc++); - BYTE Alpha(*pSrc++); - BYTE OneMinusAlpha(0xFF-Alpha); + sal_uInt8 r(*pSrc++); + sal_uInt8 g(*pSrc++); + sal_uInt8 b(*pSrc++); + sal_uInt8 Alpha(*pSrc++); + sal_uInt8 OneMinusAlpha(0xFF-Alpha); *pDst=(((r*Alpha)+((*pDst)*OneMinusAlpha))/0xFF); ++pDst; *pDst=(((g*Alpha)+((*pDst)*OneMinusAlpha))/0xFF); @@ -1287,9 +1287,9 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl( sal_uInt8 *pDst=pDstBuffer; for(sal_Int32 x=0; x<dwWidth; ++x) { - BYTE r(*pSrc++); - BYTE g(*pSrc++); - BYTE b(*pSrc++); + sal_uInt8 r(*pSrc++); + sal_uInt8 g(*pSrc++); + sal_uInt8 b(*pSrc++); *pDst++=r; *pDst++=g; *pDst++=b; diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index c1e71ceb943f..1d8f52069aa5 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -88,7 +88,7 @@ namespace vclcanvas const ::Size& rTileSize, const GraphicAttr& rAttr) { - BOOL bRet( false ); + bool bRet( false ); Point aCurrPos; int nX, nY; @@ -178,7 +178,7 @@ namespace vclcanvas // vertex values in the loop below (as ::Polygon is a // pimpl class, creating one every loop turn would really // stress the mem allocator) - ::Polygon aTempPoly( static_cast<USHORT>(5) ); + ::Polygon aTempPoly( static_cast<sal_uInt16>(5) ); OSL_ENSURE( nStepCount >= 3, "fillLinearGradient(): stepcount smaller than 3" ); @@ -222,9 +222,9 @@ namespace vclcanvas boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount); rOutDev.SetFillColor( - Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); // copy right egde of polygon to left edge (and also // copy the closing point) @@ -348,7 +348,7 @@ namespace vclcanvas const sal_uInt32 nNumPoints( aOuterPoly.count() ); - ::Polygon aTempPoly( static_cast<USHORT>(nNumPoints+1) ); + ::Polygon aTempPoly( static_cast<sal_uInt16>(nNumPoints+1) ); // increase number of steps by one: polygonal gradients have // the outermost polygon rendered in rColor2, and the @@ -387,9 +387,9 @@ namespace vclcanvas // lerp color rOutDev.SetFillColor( - Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); // scale and render polygon, by interpolating between // outer and inner polygon. @@ -399,13 +399,13 @@ namespace vclcanvas const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) ); const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) ); - aTempPoly[(USHORT)p] = ::Point( + aTempPoly[(sal_uInt16)p] = ::Point( basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ), basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) ); } // close polygon explicitely - aTempPoly[(USHORT)p] = aTempPoly[0]; + aTempPoly[(sal_uInt16)p] = aTempPoly[0]; // TODO(P1): compare with vcl/source/gdi/outdev4.cxx, // OutputDevice::ImplDrawComplexGradient(), there's a note @@ -424,7 +424,7 @@ namespace vclcanvas // in the loop below (as ::Polygon is a pimpl class, creating // one every loop turn would really stress the mem allocator) ::PolyPolygon aTempPolyPoly; - ::Polygon aTempPoly2( static_cast<USHORT>(nNumPoints+1) ); + ::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) ); aTempPoly2[0] = rBounds.TopLeft(); aTempPoly2[1] = rBounds.TopRight(); @@ -445,9 +445,9 @@ namespace vclcanvas // lerp color rOutDev.SetFillColor( - Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); #if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 if( i && !(i % 10) ) @@ -463,13 +463,13 @@ namespace vclcanvas const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) ); const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) ); - aTempPoly[(USHORT)p] = ::Point( + aTempPoly[(sal_uInt16)p] = ::Point( basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ), basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) ); } // close polygon explicitely - aTempPoly[(USHORT)p] = aTempPoly[0]; + aTempPoly[(sal_uInt16)p] = aTempPoly[0]; // swap inner and outer polygon aTempPolyPoly.Replace( aTempPolyPoly.GetObject( 1 ), 0 ); @@ -921,7 +921,7 @@ namespace vclcanvas aGrfAttr.SetMirrorFlags( ( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) | ( aScale.getY() < 0.0 ? BMP_MIRROR_VERT : 0 ) ); - aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround( nRotate*10.0 )) ); + aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround( nRotate*10.0 )) ); pGrfObj.reset( new GraphicObject( aBmpEx ) ); } @@ -1050,7 +1050,7 @@ namespace vclcanvas // equivalent to the origAlpha*modulateAlpha // the DX canvas performs) aGrfAttr.SetTransparency( - static_cast< BYTE >( + static_cast< sal_uInt8 >( ::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) ); } @@ -1121,7 +1121,7 @@ namespace vclcanvas aVDev.GetBitmap( aEmptyPoint, aVDev.GetOutputSizePixel() ) ); - BYTE nCol( static_cast< BYTE >( + sal_uInt8 nCol( static_cast< sal_uInt8 >( ::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) ); AlphaMask aAlpha( aVDev.GetOutputSizePixel(), &nCol ); |