Kaydet (Commit) c7cc1a91 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more loplugin:cstylecast: canvas

Change-Id: I3654875c560ba4c2d88b023e3b2104c6f43bb4a0
üst 93afb9ad
...@@ -183,7 +183,7 @@ namespace cairocanvas ...@@ -183,7 +183,7 @@ namespace cairocanvas
unsigned int nStride = cairo_image_surface_get_stride( pPixels ); unsigned int nStride = cairo_image_surface_get_stride( pPixels );
for( unsigned long y = 0; y < (unsigned long) aSize.Height(); y++ ) for( unsigned long y = 0; y < (unsigned long) aSize.Height(); y++ )
{ {
sal_uInt32 *pPix = (sal_uInt32 *)(pSrc + nStride * y); sal_uInt32 *pPix = reinterpret_cast<sal_uInt32 *>(pSrc + nStride * y);
for( unsigned long x = 0; x < (unsigned long) aSize.Width(); x++ ) for( unsigned long x = 0; x < (unsigned long) aSize.Width(); x++ )
{ {
sal_uInt8 nAlpha = (*pPix >> 24); sal_uInt8 nAlpha = (*pPix >> 24);
......
...@@ -1574,7 +1574,7 @@ namespace cairocanvas ...@@ -1574,7 +1574,7 @@ namespace cairocanvas
const Format eFormat( mbHaveAlpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24 ); const Format eFormat( mbHaveAlpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24 );
uno::Sequence< sal_Int8 > aRes( 4*nWidth*nHeight ); uno::Sequence< sal_Int8 > aRes( 4*nWidth*nHeight );
sal_Int8* pData = aRes.getArray(); sal_Int8* pData = aRes.getArray();
cairo_surface_t* pImageSurface = cairo_image_surface_create_for_data( (unsigned char *) pData, cairo_surface_t* pImageSurface = cairo_image_surface_create_for_data( reinterpret_cast<unsigned char *>(pData),
eFormat, eFormat,
nWidth, nHeight, 4*nWidth ); nWidth, nHeight, 4*nWidth );
cairo_t* pCairo = cairo_create( pImageSurface ); cairo_t* pCairo = cairo_create( pImageSurface );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment