summaryrefslogtreecommitdiff
path: root/tools/source/generic/poly.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-04 22:41:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-05 10:03:17 +0100
commitc6da7c43e10924597b6566fa5394684299c0a573 (patch)
tree83449de1af08f9013c89f497d9f8425d12e7d819 /tools/source/generic/poly.cxx
parentaf3a393700f77b039e88efc2cf2e6eef450677ff (diff)
callcatcher: unused methods
Diffstat (limited to 'tools/source/generic/poly.cxx')
-rw-r--r--tools/source/generic/poly.cxx113
1 files changed, 0 insertions, 113 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index a4ec0283b956..419575de1048 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -303,41 +303,6 @@ void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pI
// -----------------------------------------------------------------------
-void ImplPolygon::ImplRemove( sal_uInt16 nPos, sal_uInt16 nCount )
-{
- const sal_uInt16 nRemoveCount = Min( (sal_uInt16) ( mnPoints - nPos ), (sal_uInt16) nCount );
-
- if( nRemoveCount )
- {
- const sal_uInt16 nNewSize = mnPoints - nRemoveCount;
- const sal_uInt16 nSecPos = nPos + nRemoveCount;
- const sal_uInt16 nRest = mnPoints - nSecPos;
-
- Point* pNewAry = (Point*) new char[ (sal_uIntPtr) nNewSize * sizeof( Point ) ];
-
- memcpy( pNewAry, mpPointAry, nPos * sizeof( Point ) );
- memcpy( pNewAry + nPos, mpPointAry + nSecPos, nRest * sizeof( Point ) );
-
- delete[] (char*) mpPointAry;
-
- // ggf. FlagArray beruecksichtigen
- if( mpFlagAry )
- {
- sal_uInt8* pNewFlagAry = new sal_uInt8[ nNewSize ];
-
- memcpy( pNewFlagAry, mpFlagAry, nPos );
- memcpy( pNewFlagAry + nPos, mpFlagAry + nSecPos, nRest );
- delete[] mpFlagAry;
- mpFlagAry = pNewFlagAry;
- }
-
- mpPointAry = pNewAry;
- mnPoints = nNewSize;
- }
-}
-
-// -----------------------------------------------------------------------
-
void ImplPolygon::ImplCreateFlagArray()
{
if( !mpFlagAry )
@@ -1225,84 +1190,6 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos )
// -----------------------------------------------------------------------
-void Polygon::SlantX( long nYRef, double fSin, double fCos )
-{
- DBG_CHKTHIS( Polygon, NULL );
- ImplMakeUnique();
-
- for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
- {
- Point& rPnt = mpImplPolygon->mpPointAry[ i ];
- const long nDy = rPnt.Y() - nYRef;
-
- rPnt.X() += (long)( fSin * nDy );
- rPnt.Y() = nYRef + (long)( fCos * nDy );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void Polygon::SlantY( long nXRef, double fSin, double fCos )
-{
- DBG_CHKTHIS( Polygon, NULL );
- ImplMakeUnique();
-
- for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
- {
- Point& rPnt = mpImplPolygon->mpPointAry[ i ];
- const long nDx = rPnt.X() - nXRef;
-
- rPnt.X() = nXRef + (long)( fCos * nDx );
- rPnt.Y() -= (long)( fSin * nDx );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void Polygon::Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect )
-{
- DBG_CHKTHIS( Polygon, NULL );
- ImplMakeUnique();
-
- long Xr, Wr, X1, X2, X3, X4;
- long Yr, Hr, Y1, Y2, Y3, Y4;
- double fTx, fTy, fUx, fUy;
-
- Xr = rRefRect.Left();
- Yr = rRefRect.Top();
- Wr = rRefRect.GetWidth();
- Hr = rRefRect.GetHeight();
-
- if( Wr && Hr )
- {
- DBG_ASSERT( rDistortedRect.mpImplPolygon->mnPoints >= 4, "Distort rect too small!" );
-
- X1 = rDistortedRect[0].X();
- Y1 = rDistortedRect[0].Y();
- X2 = rDistortedRect[1].X();
- Y2 = rDistortedRect[1].Y();
- X3 = rDistortedRect[3].X();
- Y3 = rDistortedRect[3].Y();
- X4 = rDistortedRect[2].X();
- Y4 = rDistortedRect[2].Y();
-
- for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
- {
- Point& rPnt = mpImplPolygon->mpPointAry[ i ];
-
- fTx = (double)( rPnt.X() - Xr) / Wr;
- fTy = (double)( rPnt.Y() - Yr) / Hr;
- fUx = 1.0 - fTx;
- fUy = 1.0 - fTy;
-
- rPnt.X() = (long) ( fUy * (fUx * X1 + fTx * X2) + fTy * (fUx * X3 + fTx * X4) );
- rPnt.Y() = (long) ( fUx * (fUy * Y1 + fTy * Y3) + fTx * (fUy * Y2 + fTy * Y4) );
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
class ImplPointFilter
{
public: