LibreOffice Module vcl (master) 1
Macros | Functions | Variables
salmisc.cxx File Reference
#include <vcl/BitmapReadAccess.hxx>
#include <vcl/salgtype.hxx>
#include <bitmap/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_SET_FORMAT(Format, BitCount)
 
#define DOUBLE_SCANLINES()
 

Functions

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

Variables

constexpr int TC_TO_PAL_COLORS = 4096
 

Macro Definition Documentation

◆ DOUBLE_SCANLINES

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

Definition at line 37 of file salmisc.cxx.

◆ IMPL_CASE_SET_FORMAT

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

Definition at line 29 of file salmisc.cxx.

Function Documentation

◆ ImplIndexFromColor()

static tools::Long ImplIndexFromColor ( const BitmapColor rCol)
static

Definition at line 46 of file salmisc.cxx.

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

Referenced by ImplTCToPAL().

◆ ImplPALToPAL()

static void ImplPALToPAL ( const BitmapBuffer rSrcBuffer,
BitmapBuffer rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
sal_Int32 const *  pMapX,
const sal_Int32 *  pMapY 
)
static

◆ ImplPALToTC()

static void ImplPALToTC ( const BitmapBuffer rSrcBuffer,
BitmapBuffer const &  rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
sal_Int32 const *  pMapX,
const sal_Int32 *  pMapY 
)
static

◆ ImplTCToPAL()

static void ImplTCToPAL ( const BitmapBuffer rSrcBuffer,
BitmapBuffer const &  rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
sal_Int32 const *  pMapX,
const sal_Int32 *  pMapY 
)
static

◆ ImplTCToTC()

static void ImplTCToTC ( const BitmapBuffer rSrcBuffer,
BitmapBuffer const &  rDstBuffer,
FncGetPixel  pFncGetPixel,
FncSetPixel  pFncSetPixel,
Scanline pSrcScanMap,
Scanline pDstScanMap,
sal_Int32 const *  pMapX,
const sal_Int32 *  pMapY 
)
static

◆ StretchAndConvert()

std::unique_ptr< BitmapBuffer > StretchAndConvert ( const BitmapBuffer rSrcBuffer,
const SalTwoRect rTwoRect,
ScanlineFormat  nDstBitmapFormat,
std::optional< BitmapPalette pDstPal,
const ColorMask pDstMask 
)

Variable Documentation

◆ TC_TO_PAL_COLORS

constexpr int TC_TO_PAL_COLORS = 4096
constexpr

Definition at line 44 of file salmisc.cxx.

Referenced by ImplTCToPAL().