#i65904# Made code compile warning-free for MSVC; removed inline statement from the longer functions
This commit is contained in:
parent
8ce0bf508e
commit
faa4280d0a
8 changed files with 68 additions and 74 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: clippedlinerenderer.hxx,v $
|
||||
*
|
||||
* $Revision: 1.7 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-27 11:35:31 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:19 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -79,7 +79,7 @@ inline bool prepareClip( sal_Int32 a1,
|
|||
sal_uInt32 bMaxFlag,
|
||||
bool bRoundTowardsPt2 )
|
||||
{
|
||||
int ca, cb;
|
||||
int ca(0), cb(0);
|
||||
if( clipCode1 )
|
||||
{
|
||||
if( clipCode1 & aMinFlag )
|
||||
|
@ -209,7 +209,7 @@ inline bool prepareClip( sal_Int32 a1,
|
|||
pixel, the pixel closer to pt1 will be chosen. Giving true here
|
||||
makes renderClippedLine() choose pt2 in those cases.
|
||||
*/
|
||||
template< class Iterator, class Accessor > inline
|
||||
template< class Iterator, class Accessor >
|
||||
void renderClippedLine( basegfx::B2IPoint aPt1,
|
||||
basegfx::B2IPoint aPt2,
|
||||
const basegfx::B2IRange& rClipRect,
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: color.hxx,v $
|
||||
*
|
||||
* $Revision: 1.14 $
|
||||
* $Revision: 1.15 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-21 20:57:05 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:19 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -65,9 +65,9 @@ public:
|
|||
|
||||
void setGrey( sal_uInt8 nGreyVal ) { mnColor = (sal_uInt32)nGreyVal << 16 | (sal_uInt32)nGreyVal << 8 | nGreyVal; }
|
||||
|
||||
sal_uInt8 getRed() const { return 0xFF & (mnColor >> 16); }
|
||||
sal_uInt8 getGreen() const { return 0xFF & (mnColor >> 8); }
|
||||
sal_uInt8 getBlue() const { return 0xFF & mnColor; }
|
||||
sal_uInt8 getRed() const { return 0xFF & (sal_uInt8)(mnColor >> 16); }
|
||||
sal_uInt8 getGreen() const { return 0xFF & (sal_uInt8)(mnColor >> 8); }
|
||||
sal_uInt8 getBlue() const { return 0xFF & (sal_uInt8)mnColor; }
|
||||
|
||||
sal_uInt8 getGreyscale() const { return (sal_uInt8)((getBlue()*28UL +
|
||||
getGreen()*151 +
|
||||
|
@ -80,18 +80,18 @@ public:
|
|||
Color operator^( Color col ) const { return Color(col.getRed()^getRed(),
|
||||
col.getGreen()^getGreen(),
|
||||
col.getBlue()^getBlue()); }
|
||||
Color operator-( Color col ) const { return Color(abs((int)getRed()-col.getRed()),
|
||||
abs((int)getGreen()-col.getGreen()),
|
||||
abs((int)getBlue()-col.getBlue())); }
|
||||
Color operator-( Color col ) const { return Color((sal_uInt8)abs((int)getRed()-col.getRed()),
|
||||
(sal_uInt8)abs((int)getGreen()-col.getGreen()),
|
||||
(sal_uInt8)abs((int)getBlue()-col.getBlue())); }
|
||||
Color operator+( Color col ) const { return Color(getRed()+col.getRed(),
|
||||
getGreen()+col.getGreen(),
|
||||
getBlue()+col.getBlue()); }
|
||||
Color operator*( Color col ) const { return Color((sal_uInt32)col.getRed()*getRed()/SAL_MAX_UINT8,
|
||||
(sal_uInt32)col.getGreen()*getGreen()/SAL_MAX_UINT8,
|
||||
(sal_uInt32)col.getBlue()*getBlue()/SAL_MAX_UINT8); }
|
||||
Color operator*( sal_uInt8 n ) const { return Color((sal_uInt32)n*getRed()/SAL_MAX_UINT8,
|
||||
(sal_uInt32)n*getGreen()/SAL_MAX_UINT8,
|
||||
(sal_uInt32)n*getBlue()/SAL_MAX_UINT8); }
|
||||
Color operator*( Color col ) const { return Color((sal_uInt8)((sal_uInt32)col.getRed()*getRed()/SAL_MAX_UINT8),
|
||||
(sal_uInt8)((sal_uInt32)col.getGreen()*getGreen()/SAL_MAX_UINT8),
|
||||
(sal_uInt8)((sal_uInt32)col.getBlue()*getBlue()/SAL_MAX_UINT8)); }
|
||||
Color operator*( sal_uInt8 n ) const { return Color((sal_uInt8)((sal_uInt32)n*getRed()/SAL_MAX_UINT8),
|
||||
(sal_uInt8)((sal_uInt32)n*getGreen()/SAL_MAX_UINT8),
|
||||
(sal_uInt8)((sal_uInt32)n*getBlue()/SAL_MAX_UINT8)); }
|
||||
Color operator*( double n ) const { return Color((sal_uInt8)(n*getRed()+.5),
|
||||
(sal_uInt8)(n*getGreen()+.5),
|
||||
(sal_uInt8)(n*getBlue()+.5)); }
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: fillimage.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-11 15:33:05 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -43,10 +43,10 @@ namespace basebmp
|
|||
{
|
||||
|
||||
template< class DestIterator, class DestAccessor, typename T >
|
||||
inline void fillImage( DestIterator begin,
|
||||
DestIterator end,
|
||||
DestAccessor ad,
|
||||
T fillVal )
|
||||
void fillImage( DestIterator begin,
|
||||
DestIterator end,
|
||||
DestAccessor ad,
|
||||
T fillVal )
|
||||
{
|
||||
const int width ( end.x - begin.x );
|
||||
const int height( end.y - begin.y );
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: linerenderer.hxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-27 11:35:31 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -79,7 +79,7 @@ namespace basebmp
|
|||
pixel, the pixel closer to pt1 will be chosen. Giving true here
|
||||
makes renderClippedLine() choose pt2 in those cases.
|
||||
*/
|
||||
template< class Iterator, class Accessor > inline
|
||||
template< class Iterator, class Accessor >
|
||||
void renderLine( const basegfx::B2IPoint& rPt1,
|
||||
const basegfx::B2IPoint& rPt2,
|
||||
typename Accessor::value_type color,
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: polypolygonrenderer.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 09:47:53 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -109,6 +109,8 @@ namespace basebmp
|
|||
/// For the STL algorithms
|
||||
struct RasterConvertVertexComparator
|
||||
{
|
||||
RasterConvertVertexComparator() {}
|
||||
|
||||
bool operator()( const Vertex& rLHS,
|
||||
const Vertex& rRHS ) const
|
||||
{
|
||||
|
@ -147,7 +149,7 @@ namespace basebmp
|
|||
@param rPoly
|
||||
Polygon to fill
|
||||
*/
|
||||
template< class DestIterator, class DestAccessor, typename T > inline
|
||||
template< class DestIterator, class DestAccessor, typename T >
|
||||
void renderClippedPolyPolygon( DestIterator begin,
|
||||
DestAccessor ad,
|
||||
T fillColor,
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: scaleimage.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-27 11:35:31 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -33,8 +33,8 @@
|
|||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_BASEBIMAGE_SCALEIMAGE_HXX
|
||||
#define INCLUDED_BASEBIMAGE_SCALEIMAGE_HXX
|
||||
#ifndef INCLUDED_BASEBMP_SCALEIMAGE_HXX
|
||||
#define INCLUDED_BASEBMP_SCALEIMAGE_HXX
|
||||
|
||||
#include <osl/diagnose.h>
|
||||
|
||||
|
@ -47,12 +47,12 @@ namespace basebmp
|
|||
|
||||
template< class SourceIter, class SourceAcc,
|
||||
class DestIter, class DestAcc >
|
||||
inline void scaleLine( SourceIter s_begin,
|
||||
SourceIter s_end,
|
||||
SourceAcc s_acc,
|
||||
DestIter d_begin,
|
||||
DestIter d_end,
|
||||
DestAcc d_acc )
|
||||
void scaleLine( SourceIter s_begin,
|
||||
SourceIter s_end,
|
||||
SourceAcc s_acc,
|
||||
DestIter d_begin,
|
||||
DestIter d_end,
|
||||
DestAcc d_acc )
|
||||
{
|
||||
const int src_width = s_end - s_begin;
|
||||
const int dest_width = d_end - d_begin;
|
||||
|
@ -122,12 +122,12 @@ inline void scaleLine( SourceIter s_begin,
|
|||
*/
|
||||
template< class SourceIter, class SourceAcc,
|
||||
class DestIter, class DestAcc >
|
||||
inline void scaleImage( SourceIter s_begin,
|
||||
SourceIter s_end,
|
||||
SourceAcc s_acc,
|
||||
DestIter d_begin,
|
||||
DestIter d_end,
|
||||
DestAcc d_acc )
|
||||
void scaleImage( SourceIter s_begin,
|
||||
SourceIter s_end,
|
||||
SourceAcc s_acc,
|
||||
DestIter d_begin,
|
||||
DestIter d_end,
|
||||
DestAcc d_acc )
|
||||
{
|
||||
const int src_width ( s_end.x - s_begin.x );
|
||||
const int src_height( s_end.y - s_begin.y );
|
||||
|
@ -178,4 +178,4 @@ inline void scaleImage( vigra::triple<SourceIter,SourceIter,SourceAcc> const& sr
|
|||
|
||||
}
|
||||
|
||||
#endif /* INCLUDED_BASEBIMAGE_SCALEIMAGE_HXX */
|
||||
#endif /* INCLUDED_BASEBMP_SCALEIMAGE_HXX */
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: bitmapdevice.cxx,v $
|
||||
*
|
||||
* $Revision: 1.25 $
|
||||
* $Revision: 1.26 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 09:47:53 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -311,7 +311,6 @@ namespace
|
|||
raw_maskedmask_accessor_type maRawMaskedMaskAccessor;
|
||||
|
||||
BitmapRenderer( const basegfx::B2IRange& rBounds,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
|
@ -1691,7 +1690,6 @@ struct MaskTraitsGeneric
|
|||
template< class FormatTraits, class MaskTraits >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IRange& rBounds,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
|
@ -1706,7 +1704,6 @@ BitmapDeviceSharedPtr createRenderer(
|
|||
template< class FormatTraits, class MaskTraits, class Accessor >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IRange& rBounds,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
|
@ -1725,7 +1722,6 @@ BitmapDeviceSharedPtr createRenderer(
|
|||
|
||||
return BitmapDeviceSharedPtr(
|
||||
new Renderer( rBounds,
|
||||
bTopDown,
|
||||
nScanlineFormat,
|
||||
nScanlineStride,
|
||||
pFirstScanline,
|
||||
|
@ -1763,7 +1759,6 @@ PaletteMemorySharedVector createStandardPalette(
|
|||
template< class FormatTraits, class MaskTraits >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IRange& rBounds,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
|
@ -1772,7 +1767,6 @@ BitmapDeviceSharedPtr createRenderer(
|
|||
{
|
||||
return createRenderer<FormatTraits,
|
||||
MaskTraits>(rBounds,
|
||||
bTopDown,
|
||||
nScanlineFormat,
|
||||
nScanlineStride,
|
||||
pFirstScanline,
|
||||
|
@ -1787,7 +1781,6 @@ BitmapDeviceSharedPtr createRenderer(
|
|||
template< class FormatTraits, class MaskTraits >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IRange& rBounds,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
|
@ -1801,7 +1794,6 @@ BitmapDeviceSharedPtr createRenderer(
|
|||
OSL_ASSERT(pPal);
|
||||
return createRenderer<FormatTraits,
|
||||
MaskTraits>(rBounds,
|
||||
bTopDown,
|
||||
nScanlineFormat,
|
||||
nScanlineStride,
|
||||
pFirstScanline,
|
||||
|
@ -1914,23 +1906,23 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
|
|||
|
||||
case Format::ONE_BIT_MSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY1_MSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
case Format::ONE_BIT_LSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY1_LSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
case Format::ONE_BIT_MSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL1_MSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
bitsPerPixel[nScanlineFormat] );
|
||||
|
||||
case Format::ONE_BIT_LSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL1_LSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
bitsPerPixel[nScanlineFormat] );
|
||||
|
||||
|
@ -1940,23 +1932,23 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
|
|||
|
||||
case Format::FOUR_BIT_MSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY4_MSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
case Format::FOUR_BIT_LSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY4_LSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
case Format::FOUR_BIT_MSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL4_MSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
bitsPerPixel[nScanlineFormat] );
|
||||
|
||||
case Format::FOUR_BIT_LSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL4_LSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
bitsPerPixel[nScanlineFormat] );
|
||||
|
||||
|
@ -1966,12 +1958,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
|
|||
|
||||
case Format::EIGHT_BIT_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY8,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
case Format::EIGHT_BIT_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL8,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
bitsPerPixel[nScanlineFormat] );
|
||||
|
||||
|
@ -1981,12 +1973,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
|
|||
|
||||
case Format::SIXTEEN_BIT_LSB_TC_MASK:
|
||||
return createRenderer<PixelFormatTraits_RGB16_565_LSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
case Format::SIXTEEN_BIT_MSB_TC_MASK:
|
||||
return createRenderer<PixelFormatTraits_RGB16_565_MSB,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
|
||||
|
@ -1994,7 +1986,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
|
|||
// twentyfour bit formats
|
||||
case Format::TWENTYFOUR_BIT_TC_MASK:
|
||||
return createRenderer<PixelFormatTraits_BGR24,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
|
||||
|
||||
|
@ -2003,7 +1995,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
|
|||
|
||||
case Format::THIRTYTWO_BIT_TC_MASK:
|
||||
return createRenderer<PixelFormatTraits_RGB32_888,StdMasks>(
|
||||
aBounds, bTopDown, nScanlineFormat, nScanlineStride,
|
||||
aBounds, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: polypolygonrenderer.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: thb $ $Date: 2006-07-27 11:35:31 $
|
||||
* last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -46,7 +46,7 @@ namespace detail
|
|||
basegfx::B2DPolyPolygon const& rPolyPoly,
|
||||
sal_Int32 nMinY )
|
||||
{
|
||||
sal_uInt32 const nNumScanlines( rGET.size() );
|
||||
sal_Int32 const nNumScanlines( (sal_Int32)rGET.size() );
|
||||
|
||||
// add all polygons to GET
|
||||
for( sal_uInt32 i(0), nCount(rPolyPoly.count());
|
||||
|
|
Loading…
Reference in a new issue