LibreOffice Module vcl (master)  1
Macros | Functions
salmisc.cxx File Reference
#include <vcl/bitmapaccess.hxx>
#include <vcl/salgtype.hxx>
#include <bmpfast.hxx>
#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <tools/helpers.hxx>
#include <memory>
Include dependency graph for salmisc.cxx:

Go to the source code of this file.

Macros

#define IMPL_CASE_GET_FORMAT(Format)
 
#define IMPL_CASE_SET_FORMAT(Format, BitCount)
 
#define DOUBLE_SCANLINES()
 
#define TC_TO_PAL_COLORS   4096
 

Functions

static long ImplIndexFromColor (const BitmapColor &rCol)
 
static void ImplPALToPAL (const BitmapBuffer &rSrcBuffer, BitmapBuffer &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
 
static void ImplPALToTC (const BitmapBuffer &rSrcBuffer, BitmapBuffer const &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
 
static void ImplTCToTC (const BitmapBuffer &rSrcBuffer, BitmapBuffer const &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
 
static void ImplTCToPAL (const BitmapBuffer &rSrcBuffer, BitmapBuffer const &rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, Scanline *pSrcScanMap, Scanline *pDstScanMap, long const *pMapX, const long *pMapY)
 
std::unique_ptr< BitmapBufferStretchAndConvert (const BitmapBuffer &rSrcBuffer, const SalTwoRect &rTwoRect, ScanlineFormat nDstBitmapFormat, const BitmapPalette *pDstPal, const ColorMask *pDstMask)
 

Macro Definition Documentation

#define DOUBLE_SCANLINES ( )
Value:
while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \
{ \
memcpy( pDstScanMap[ nActY + 1 ], pDstScan, rDstBuffer.mnScanlineSize ); \
nActY++; \
}

Definition at line 42 of file salmisc.cxx.

Referenced by ImplPALToPAL(), ImplPALToTC(), ImplTCToPAL(), and ImplTCToTC().

#define IMPL_CASE_GET_FORMAT (   Format)
Value:
case( ScanlineFormat::Format ): \
pFncGetPixel = BitmapReadAccess::GetPixelFor##Format; \
break

Definition at line 29 of file salmisc.cxx.

Referenced by StretchAndConvert().

#define IMPL_CASE_SET_FORMAT (   Format,
  BitCount 
)
Value:
case( ScanlineFormat::Format ): \
{ \
pFncSetPixel = BitmapReadAccess::SetPixelFor##Format; \
pDstBuffer->mnBitCount = BitCount; \
} \
break

Definition at line 34 of file salmisc.cxx.

Referenced by StretchAndConvert().

#define TC_TO_PAL_COLORS   4096

Definition at line 49 of file salmisc.cxx.

Referenced by ImplTCToPAL().

Function Documentation

static long ImplIndexFromColor ( const BitmapColor rCol)
static

Definition at line 51 of file salmisc.cxx.

References Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

Referenced by ImplTCToPAL().

static void ImplPALToPAL ( const BitmapBuffer rSrcBuffer,
BitmapBuffer rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
long const *  pMapX,
const long *  pMapY 
)
static
static void ImplPALToTC ( const BitmapBuffer rSrcBuffer,
BitmapBuffer const &  rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
long const *  pMapX,
const long *  pMapY 
)
static
static void ImplTCToPAL ( const BitmapBuffer rSrcBuffer,
BitmapBuffer const &  rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
long const *  pMapX,
const long *  pMapY 
)
static
static void ImplTCToTC ( const BitmapBuffer rSrcBuffer,
BitmapBuffer const &  rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
long const *  pMapX,
const long *  pMapY 
)
static
std::unique_ptr<BitmapBuffer> StretchAndConvert ( const BitmapBuffer rSrcBuffer,
const SalTwoRect rTwoRect,
ScanlineFormat  nDstBitmapFormat,
const BitmapPalette pDstPal,
const ColorMask pDstMask 
)