You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2012/10/19 18:12:42 UTC
svn commit: r1400149 [2/2] - in /incubator/ooo/trunk/main:
binfilter/bf_svx/source/svdraw/ canvas/source/vcl/
filter/source/graphicfilter/egif/ filter/source/graphicfilter/epbm/
filter/source/graphicfilter/epgm/ filter/source/graphicfilter/epict/ filte...
Modified: incubator/ooo/trunk/main/vcl/source/gdi/pngwrite.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/pngwrite.cxx?rev=1400149&r1=1400148&r2=1400149&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/pngwrite.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/pngwrite.cxx Fri Oct 19 16:12:40 2012
@@ -366,7 +366,7 @@ void PNGWriterImpl::ImplWritePalette()
void PNGWriterImpl::ImplWriteTransparent ()
{
- const sal_uLong nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS );
+ const sal_uLong nTransIndex = mpAccess->GetBestPaletteIndex( BMP_COL_TRANS );
ImplOpenChunk( PNGCHUNK_tRNS );
@@ -517,11 +517,11 @@ sal_uLong PNGWriterImpl::ImplGetFilter (
{
sal_uLong nShift = ( nXIndex & 7 ) ^ 7;
if ( nShift == 7)
- *pDest = (sal_uInt8)(mpAccess->GetPixel( nY, nX ) << nShift);
+ *pDest = mpAccess->GetPixelIndex( nY, nX ) << nShift;
else if ( nShift == 0 )
- *pDest++ |= (sal_uInt8) mpAccess->GetPixel( nY, nX ) << nShift;
+ *pDest++ |= mpAccess->GetPixelIndex( nY, nX ) << nShift;
else
- *pDest |= (sal_uInt8) mpAccess->GetPixel( nY, nX ) << nShift;
+ *pDest |= mpAccess->GetPixelIndex( nY, nX ) << nShift;
}
if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the
} // bufferpointer is to correct
@@ -533,9 +533,9 @@ sal_uLong PNGWriterImpl::ImplGetFilter (
for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+= nXAdd, nXIndex++ )
{
if( nXIndex & 1 )
- *pDest++ |= (sal_uInt8) mpAccess->GetPixel( nY, nX );
+ *pDest++ |= mpAccess->GetPixelIndex( nY, nX );
else
- *pDest = (sal_uInt8) mpAccess->GetPixel( nY, nX ) << 4;
+ *pDest = mpAccess->GetPixelIndex( nY, nX ) << 4;
}
if ( nXIndex & 1 ) pDest++;
}
@@ -544,7 +544,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter (
case( 8 ):
{
for ( sal_uLong nX = nXStart; nX < mnWidth; nX+=nXAdd )
- *pDest++ = mpAccess->GetPixel( nY, nX );
+ *pDest++ = mpAccess->GetPixelIndex( nY, nX );
}
break;
@@ -565,7 +565,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter (
*pDest++ = rColor.GetRed();
*pDest++ = rColor.GetGreen();
*pDest++ = rColor.GetBlue();
- *pDest++ = 255 - mpMaskAccess->GetPixel( nY, nX );
+ *pDest++ = 255 - mpMaskAccess->GetPixelIndex( nY, nX );
}
}
else
Modified: incubator/ooo/trunk/main/vcl/source/helper/canvasbitmap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/helper/canvasbitmap.cxx?rev=1400149&r1=1400148&r2=1400149&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/helper/canvasbitmap.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/helper/canvasbitmap.cxx Fri Oct 19 16:12:40 2012
@@ -541,8 +541,8 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCa
// input less than a byte - copy via GetPixel()
for( long x=aRequestedArea.Left(); x<aRequestedArea.Right(); ++x )
{
- *pOutScan++ = m_pBmpAcc->GetPixel(y,x);
- *pOutScan++ = m_pAlphaAcc->GetPixel(y,x);
+ *pOutScan++ = m_pBmpAcc->GetPixelIndex(y,x);
+ *pOutScan++ = m_pAlphaAcc->GetPixelIndex(y,x);
}
}
else
@@ -556,7 +556,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCa
{
for( long i=0; i<nNonAlphaBytes; ++i )
*pOutScan++ = *pScan++;
- *pOutScan++ = m_pAlphaAcc->GetPixel(y,x);
+ *pOutScan++ = m_pAlphaAcc->GetPixelIndex( y, x );
}
}
@@ -618,8 +618,8 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCa
if( m_nBitsPerInputPixel < 8 )
{
// input less than a byte - copy via GetPixel()
- *pOutBuf++ = m_pBmpAcc->GetPixel(pos.Y,pos.X);
- *pOutBuf = m_pAlphaAcc->GetPixel(pos.Y,pos.X);
+ *pOutBuf++ = m_pBmpAcc->GetPixelIndex(pos.Y,pos.X);
+ *pOutBuf = m_pAlphaAcc->GetPixelIndex(pos.Y,pos.X);
}
else
{
@@ -629,7 +629,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCa
// input integer multiple of byte - copy directly
rtl_copyMemory(pOutBuf, pScan+nScanlineLeftOffset, nNonAlphaBytes );
pOutBuf += nNonAlphaBytes;
- *pOutBuf++ = m_pAlphaAcc->GetPixel(pos.Y,pos.X);
+ *pOutBuf++ = m_pAlphaAcc->GetPixelIndex(pos.Y,pos.X);
}
}
@@ -1176,10 +1176,7 @@ uno::Sequence<rendering::RGBColor> SAL_C
{
const BitmapColor aCol =
m_bPalette ?
- m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<sal_uInt16>(
- m_pBmpAcc->GetPixelFromData(
- pIn, i ))) :
+ m_pBmpAcc->GetPaletteColor( m_pBmpAcc->GetPixelFromData( pIn, i ).GetIndex()) :
m_pBmpAcc->GetPixelFromData(pIn, i);
// TODO(F3): Convert result to sRGB color space
@@ -1233,10 +1230,7 @@ uno::Sequence<rendering::ARGBColor> SAL_
{
const BitmapColor aCol =
m_bPalette ?
- m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<sal_uInt16>(
- m_pBmpAcc->GetPixelFromData(
- pIn, i ))) :
+ m_pBmpAcc->GetPaletteColor( m_pBmpAcc->GetPixelFromData( pIn, i ).GetIndex() ) :
m_pBmpAcc->GetPixelFromData(pIn, i);
// TODO(F3): Convert result to sRGB color space
@@ -1292,10 +1286,7 @@ uno::Sequence<rendering::ARGBColor> SAL_
{
const BitmapColor aCol =
m_bPalette ?
- m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<sal_uInt16>(
- m_pBmpAcc->GetPixelFromData(
- pIn, i ))) :
+ m_pBmpAcc->GetPaletteColor( m_pBmpAcc->GetPixelFromData( pIn, i ).GetIndex() ) :
m_pBmpAcc->GetPixelFromData(pIn, i);
// TODO(F3): Convert result to sRGB color space
Modified: incubator/ooo/trunk/main/vcl/source/helper/canvastools.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/helper/canvastools.cxx?rev=1400149&r1=1400148&r2=1400149&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/helper/canvastools.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/helper/canvastools.cxx Fri Oct 19 16:12:40 2012
@@ -249,8 +249,8 @@ namespace vcl
for( sal_Int32 x=0; x<nWidth; ++x )
{
const rendering::ARGBColor& rColor=aARGBColors[x];
- rWriteAcc->SetPixel( aRect.Y1, x,
- (sal_uInt8)rWriteAcc->GetBestPaletteIndex(
+ rWriteAcc->SetPixelIndex( aRect.Y1, x,
+ (sal_uInt8) rWriteAcc->GetBestPaletteIndex(
BitmapColor( toByteColor(rColor.Red),
toByteColor(rColor.Green),
toByteColor(rColor.Blue))) );
@@ -281,8 +281,8 @@ namespace vcl
for( sal_Int32 x=0; x<nWidth; ++x )
{
const rendering::RGBColor& rColor=aRGBColors[x];
- rWriteAcc->SetPixel( aRect.Y1, x,
- (sal_uInt8)rWriteAcc->GetBestPaletteIndex(
+ rWriteAcc->SetPixelIndex( aRect.Y1, x,
+ (sal_uInt8) rWriteAcc->GetBestPaletteIndex(
BitmapColor( toByteColor(rColor.Red),
toByteColor(rColor.Green),
toByteColor(rColor.Blue))) );