LibreOffice Module vcl (master)  1
salmisc.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <vcl/bitmapaccess.hxx>
21 #include <vcl/salgtype.hxx>
22 #include <bmpfast.hxx>
23 #include <o3tl/safeint.hxx>
24 #include <osl/diagnose.h>
25 #include <sal/log.hxx>
26 #include <tools/helpers.hxx>
27 #include <memory>
28 
29 #define IMPL_CASE_GET_FORMAT( Format ) \
30 case( ScanlineFormat::Format ): \
31  pFncGetPixel = BitmapReadAccess::GetPixelFor##Format; \
32 break
33 
34 #define IMPL_CASE_SET_FORMAT( Format, BitCount ) \
35 case( ScanlineFormat::Format ): \
36 { \
37  pFncSetPixel = BitmapReadAccess::SetPixelFor##Format; \
38  pDstBuffer->mnBitCount = BitCount; \
39 } \
40 break
41 
42 #define DOUBLE_SCANLINES() \
43 while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \
44 { \
45  memcpy( pDstScanMap[ nActY + 1 ], pDstScan, rDstBuffer.mnScanlineSize ); \
46  nActY++; \
47 }
48 
49 #define TC_TO_PAL_COLORS 4096
50 
51 static long ImplIndexFromColor( const BitmapColor& rCol )
52 {
53 #if TC_TO_PAL_COLORS == 4096
54 
55  return( ( ( static_cast<long>(rCol.GetBlue()) >> 4) << 8 ) |
56  ( ( static_cast<long>(rCol.GetGreen()) >> 4 ) << 4 ) |
57  ( static_cast<long>(rCol.GetRed()) >> 4 ) );
58 
59 #elif TC_TO_PAL_COLORS == 32768
60 
61  return( ( ( (long) rCol.GetBlue() >> 3) << 10 ) |
62  ( ( (long) rCol.GetGreen() >> 3 ) << 5 ) |
63  ( (long) rCol.GetRed() >> 3 ) );
64 
65 #endif
66 }
67 
68 static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
69  FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
70  Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
71 {
72  const long nHeight1 = rDstBuffer.mnHeight - 1;
73  const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
74  const ColorMask& rDstMask = rDstBuffer.maColorMask;
75  BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
76  BitmapColor* pColMapBuf = aColMap.ImplGetColorBuffer();
77  BitmapColor aIndex( 0 );
78 
79  for( sal_uInt16 i = 0, nSrcCount = aColMap.GetEntryCount(), nDstCount = rDstBuffer.maPalette.GetEntryCount(); i < nSrcCount; i++ )
80  {
81  if( ( i < nDstCount ) && ( rSrcBuffer.maPalette[ i ] == rDstBuffer.maPalette[ i ] ) )
82  aIndex.SetIndex( sal::static_int_cast<sal_uInt8>(i) );
83  else
84  aIndex.SetIndex( sal::static_int_cast<sal_uInt8>(rDstBuffer.maPalette.GetBestIndex( rSrcBuffer.maPalette[ i ] )) );
85 
86  pColMapBuf[ i ] = aIndex;
87  }
88 
89  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
90  {
91  long nMapY = pMapY[nActY];
92  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
93 
94  for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
95  pFncSetPixel( pDstScan, nX, pColMapBuf[ pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ).GetIndex() ], rDstMask );
96 
98  }
99 }
100 
101 static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
102  FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
103  Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
104 {
105  const long nHeight1 = rDstBuffer.mnHeight - 1;
106  const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
107  const ColorMask& rDstMask = rDstBuffer.maColorMask;
108  const BitmapColor* pColBuf = rSrcBuffer.maPalette.ImplGetColorBuffer();
109 
111  {
112  const BitmapColor aCol0( pColBuf[ 0 ] );
113  const BitmapColor aCol1( pColBuf[ 1 ] );
114  long nMapX;
115 
116  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
117  {
118  long nMapY = pMapY[nActY];
119  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
120 
121  for (long nX = 0; nX < rDstBuffer.mnWidth;)
122  {
123  nMapX = pMapX[ nX ];
124  pFncSetPixel( pDstScan, nX++,
125  pSrcScan[ nMapX >> 3 ] & ( 1 << ( 7 - ( nMapX & 7 ) ) ) ? aCol1 : aCol0,
126  rDstMask );
127  }
128 
130  }
131  }
132  else if( RemoveScanline( rSrcBuffer.mnFormat ) == ScanlineFormat::N4BitMsnPal )
133  {
134  long nMapX;
135 
136  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
137  {
138  long nMapY = pMapY[nActY];
139  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
140 
141  for (long nX = 0; nX < rDstBuffer.mnWidth;)
142  {
143  nMapX = pMapX[ nX ];
144  pFncSetPixel( pDstScan, nX++,
145  pColBuf[ ( pSrcScan[ nMapX >> 1 ] >> ( nMapX & 1 ? 0 : 4 ) ) & 0x0f ],
146  rDstMask );
147  }
148 
150  }
151  }
152  else if( RemoveScanline( rSrcBuffer.mnFormat ) == ScanlineFormat::N8BitPal )
153  {
154  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
155  {
156  long nMapY = pMapY[nActY];
157  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
158 
159  for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
160  pFncSetPixel( pDstScan, nX, pColBuf[ pSrcScan[ pMapX[ nX ] ] ], rDstMask );
161 
163  }
164  }
165  else
166  {
167  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
168  {
169  long nMapY = pMapY[nActY];
170  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
171 
172  for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
173  pFncSetPixel( pDstScan, nX, pColBuf[ pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ).GetIndex() ], rDstMask );
174 
176  }
177  }
178 }
179 
180 static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
181  FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
182  Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
183 {
184  const long nHeight1 = rDstBuffer.mnHeight - 1;
185  const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
186  const ColorMask& rDstMask = rDstBuffer.maColorMask;
187 
189  {
190  BitmapColor aCol;
191  sal_uInt8* pPixel = nullptr;
192 
193  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
194  {
195  long nMapY = pMapY[nActY];
196  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
197 
198  for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
199  {
200  pPixel = pSrcScan + pMapX[ nX ] * 3;
201  aCol.SetBlue( *pPixel++ );
202  aCol.SetGreen( *pPixel++ );
203  aCol.SetRed( *pPixel );
204  pFncSetPixel( pDstScan, nX, aCol, rDstMask );
205  }
206 
208  }
209  }
210  else
211  {
212  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
213  {
214  long nMapY = pMapY[nActY];
215  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
216 
217  for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
218  pFncSetPixel( pDstScan, nX, pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ), rDstMask );
219 
221  }
222  }
223 }
224 
225 static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
226  FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
227  Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
228 {
229  const long nHeight1 = rDstBuffer.mnHeight- 1;
230  const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
231  const ColorMask& rDstMask = rDstBuffer.maColorMask;
232  BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
233  std::unique_ptr<sal_uInt8[]> pColToPalMap(new sal_uInt8[ TC_TO_PAL_COLORS ]);
234  BitmapColor aIndex( 0 );
235 
236  for( long nR = 0; nR < 16; nR++ )
237  {
238  for( long nG = 0; nG < 16; nG++ )
239  {
240  for( long nB = 0; nB < 16; nB++ )
241  {
242  BitmapColor aCol( sal::static_int_cast<sal_uInt8>(nR << 4),
243  sal::static_int_cast<sal_uInt8>(nG << 4),
244  sal::static_int_cast<sal_uInt8>(nB << 4) );
245  pColToPalMap[ ImplIndexFromColor( aCol ) ] = static_cast<sal_uInt8>(rDstBuffer.maPalette.GetBestIndex( aCol ));
246  }
247  }
248  }
249 
250  for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
251  {
252  long nMapY = pMapY[nActY];
253  Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
254 
255  for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
256  {
257  aIndex.SetIndex( pColToPalMap[ ImplIndexFromColor( pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ) ) ] );
258  pFncSetPixel( pDstScan, nX, aIndex, rDstMask );
259  }
260 
262  }
263 }
264 
265 std::unique_ptr<BitmapBuffer> StretchAndConvert(
266  const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
267  ScanlineFormat nDstBitmapFormat, const BitmapPalette* pDstPal, const ColorMask* pDstMask )
268 {
269  FncGetPixel pFncGetPixel;
270  FncSetPixel pFncSetPixel;
271  std::unique_ptr<BitmapBuffer> pDstBuffer(new BitmapBuffer);
272 
273  // set function for getting pixels
274  switch( RemoveScanline( rSrcBuffer.mnFormat ) )
275  {
289 
290  default:
291  // should never come here
292  // initialize pFncGetPixel to something valid that is
293  // least likely to crash
295  OSL_FAIL( "unknown read format" );
296  break;
297  }
298 
299  // set function for setting pixels
300  const ScanlineFormat nDstScanlineFormat = RemoveScanline( nDstBitmapFormat );
301  switch( nDstScanlineFormat )
302  {
316 
317  default:
318  // should never come here
319  // initialize pFncSetPixel to something valid that is
320  // least likely to crash
322  pDstBuffer->mnBitCount = 1;
323  OSL_FAIL( "unknown write format" );
324  break;
325  }
326 
327  // fill destination buffer
328  pDstBuffer->mnFormat = nDstBitmapFormat;
329  pDstBuffer->mnWidth = rTwoRect.mnDestWidth;
330  pDstBuffer->mnHeight = rTwoRect.mnDestHeight;
331  long nScanlineBase;
332  bool bFail = o3tl::checked_multiply<long>(pDstBuffer->mnBitCount, pDstBuffer->mnWidth, nScanlineBase);
333  if (bFail)
334  {
335  SAL_WARN("vcl.gdi", "checked multiply failed");
336  pDstBuffer->mpBits = nullptr;
337  return nullptr;
338  }
339  pDstBuffer->mnScanlineSize = AlignedWidth4Bytes(nScanlineBase);
340  if (pDstBuffer->mnScanlineSize < nScanlineBase/8)
341  {
342  SAL_WARN("vcl.gdi", "scanline calculation wraparound");
343  pDstBuffer->mpBits = nullptr;
344  return nullptr;
345  }
346  try
347  {
348  pDstBuffer->mpBits = new sal_uInt8[ pDstBuffer->mnScanlineSize * pDstBuffer->mnHeight ];
349  }
350  catch( const std::bad_alloc& )
351  {
352  // memory exception, clean up
353  pDstBuffer->mpBits = nullptr;
354  return nullptr;
355  }
356 
357  // do we need a destination palette or color mask?
358  if( ( nDstScanlineFormat == ScanlineFormat::N1BitMsbPal ) ||
359  ( nDstScanlineFormat == ScanlineFormat::N1BitLsbPal ) ||
360  ( nDstScanlineFormat == ScanlineFormat::N4BitMsnPal ) ||
361  ( nDstScanlineFormat == ScanlineFormat::N4BitLsnPal ) ||
362  ( nDstScanlineFormat == ScanlineFormat::N8BitPal ) )
363  {
364  assert(pDstPal && "destination buffer requires palette");
365  if (!pDstPal)
366  {
367  return nullptr;
368  }
369  pDstBuffer->maPalette = *pDstPal;
370  }
371  else if( ( nDstScanlineFormat == ScanlineFormat::N8BitTcMask ) ||
372  ( nDstScanlineFormat == ScanlineFormat::N32BitTcMask ) )
373  {
374  assert(pDstMask && "destination buffer requires color mask");
375  if (!pDstMask)
376  {
377  return nullptr;
378  }
379  pDstBuffer->maColorMask = *pDstMask;
380  }
381 
382  // short circuit the most important conversions
383  bool bFastConvert = ImplFastBitmapConversion( *pDstBuffer, rSrcBuffer, rTwoRect );
384  if( bFastConvert )
385  return pDstBuffer;
386 
387  std::unique_ptr<Scanline[]> pSrcScan;
388  std::unique_ptr<Scanline[]> pDstScan;
389  std::unique_ptr<long[]> pMapX;
390  std::unique_ptr<long[]> pMapY;
391 
392  try
393  {
394  pSrcScan.reset(new Scanline[rSrcBuffer.mnHeight]);
395  pDstScan.reset(new Scanline[pDstBuffer->mnHeight]);
396  pMapX.reset(new long[pDstBuffer->mnWidth]);
397  pMapY.reset(new long[pDstBuffer->mnHeight]);
398  }
399  catch( const std::bad_alloc& )
400  {
401  // memory exception, clean up
402  // remark: the buffer ptr causing the exception
403  // is still NULL here
404  return nullptr;
405  }
406 
407  // horizontal mapping table
408  if( (pDstBuffer->mnWidth != rTwoRect.mnSrcWidth) && (pDstBuffer->mnWidth != 0) )
409  {
410  const double fFactorX = static_cast<double>(rTwoRect.mnSrcWidth) / pDstBuffer->mnWidth;
411 
412  for (long i = 0; i < pDstBuffer->mnWidth; ++i)
413  pMapX[ i ] = rTwoRect.mnSrcX + static_cast<int>( i * fFactorX );
414  }
415  else
416  {
417  for (long i = 0, nTmp = rTwoRect.mnSrcX ; i < pDstBuffer->mnWidth; ++i)
418  pMapX[ i ] = nTmp++;
419  }
420 
421  // vertical mapping table
422  if( (pDstBuffer->mnHeight != rTwoRect.mnSrcHeight) && (pDstBuffer->mnHeight != 0) )
423  {
424  const double fFactorY = static_cast<double>(rTwoRect.mnSrcHeight) / pDstBuffer->mnHeight;
425 
426  for (long i = 0; i < pDstBuffer->mnHeight; ++i)
427  pMapY[ i ] = rTwoRect.mnSrcY + static_cast<int>( i * fFactorY );
428  }
429  else
430  {
431  for (long i = 0, nTmp = rTwoRect.mnSrcY; i < pDstBuffer->mnHeight; ++i)
432  pMapY[ i ] = nTmp++;
433  }
434 
435  // source scanline buffer
436  Scanline pTmpScan;
437  long nOffset;
438  if( rSrcBuffer.mnFormat & ScanlineFormat::TopDown )
439  {
440  pTmpScan = rSrcBuffer.mpBits;
441  nOffset = rSrcBuffer.mnScanlineSize;
442  }
443  else
444  {
445  pTmpScan = rSrcBuffer.mpBits + ( rSrcBuffer.mnHeight - 1 ) * rSrcBuffer.mnScanlineSize;
446  nOffset = -rSrcBuffer.mnScanlineSize;
447  }
448 
449  for (long i = 0; i < rSrcBuffer.mnHeight; i++, pTmpScan += nOffset)
450  pSrcScan[ i ] = pTmpScan;
451 
452  // destination scanline buffer
453  if( pDstBuffer->mnFormat & ScanlineFormat::TopDown )
454  {
455  pTmpScan = pDstBuffer->mpBits;
456  nOffset = pDstBuffer->mnScanlineSize;
457  }
458  else
459  {
460  pTmpScan = pDstBuffer->mpBits + ( pDstBuffer->mnHeight - 1 ) * pDstBuffer->mnScanlineSize;
461  nOffset = -pDstBuffer->mnScanlineSize;
462  }
463 
464  for (long i = 0; i < pDstBuffer->mnHeight; i++, pTmpScan += nOffset)
465  pDstScan[ i ] = pTmpScan;
466 
467  // do buffer scaling and conversion
468  if( rSrcBuffer.mnBitCount <= 8 && pDstBuffer->mnBitCount <= 8 )
469  {
470  ImplPALToPAL( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
471  pSrcScan.get(), pDstScan.get(), pMapX.get(), pMapY.get() );
472  }
473  else if( rSrcBuffer.mnBitCount <= 8 && pDstBuffer->mnBitCount > 8 )
474  {
475  ImplPALToTC( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
476  pSrcScan.get(), pDstScan.get(), pMapX.get(), pMapY.get() );
477  }
478  else if( rSrcBuffer.mnBitCount > 8 && pDstBuffer->mnBitCount > 8 )
479  {
480  ImplTCToTC( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
481  pSrcScan.get(), pDstScan.get(), pMapX.get(), pMapY.get() );
482  }
483  else
484  {
485  ImplTCToPAL( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
486  pSrcScan.get(), pDstScan.get(), pMapX.get(), pMapY.get() );
487  }
488 
489  return pDstBuffer;
490 }
491 
492 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
double mnHeight
long mnSrcWidth
Definition: salgtype.hxx:52
#define IMPL_CASE_SET_FORMAT(Format, BitCount)
Definition: salmisc.cxx:34
void(* FncSetPixel)(Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
sal_uInt8 GetRed() const
ColorMask maColorMask
void SetBlue(sal_uInt8 nBlue)
long mnSrcHeight
Definition: salgtype.hxx:53
sal_uInt32 AlignedWidth4Bytes(sal_uInt32 nWidthBits)
long mnDestWidth
Definition: salgtype.hxx:56
long mnSrcX
Definition: salgtype.hxx:50
for(size_t a(0);a< count;a++)
#define TC_TO_PAL_COLORS
Definition: salmisc.cxx:49
SAL_DLLPRIVATE const BitmapColor * ImplGetColorBuffer() const
sal_uInt16 mnBitCount
ScanlineFormat
Definition: Scanline.hxx:28
#define IMPL_CASE_GET_FORMAT(Format)
Definition: salmisc.cxx:29
static BitmapColor GetPixelForN1BitMsbPal(ConstScanline pScanline, long nX, const ColorMask &rMask)
Definition: bmpacc2.cxx:23
sal_uInt8 GetBlue() const
ScanlineFormat mnFormat
sal_uInt16 GetEntryCount() const
sal_uInt8 * Scanline
Definition: Scanline.hxx:25
int i
void SetRed(sal_uInt8 nRed)
sal_uInt8 * mpBits
static void ImplTCToPAL(const BitmapBuffer &rSrcBuffer, BitmapBuffer const &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
Definition: salmisc.cxx:225
static void ImplPALToTC(const BitmapBuffer &rSrcBuffer, BitmapBuffer const &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
Definition: salmisc.cxx:101
static void ImplTCToTC(const BitmapBuffer &rSrcBuffer, BitmapBuffer const &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
Definition: salmisc.cxx:180
sal_uInt16 GetBestIndex(const BitmapColor &rCol) const
void SetIndex(sal_uInt8 cIndex)
Definition: BitmapColor.hxx:66
long mnSrcY
Definition: salgtype.hxx:51
sal_uInt8 GetGreen() const
unsigned char sal_uInt8
void SetGreen(sal_uInt8 nGreen)
#define DOUBLE_SCANLINES()
Definition: salmisc.cxx:42
double mnWidth
std::unique_ptr< BitmapBuffer > StretchAndConvert(const BitmapBuffer &rSrcBuffer, const SalTwoRect &rTwoRect, ScanlineFormat nDstBitmapFormat, const BitmapPalette *pDstPal, const ColorMask *pDstMask)
Definition: salmisc.cxx:265
ScanlineFormat RemoveScanline(ScanlineFormat nFormat)
Definition: Scanline.hxx:57
BitmapPalette maPalette
long mnDestHeight
Definition: salgtype.hxx:57
#define SAL_WARN(area, stream)
static void ImplPALToPAL(const BitmapBuffer &rSrcBuffer, BitmapBuffer &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
Definition: salmisc.cxx:68
BitmapColor(* FncGetPixel)(ConstScanline pScanline, long nX, const ColorMask &rMask)
static void SetPixelForN1BitMsbPal(Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
Definition: bmpacc2.cxx:28
static long ImplIndexFromColor(const BitmapColor &rCol)
Definition: salmisc.cxx:51
bool ImplFastBitmapConversion(BitmapBuffer &rDst, const BitmapBuffer &rSrc, const SalTwoRect &rTR)
Definition: bmpfast.cxx:370