summaryrefslogtreecommitdiff
path: root/basegfx/source/workbench
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/workbench')
-rw-r--r--basegfx/source/workbench/bezierclip.cxx56
-rw-r--r--basegfx/source/workbench/bezierclip.hxx12
-rw-r--r--basegfx/source/workbench/convexhull.cxx10
-rw-r--r--basegfx/source/workbench/gauss.hxx30
4 files changed, 54 insertions, 54 deletions
diff --git a/basegfx/source/workbench/bezierclip.cxx b/basegfx/source/workbench/bezierclip.cxx
index a413544d17eb..7fb95c4977b1 100644
--- a/basegfx/source/workbench/bezierclip.cxx
+++ b/basegfx/source/workbench/bezierclip.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bezierclip.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: thb $ $Date: 2003-03-06 18:57:47 $
+ * last change: $Author: aw $ $Date: 2003-11-05 12:25:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -183,7 +183,7 @@ void Impl_calcBounds( Point2D& leftTop,
rightBottom.y = ::std::max( c1.p0.y, ::std::max( c1.p1.y, ::std::max( c1.p2.y, c1.p3.y ) ) );
}
-bool Impl_doBBoxIntersect( const Bezier& c1,
+sal_Bool Impl_doBBoxIntersect( const Bezier& c1,
const Bezier& c2 )
{
// calc rectangular boxes from c1 and c2
@@ -198,11 +198,11 @@ bool Impl_doBBoxIntersect( const Bezier& c1,
if( ::std::min(rb1.x, rb2.x) < ::std::max(lt1.x, lt2.x) ||
::std::min(rb1.y, rb2.y) < ::std::max(lt1.y, lt2.y) )
{
- return false;
+ return sal_False;
}
else
{
- return true;
+ return sal_True;
}
}
@@ -211,7 +211,7 @@ bool Impl_doBBoxIntersect( const Bezier& c1,
* the left, the second is the intersection of the max value line with
* the convex hull from the right.
*/
-bool Impl_calcSafeParams( double& t1,
+sal_Bool Impl_calcSafeParams( double& t1,
double& t2,
const Polygon2D& rPoly,
double lowerYBound,
@@ -229,13 +229,13 @@ bool Impl_calcSafeParams( double& t1,
double currHigherT( 0.0 );
if( convHull.size() <= 1 )
- return false; // only one point? Then we're done with clipping
+ return sal_False; // only one point? Then we're done with clipping
/* now, clip against lower and higher bounds */
Point2D p0;
Point2D p1;
- bool bIntersection( false );
+ sal_Bool bIntersection( sal_False );
for( Polygon2D::size_type i=0; i<convHull.size(); ++i )
{
@@ -298,7 +298,7 @@ bool Impl_calcSafeParams( double& t1,
// set flag that at least one segment is contained or
// intersects given horizontal band.
- bIntersection = true;
+ bIntersection = sal_True;
}
}
@@ -320,7 +320,7 @@ bool Impl_calcSafeParams( double& t1,
* The polynomial coefficients c0 to c3 given to this method
* must correspond to t values of 0, 1/3, 2/3 and 1, respectively.
*/
-bool Impl_calcSafeParams_clip( double& t1,
+sal_Bool Impl_calcSafeParams_clip( double& t1,
double& t2,
const FatLine& bounds,
double c0,
@@ -340,7 +340,7 @@ bool Impl_calcSafeParams_clip( double& t1,
return Impl_calcSafeParams( t1, t2, poly, bounds.dMin, bounds.dMax );
#else
- bool bRet( Impl_calcSafeParams( t1, t2, poly, bounds.dMin, bounds.dMax ) );
+ sal_Bool bRet( Impl_calcSafeParams( t1, t2, poly, bounds.dMin, bounds.dMax ) );
Polygon2D convHull( convexHull( poly ) );
@@ -592,7 +592,7 @@ void printResultWithFinalCurves( const Bezier& c1, const Bezier& c1_part,
// -----------------------------------------------------------------------------
/** determine parameter ranges [0,t1) and (t2,1] on c1, where c1 is guaranteed to lie outside c2.
- Returns false, if the two curves don't even intersect.
+ Returns sal_False, if the two curves don't even intersect.
@param t1
Range [0,t1) on c1 is guaranteed to lie outside c2
@@ -612,7 +612,7 @@ void printResultWithFinalCurves( const Bezier& c1, const Bezier& c1_part,
@param c2_part
Subdivided current part of c2
*/
-bool Impl_calcClipRange( double& t1,
+sal_Bool Impl_calcClipRange( double& t1,
double& t2,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -661,12 +661,12 @@ bool Impl_calcClipRange( double& t1,
//printCurvesWithSafeRange(c1_orig, c2_orig, t1, t2, c2_part, bounds_c2);
// they do intersect
- return true;
+ return sal_True;
}
}
// they don't intersect: nothing to do
- return false;
+ return sal_False;
}
// -----------------------------------------------------------------------------
@@ -804,7 +804,7 @@ void Impl_calcFocus( Bezier& res, const Bezier& c )
// -----------------------------------------------------------------------------
-bool Impl_calcSafeParams_focus( double& t1,
+sal_Bool Impl_calcSafeParams_focus( double& t1,
double& t2,
const Bezier& curve,
const Bezier& focus )
@@ -913,7 +913,7 @@ bool Impl_calcSafeParams_focus( double& t1,
return Impl_calcSafeParams( t1, t2, controlPolygon, 0.0, 0.0 );
#else
- bool bRet( Impl_calcSafeParams( t1, t2, controlPolygon, 0.0, 0.0 ) );
+ sal_Bool bRet( Impl_calcSafeParams( t1, t2, controlPolygon, 0.0, 0.0 ) );
Polygon2D convHull( convexHull( controlPolygon ) );
@@ -957,12 +957,12 @@ bool Impl_calcSafeParams_focus( double& t1,
don't intersect, nothing is added.
@param delta
- Maximal allowed distance to true critical point (measured in the
+ Maximal allowed distance to sal_True critical point (measured in the
original curve's coordinate system)
@param safeRangeFunctor
Functor object, that must provide the following operator():
- bool safeRangeFunctor( double& t1,
+ sal_Bool safeRangeFunctor( double& t1,
double& t2,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -970,7 +970,7 @@ bool Impl_calcSafeParams_focus( double& t1,
const Bezier& c2_part );
This functor must calculate the safe ranges [0,t1] and [t2,1] on
c1_orig, where c1_orig is 'safe' from c2_part. If the whole
- c1_orig is safe, false must be returned, true otherwise.
+ c1_orig is safe, sal_False must be returned, sal_True otherwise.
*/
template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_iterator< ::std::vector< ::std::pair<double, double> > >& result,
double delta,
@@ -1026,7 +1026,7 @@ template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_itera
// Note: we first perform the clipping and only test for precision
// sufficiency afterwards, since we want to exploit the fact that
- // Impl_calcClipRange returns false if the curves don't
+ // Impl_calcClipRange returns sal_False if the curves don't
// intersect. We would have to check that separately for the end
// condition, otherwise.
@@ -1097,7 +1097,7 @@ template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_itera
// 20%, subdivide longest curve, and clip shortest against
// both parts of longest
// if( (last_t2_c1 - last_t1_c1 - t2_c1 + t1_c1) / (last_t2_c1 - last_t1_c1) < 0.2 )
- if( false )
+ if( sal_False )
{
// subdivide and descend
// =====================
@@ -1189,7 +1189,7 @@ template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_itera
struct ClipBezierFunctor
{
- bool operator()( double& t1_c1,
+ sal_Bool operator()( double& t1_c1,
double& t2_c1,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -1204,7 +1204,7 @@ struct ClipBezierFunctor
struct BezierTangencyFunctor
{
- bool operator()( double& t1_c1,
+ sal_Bool operator()( double& t1_c1,
double& t2_c1,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -1218,7 +1218,7 @@ struct BezierTangencyFunctor
// used for focus calculation
// determine safe range on c1_orig
- bool bRet( Impl_calcSafeParams_focus( t1_c1, t2_c1,
+ sal_Bool bRet( Impl_calcSafeParams_focus( t1_c1, t2_c1,
c1_orig, // use orig curve here, need t's on original curve
focus ) );
@@ -1237,7 +1237,7 @@ struct BezierTangencyFunctor
iterator will remain empty, if there are no intersections.
@param delta
- Maximal allowed distance to true intersection (measured in the
+ Maximal allowed distance to sal_True intersection (measured in the
original curve's coordinate system)
*/
void clipBezier( ::std::back_insert_iterator< ::std::vector< ::std::pair<double, double> > >& result,
@@ -1646,7 +1646,7 @@ int main(int argc, const char *argv[])
double t1, t2;
- bool bRet( Impl_calcSafeParams( t1, t2, poly, 0, 1 ) );
+ sal_Bool bRet( Impl_calcSafeParams( t1, t2, poly, 0, 1 ) );
Polygon2D convHull( convexHull( poly ) );
@@ -1872,7 +1872,7 @@ int main(int argc, const char *argv[])
focus = c2;
#endif
// determine safe range on c1
- bool bRet( Impl_calcSafeParams_focus( t1, t2,
+ sal_Bool bRet( Impl_calcSafeParams_focus( t1, t2,
c1, focus ) );
cerr << "t1: " << t1 << ", t2: " << t2 << endl;
diff --git a/basegfx/source/workbench/bezierclip.hxx b/basegfx/source/workbench/bezierclip.hxx
index 0322354e9e9b..b151a9bdd43f 100644
--- a/basegfx/source/workbench/bezierclip.hxx
+++ b/basegfx/source/workbench/bezierclip.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bezierclip.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: thb $ $Date: 2003-03-06 18:57:48 $
+ * last change: $Author: aw $ $Date: 2003-11-05 12:25:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,9 +119,9 @@ Polygon2D convexHull( const Polygon2D& rPoly );
#define DBL_EPSILON 1.0e-100
/* little approximate comparions */
-template <typename NumType> bool tolZero( NumType n ) { return fabs(n) < DBL_EPSILON; }
-template <typename NumType> bool tolEqual( NumType n1, NumType n2 ) { return tolZero(n1-n2); }
-template <typename NumType> bool tolLessEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1<n2; }
-template <typename NumType> bool tolGreaterEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1>n2; }
+template <typename NumType> sal_Bool tolZero( NumType n ) { return fabs(n) < DBL_EPSILON; }
+template <typename NumType> sal_Bool tolEqual( NumType n1, NumType n2 ) { return tolZero(n1-n2); }
+template <typename NumType> sal_Bool tolLessEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1<n2; }
+template <typename NumType> sal_Bool tolGreaterEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1>n2; }
#endif // BASEGFX_BEZIERCLIP_HXX
diff --git a/basegfx/source/workbench/convexhull.cxx b/basegfx/source/workbench/convexhull.cxx
index 662804c12848..3765d70663bc 100644
--- a/basegfx/source/workbench/convexhull.cxx
+++ b/basegfx/source/workbench/convexhull.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: convexhull.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: thb $ $Date: 2003-03-06 18:57:49 $
+ * last change: $Author: aw $ $Date: 2003-11-05 12:25:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,14 +88,14 @@ template <class PointType> double theta( const PointType& p1, const PointType& p
/* Model of LessThanComparable for theta sort.
* Uses the theta function from Sedgewick: Algorithms in XXX, chapter 24
*/
-template <class PointType> class ThetaCompare : public ::std::binary_function< const PointType&, const PointType&, bool >
+template <class PointType> class ThetaCompare : public ::std::binary_function< const PointType&, const PointType&, sal_Bool >
{
public:
ThetaCompare( const PointType& rRefPoint ) : maRefPoint( rRefPoint ) {}
- bool operator() ( const PointType& p1, const PointType& p2 )
+ sal_Bool operator() ( const PointType& p1, const PointType& p2 )
{
- // return true, if p1 precedes p2 in the angle relative to maRefPoint
+ // return sal_True, if p1 precedes p2 in the angle relative to maRefPoint
return theta(maRefPoint, p1) < theta(maRefPoint, p2);
}
diff --git a/basegfx/source/workbench/gauss.hxx b/basegfx/source/workbench/gauss.hxx
index 780f3255958e..b5b65e2644c9 100644
--- a/basegfx/source/workbench/gauss.hxx
+++ b/basegfx/source/workbench/gauss.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: gauss.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: thb $ $Date: 2003-03-06 18:57:49 $
+ * last change: $Author: aw $ $Date: 2003-11-05 12:25:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,12 +76,12 @@
@param minPivot
If the pivot element gets lesser than minPivot, this method fails,
- otherwise, elimination succeeds and true is returned.
+ otherwise, elimination succeeds and sal_True is returned.
- @return true, if elimination succeeded.
+ @return sal_True, if elimination succeeded.
*/
template <class Matrix, typename BaseType>
-bool eliminate( Matrix& matrix,
+sal_Bool eliminate( Matrix& matrix,
int rows,
int cols,
const BaseType& minPivot )
@@ -100,7 +100,7 @@ bool eliminate( Matrix& matrix,
/* check pivot value */
if( fabs(matrix[ max*cols + i ]) < minPivot )
- return false; /* pivot too small! */
+ return sal_False; /* pivot too small! */
/* interchange rows 'max' and 'i' */
for(k=0; k<cols; ++k)
@@ -118,7 +118,7 @@ bool eliminate( Matrix& matrix,
}
/* everything went well */
- return true;
+ return sal_True;
}
@@ -139,11 +139,11 @@ bool eliminate( Matrix& matrix,
@param result
Result vector. Given matrix must have space for one column (rows entries).
- @return true, if back substitution was possible (i.e. no division
+ @return sal_True, if back substitution was possible (i.e. no division
by zero occured).
*/
template <class Matrix, class Vector, typename BaseType>
-bool substitute( const Matrix& matrix,
+sal_Bool substitute( const Matrix& matrix,
int rows,
int cols,
Vector& result )
@@ -159,13 +159,13 @@ bool substitute( const Matrix& matrix,
temp += matrix[ j*cols + k ] * result[k];
if( matrix[ j*cols + j ] == 0.0 )
- return false; /* imminent division by zero! */
+ return sal_False; /* imminent division by zero! */
result[j] = (matrix[ j*cols + cols-1 ] - temp) / matrix[ j*cols + j ];
}
/* everything went well */
- return true;
+ return sal_True;
}
@@ -188,12 +188,12 @@ bool substitute( const Matrix& matrix,
@param minPivot
If the pivot element gets lesser than minPivot, this method fails,
- otherwise, elimination succeeds and true is returned.
+ otherwise, elimination succeeds and sal_True is returned.
- @return true, if elimination succeeded.
+ @return sal_True, if elimination succeeded.
*/
template <class Matrix, class Vector, typename BaseType>
-bool solve( Matrix& matrix,
+sal_Bool solve( Matrix& matrix,
int rows,
int cols,
Vector& result,
@@ -202,5 +202,5 @@ bool solve( Matrix& matrix,
if( eliminate<Matrix,BaseType>(matrix, rows, cols, minPivot) )
return substitute<Matrix,Vector,BaseType>(matrix, rows, cols, result);
- return false;
+ return sal_False;
}