summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/salgdilayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/salgdilayout.cxx')
-rw-r--r--vcl/source/gdi/salgdilayout.cxx106
1 files changed, 53 insertions, 53 deletions
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index ea8d10377e61..c01cd8add7ad 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,7 +75,7 @@ SalFrameGeometry SalFrame::GetGeometry()
// ----------------------------------------------------------------------------
-SalGraphics::SalGraphics()
+SalGraphics::SalGraphics()
: m_nLayout( 0 ),
m_bAntiAliasB2DDraw(false)
{
@@ -279,7 +279,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
basegfx::B2DPoint aRet( i_rPoint );
@@ -308,9 +308,9 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
-
+
basegfx::B2DPolygon aRet;
if( w )
{
@@ -319,9 +319,9 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con
{
aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev, i_bBack ) );
if( i_rPoly.isPrevControlPointUsed( i ) )
- aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) );
+ aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) );
if( i_rPoly.isNextControlPointUsed( i ) )
- aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) );
+ aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) );
}
aRet.setClosed( i_rPoly.isClosed() );
aRet.flip();
@@ -338,9 +338,9 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
-
+
basegfx::B2DPolyPolygon aRet;
if( w )
{
@@ -357,9 +357,9 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
// ----------------------------------------------------------------------------
-BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return unionClipRegion( nX, nY, nWidth, nHeight );
}
@@ -375,19 +375,19 @@ BOOL SalGraphics::UnionClipRegion( const ::basegfx::B2DPolyPolygon& rPoly, const
return unionClipRegion( rPoly );
}
-void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY );
}
-void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY, nSalColor );
}
-void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
+void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -396,16 +396,16 @@ void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const Out
}
drawLine( nX1, nY1, nX2, nY2 );
}
-void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
drawRect( nX, nY, nWidth, nHeight );
}
-bool SalGraphics::drawPolyLine(
+bool SalGraphics::drawPolyLine(
const basegfx::B2DPolygon& /*rPolyPolygon*/,
double /*fTransparency*/,
- const basegfx::B2DVector& /*rLineWidths*/,
+ const basegfx::B2DVector& /*rLineWidths*/,
basegfx::B2DLineJoin /*eLineJoin*/)
{
return false;
@@ -416,7 +416,7 @@ void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const Out
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -429,7 +429,7 @@ void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const Outp
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -448,7 +448,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
{
ULONG nPoints = pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
- mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
+ mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
}
drawPolyPolygon( nPoly, pPoints, (PCONSTSALPOINT*)pPtAry2 );
@@ -464,7 +464,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon& i_rPolyPolygon, double i_fTransparency, const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
basegfx::B2DPolyPolygon aMirror( mirror( i_rPolyPolygon, i_pOutDev ) );
bRet = drawPolyPolygon( aMirror, i_fTransparency );
@@ -482,10 +482,10 @@ bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fT
sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -497,10 +497,10 @@ sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry,
sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -513,7 +513,7 @@ sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt3
const SalPoint* const* i_pPtAry, const BYTE* const* i_pFlgAry, const OutputDevice* i_pOutDev )
{
sal_Bool bRet = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[i_nPoly];
@@ -522,7 +522,7 @@ sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt3
{
ULONG nPoints = i_pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
- mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
+ mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
}
bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, (PCONSTSALPOINT*)pPtAry2, i_pFlgAry );
@@ -541,7 +541,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
basegfx::B2DPolygon aMirror( mirror( i_rPolygon, i_pOutDev ) );
bRet = drawPolyLine( aMirror, fTransparency, i_rLineWidth, i_eLineJoin );
@@ -551,54 +551,54 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
return bRet;
}
-void SalGraphics::CopyArea( long nDestX, long nDestY,
+void SalGraphics::CopyArea( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
USHORT nFlags, const OutputDevice *pOutDev )
{
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
mirror( nDestX, nSrcWidth, pOutDev );
mirror( nSrcX, nSrcWidth, pOutDev );
}
copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, nFlags );
}
-void SalGraphics::CopyBits( const SalTwoRect* pPosAry,
+void SalGraphics::CopyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics, const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev )
{
- if( ( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) ||
+ if( ( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) ||
(pSrcGraphics && ( (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) || (pSrcOutDev && pSrcOutDev->IsRTLEnabled()) ) ) )
{
SalTwoRect pPosAry2 = *pPosAry;
if( (pSrcGraphics && (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL)) || (pSrcOutDev && pSrcOutDev->IsRTLEnabled()) )
- mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcOutDev );
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcOutDev );
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
copyBits( &pPosAry2, pSrcGraphics );
}
else
copyBits( pPosAry, pSrcGraphics );
}
-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
+void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap );
}
else
drawBitmap( pPosAry, rSalBitmap );
}
-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
+void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap, nTransparentColor );
}
else
@@ -611,49 +611,49 @@ void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap, rTransparentBitmap );
}
else
drawBitmap( pPosAry, rSalBitmap, rTransparentBitmap );
}
-void SalGraphics::DrawMask( const SalTwoRect* pPosAry,
+void SalGraphics::DrawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawMask( &pPosAry2, rSalBitmap, nMaskColor );
}
else
drawMask( pPosAry, rSalBitmap, nMaskColor );
}
-SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return getBitmap( nX, nY, nWidth, nHeight );
}
-SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
+SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
return getPixel( nX, nY );
}
-void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
invert( nX, nY, nWidth, nHeight, nFlags );
}
-void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags );
delete [] pPtAry2;
}
@@ -661,7 +661,7 @@ void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nF
invert( nPoints, pPtAry, nFlags );
}
-BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
+BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -761,7 +761,7 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, aCaption,
+ if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion ) )
{
mirror( rNativeBoundingRegion, pOutDev, true );
@@ -776,26 +776,26 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
}
}
else
- return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption,
+ return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion );
}
bool SalGraphics::DrawAlphaBitmap( const SalTwoRect& rPosAry,
const SalBitmap& rSourceBitmap,
- const SalBitmap& rAlphaBitmap,
+ const SalBitmap& rAlphaBitmap,
const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = rPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
return drawAlphaBitmap( pPosAry2, rSourceBitmap, rAlphaBitmap );
}
else
return drawAlphaBitmap( rPosAry, rSourceBitmap, rAlphaBitmap );
}
-bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
+bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
sal_uInt8 nTransparency, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )