LibreOffice Module vcl (master)  1
Macros | Functions | Variables
map.cxx File Reference
#include <tools/bigint.hxx>
#include <tools/debug.hxx>
#include <vcl/cursor.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/metaact.hxx>
#include <vcl/virdev.hxx>
#include <vcl/wrkwin.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <svdata.hxx>
#include <window.h>
#include <outdev.h>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <o3tl/enumarray.hxx>
Include dependency graph for map.cxx:

Go to the source code of this file.

Macros

#define ENTER1(rSource, pMapModeSource, pMapModeDest)
 
#define ENTER3(eUnitSource, eUnitDest)
 
#define ENTER4(rMapModeSource, rMapModeDest)
 

Functions

static Fraction ImplMakeFraction (long nN1, long nN2, long nD1, long nD2)
 
static void ImplCalcBigIntThreshold (long nDPIX, long nDPIY, const ImplMapRes &rMapRes, ImplThresholdRes &rThresRes)
 
static void ImplCalcMapResolution (const MapMode &rMapMode, long nDPIX, long nDPIY, ImplMapRes &rMapRes)
 
static void ImplCalcMapResolution (const MapMode &rMapMode, long nDPIX, long nDPIY, ImplMapRes &rMapRes, ImplThresholdRes &rThresRes)
 
static long ImplLogicToPixel (long n, long nDPI, long nMapNum, long nMapDenom, long nThres)
 
static long ImplPixelToLogic (long n, long nDPI, long nMapNum, long nMapDenom, long nThres)
 
static void verifyUnitSourceDest (MapUnit eUnitSource, MapUnit eUnitDest)
 
static long fn5 (const long n1, const long n2, const long n3, const long n4, const long n5)
 
static long fn3 (const long n1, const long n2, const long n3)
 

Variables

static const MapUnit s_MaxValidUnit = MapUnit::MapPixel
 
static const o3tl::enumarray< MapUnit, long > aImplNumeratorAry
 
static const o3tl::enumarray< MapUnit, long > aImplDenominatorAry
 

Macro Definition Documentation

#define ENTER1 (   rSource,
  pMapModeSource,
  pMapModeDest 
)

Definition at line 1443 of file map.cxx.

Referenced by OutputDevice::LogicToLogic().

#define ENTER3 (   eUnitSource,
  eUnitDest 
)
Value:
long nNumerator = 1; \
long nDenominator = 1; \
SAL_WARN_IF( eUnitSource > s_MaxValidUnit, "vcl.gdi", "Invalid source map unit"); \
SAL_WARN_IF( eUnitDest > s_MaxValidUnit, "vcl.gdi", "Invalid destination map unit"); \
if( (eUnitSource <= s_MaxValidUnit) && (eUnitDest <= s_MaxValidUnit) ) \
{ \
nNumerator = aImplNumeratorAry[eUnitSource] * \
aImplDenominatorAry[eUnitDest]; \
nDenominator = aImplNumeratorAry[eUnitDest] * \
aImplDenominatorAry[eUnitSource]; \
} \
if ( eUnitSource == MapUnit::MapPixel ) \
nDenominator *= 72; \
else if( eUnitDest == MapUnit::MapPixel ) \
nNumerator *= 72
static const MapUnit s_MaxValidUnit
Definition: map.cxx:39
static const o3tl::enumarray< MapUnit, long > aImplNumeratorAry
Definition: map.cxx:40

Definition at line 1491 of file map.cxx.

Referenced by OutputDevice::LogicToLogic().

#define ENTER4 (   rMapModeSource,
  rMapModeDest 
)
Value:
ImplMapRes aMapResSource; \
aMapResSource.mnMapOfsX = 0; \
aMapResSource.mnMapOfsY = 0; \
aMapResSource.mnMapScNumX = 1; \
aMapResSource.mnMapScNumY = 1; \
aMapResSource.mnMapScDenomX = 1; \
aMapResSource.mnMapScDenomY = 1; \
ImplMapRes aMapResDest(aMapResSource); \
ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \
ImplCalcMapResolution( rMapModeDest, 72, 72, aMapResDest )
static void ImplCalcMapResolution(const MapMode &rMapMode, long nDPIX, long nDPIY, ImplMapRes &rMapRes)
Definition: map.cxx:151
long mnMapOfsX
Definition: outdevmap.hxx:25

Definition at line 1508 of file map.cxx.

Referenced by OutputDevice::LogicToLogic().

Function Documentation

static long fn3 ( const long  n1,
const long  n2,
const long  n3 
)
static

Definition at line 1640 of file map.cxx.

References BigInt::IsNeg(), and LONG_MAX.

Referenced by OutputDevice::LogicToLogic().

static long fn5 ( const long  n1,
const long  n2,
const long  n3,
const long  n4,
const long  n5 
)
static

Definition at line 1522 of file map.cxx.

References BigInt::IsNeg(), and LONG_MAX.

Referenced by OutputDevice::LogicToLogic().

static void ImplCalcBigIntThreshold ( long  nDPIX,
long  nDPIY,
const ImplMapRes rMapRes,
ImplThresholdRes rThresRes 
)
static
static void ImplCalcMapResolution ( const MapMode rMapMode,
long  nDPIX,
long  nDPIY,
ImplMapRes rMapRes 
)
static
static void ImplCalcMapResolution ( const MapMode rMapMode,
long  nDPIX,
long  nDPIY,
ImplMapRes rMapRes,
ImplThresholdRes rThresRes 
)
static

Definition at line 319 of file map.cxx.

References ImplCalcBigIntThreshold(), and ImplCalcMapResolution().

static long ImplLogicToPixel ( long  n,
long  nDPI,
long  nMapNum,
long  nMapDenom,
long  nThres 
)
static
static Fraction ImplMakeFraction ( long  nN1,
long  nN2,
long  nD1,
long  nD2 
)
static
static long ImplPixelToLogic ( long  n,
long  nDPI,
long  nMapNum,
long  nMapDenom,
long  nThres 
)
static
static void verifyUnitSourceDest ( MapUnit  eUnitSource,
MapUnit  eUnitDest 
)
static

Definition at line 1479 of file map.cxx.

References DBG_ASSERT.

Referenced by OutputDevice::LogicToLogic().

Variable Documentation

const o3tl::enumarray<MapUnit,long> aImplDenominatorAry
static
Initial value:
=
{ 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1, 0, 0, 0 }

Definition at line 42 of file map.cxx.

const o3tl::enumarray<MapUnit,long> aImplNumeratorAry
static
Initial value:
=
{ 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }

Definition at line 40 of file map.cxx.

const MapUnit s_MaxValidUnit = MapUnit::MapPixel
static

Definition at line 39 of file map.cxx.