diff options
author | Elton Chung <elton@layerjet.com> | 2012-02-20 00:30:16 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-20 12:08:10 +0000 |
commit | dbff99a60ec5268c92f1404cb01754de9186c2e8 (patch) | |
tree | 20236b586ab80745426b4e51f0b8df56bdfcb0d0 /basegfx/source/tools | |
parent | 9846e25d94d6029f3a0726ae35e96db342506c80 (diff) |
Remove unused code
Diffstat (limited to 'basegfx/source/tools')
-rw-r--r-- | basegfx/source/tools/liangbarsky.cxx | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/basegfx/source/tools/liangbarsky.cxx b/basegfx/source/tools/liangbarsky.cxx index be2d5e04a429..6b89e85498ce 100644 --- a/basegfx/source/tools/liangbarsky.cxx +++ b/basegfx/source/tools/liangbarsky.cxx @@ -69,63 +69,6 @@ namespace basegfx return true; } } - - // see Foley/vanDam, pp. 122 for the Liang-Barsky line - // clipping algorithm - bool liangBarskyClip2D( ::basegfx::B2DPoint& io_rStart, - ::basegfx::B2DPoint& io_rEnd, - const ::basegfx::B2DRange& rClipRect ) - { - const double nDX( io_rEnd.getX() - io_rStart.getX() ); - const double nDY( io_rEnd.getY() - io_rStart.getY() ); - - if( ::basegfx::fTools::equalZero( nDX ) && - ::basegfx::fTools::equalZero( nDY ) ) - { - return rClipRect.isInside( io_rStart ); - } - else - { - double nTE( 0.0 ); - double nTL( 1.0 ); - if( liangBarskyClipT(nDX, rClipRect.getMinX() - io_rStart.getX(), - nTE, nTL ) ) // inside wrt. left edge - { - if( liangBarskyClipT(-nDX, io_rStart.getX() - rClipRect.getMaxX(), - nTE, nTL ) ) // inside wrt. right edge - { - if( liangBarskyClipT(nDY, rClipRect.getMinY() - io_rStart.getY(), - nTE, nTL ) ) // inside wrt. bottom edge - { - if( liangBarskyClipT(-nDY, io_rStart.getY() - rClipRect.getMaxY(), - nTE, nTL ) ) // inside wrt. top edge - { - // compute actual intersection points, - // if nTL has changed - if( nTL < 1.0 ) - { - io_rEnd.setX( io_rStart.getX() + nTL*nDX ); - io_rEnd.setY( io_rStart.getY() + nTL*nDY ); - } - - // compute actual intersection points, - // if nTE has changed - if( nTE > 0.0 ) - { - io_rStart.setX( io_rStart.getX() + nTE*nDX ); - io_rStart.setY( io_rStart.getY() + nTE*nDY ); - } - - // line is (at least partially) visible - return true; - } - } - } - } - } - - return false; - } } } |