summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqregion_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqregion_x11.cpp')
-rw-r--r--src/kernel/tqregion_x11.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/kernel/tqregion_x11.cpp b/src/kernel/tqregion_x11.cpp
index a42b0f11e..4866ff539 100644
--- a/src/kernel/tqregion_x11.cpp
+++ b/src/kernel/tqregion_x11.cpp
@@ -1324,13 +1324,13 @@ static bool EqualRegion( TQRegionPrivate *r1, TQRegionPrivate *r2 )
{
int i;
- if( r1->numRects != r2->numRects ) return FALSE;
- else if( r1->numRects == 0 ) return TRUE;
+ if( r1->numRects != r2->numRects ) return false;
+ else if( r1->numRects == 0 ) return true;
else if ( r1->extents.left() != r2->extents.left() ||
r1->extents.right() != r2->extents.right() ||
r1->extents.top() != r2->extents.top() ||
r1->extents.bottom() != r2->extents.bottom() )
- return FALSE;
+ return false;
else {
TQRect *rr1 = r1->rects.data();
TQRect *rr2 = r2->rects.data();
@@ -1339,10 +1339,10 @@ static bool EqualRegion( TQRegionPrivate *r1, TQRegionPrivate *r2 )
rr1->right() != rr2->right() ||
rr1->top() != rr2->top() ||
rr1->bottom() != rr2->bottom() )
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
@@ -1350,15 +1350,15 @@ static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
int i;
if (pRegion->numRects == 0)
- return FALSE;
+ return false;
if (!pRegion->extents.contains(x, y))
- return FALSE;
+ return false;
for (i=0; i<pRegion->numRects; i++)
{
if (pRegion->rects[i].contains(x, y))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static bool RectInRegion(TQRegionPrivate *region,
@@ -1374,10 +1374,10 @@ static bool RectInRegion(TQRegionPrivate *region,
if ((region->numRects == 0) || !EXTENTCHECK(&region->extents, prect))
return(RectangleOut);
- partOut = FALSE;
- partIn = FALSE;
+ partOut = false;
+ partIn = false;
- /* can stop when both partOut and partIn are TRUE, or we reach prect->y2 */
+ /* can stop when both partOut and partIn are true, or we reach prect->y2 */
for (pbox = region->rects.data(), pboxEnd = pbox + region->numRects;
pbox < pboxEnd;
pbox++)
@@ -1388,7 +1388,7 @@ static bool RectInRegion(TQRegionPrivate *region,
if (pbox->top() > ry)
{
- partOut = TRUE; /* missed part of rectangle above */
+ partOut = true; /* missed part of rectangle above */
if (partIn || (pbox->top() > prect->bottom()))
break;
ry = pbox->top(); /* x guaranteed to be == prect->x1 */
@@ -1399,14 +1399,14 @@ static bool RectInRegion(TQRegionPrivate *region,
if (pbox->left() > rx)
{
- partOut = TRUE; /* missed part of rectangle to left */
+ partOut = true; /* missed part of rectangle to left */
if (partIn)
break;
}
if (pbox->left() <= prect->right())
{
- partIn = TRUE; /* definitely overlap */
+ partIn = true; /* definitely overlap */
if (partOut)
break;
}
@@ -2166,7 +2166,7 @@ static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
}
reg->numRects = numRects;
- return(TRUE);
+ return(true);
}
/*
@@ -2193,7 +2193,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
EdgeTableEntry AET; /* header node for AET */
EdgeTableEntry *pETEs; /* EdgeTableEntries pool */
ScanLineListBlock SLLBlock; /* header for scanlinelist */
- int fixWAET = FALSE;
+ int fixWAET = false;
POINTBLOCK FirstPtBlock, *curPtBlock; /* PtBlock buffers */
POINTBLOCK *tmpPtBlock;
int numFullPtBlocks = 0;
@@ -2325,7 +2325,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
*/
if (InsertionSort(&AET) || fixWAET) {
computeWAET(&AET);
- fixWAET = FALSE;
+ fixWAET = false;
}
}
}
@@ -2434,7 +2434,7 @@ TQRegion::TQRegion()
{
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2470,7 +2470,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
if ( r.isEmpty() ) {
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2478,7 +2478,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
} else {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
if ( t == Rectangle ) { // rectangular region
@@ -2496,7 +2496,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
/*!
Constructs a polygon region from the point array \a a.
- If \a winding is TRUE, the polygon region is filled using the
+ If \a winding is true, the polygon region is filled using the
winding algorithm, otherwise the default even-odd fill algorithm
is used.
@@ -2509,7 +2509,7 @@ TQRegion::TQRegion( const TQPointArray &a, bool winding )
if (a.size() > 2) {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
data->region = PolygonRegion( (TQPoint*)a.data(), a.size(),
@@ -2517,7 +2517,7 @@ TQRegion::TQRegion( const TQPointArray &a, bool winding )
} else {
if ( !empty_region ) {
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2552,7 +2552,7 @@ TQRegion::TQRegion( const TQBitmap & bm )
if ( bm.isNull() ) {
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2560,7 +2560,7 @@ TQRegion::TQRegion( const TQBitmap & bm )
} else {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
data->region = qt_bitmapToRegion(bm);
@@ -2618,8 +2618,8 @@ TQRegion TQRegion::copy() const
}
/*!
- Returns TRUE if the region is a null region; otherwise returns
- FALSE.
+ Returns true if the region is a null region; otherwise returns
+ false.
A null region is a region that has not been initialized. A null
region is always empty.
@@ -2634,7 +2634,7 @@ bool TQRegion::isNull() const
/*!
- Returns TRUE if the region is empty; otherwise returns FALSE. An
+ Returns true if the region is empty; otherwise returns false. An
empty region is a region that contains no points.
Example:
@@ -2642,16 +2642,16 @@ bool TQRegion::isNull() const
TQRegion r1( 10, 10, 20, 20 );
TQRegion r2( 40, 40, 20, 20 );
TQRegion r3;
- r1.isNull(); // FALSE
- r1.isEmpty(); // FALSE
- r3.isNull(); // TRUE
- r3.isEmpty(); // TRUE
+ r1.isNull(); // false
+ r1.isEmpty(); // false
+ r3.isNull(); // true
+ r3.isEmpty(); // true
r3 = r1.intersect( r2 ); // r3 = intersection of r1 and r2
- r3.isNull(); // FALSE
- r3.isEmpty(); // TRUE
+ r3.isNull(); // false
+ r3.isEmpty(); // true
r3 = r1.unite( r2 ); // r3 = union of r1 and r2
- r3.isNull(); // FALSE
- r3.isEmpty(); // FALSE
+ r3.isNull(); // false
+ r3.isEmpty(); // false
\endcode
\sa isNull()
@@ -2664,8 +2664,8 @@ bool TQRegion::isEmpty() const
/*!
- Returns TRUE if the region contains the point \a p; otherwise
- returns FALSE.
+ Returns true if the region contains the point \a p; otherwise
+ returns false.
*/
bool TQRegion::contains( const TQPoint &p ) const
@@ -2676,8 +2676,8 @@ bool TQRegion::contains( const TQPoint &p ) const
/*!
\overload
- Returns TRUE if the region overlaps the rectangle \a r; otherwise
- returns FALSE.
+ Returns true if the region overlaps the rectangle \a r; otherwise
+ returns false.
*/
bool TQRegion::contains( const TQRect &r ) const
@@ -2715,7 +2715,7 @@ void TQRegion::translate( int dx, int dy )
TQRegion TQRegion::unite( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
UnionRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2730,7 +2730,7 @@ TQRegion TQRegion::unite( const TQRegion &r ) const
TQRegion TQRegion::intersect( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
IntersectRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2746,7 +2746,7 @@ TQRegion TQRegion::intersect( const TQRegion &r ) const
TQRegion TQRegion::subtract( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
SubtractRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2762,7 +2762,7 @@ TQRegion TQRegion::subtract( const TQRegion &r ) const
TQRegion TQRegion::eor( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
XorRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2806,7 +2806,7 @@ TQMemArray<TQRect> TQRegion::rects() const
*/
void TQRegion::setRects( const TQRect *rects, int num )
{
- *this = TQRegion( FALSE );
+ *this = TQRegion( false );
if ( !rects || (num == 1 && rects->isEmpty()) )
num = 0;
@@ -2828,21 +2828,21 @@ void TQRegion::setRects( const TQRect *rects, int num )
}
/*!
- Returns TRUE if the region is equal to \a r; otherwise returns
- FALSE.
+ Returns true if the region is equal to \a r; otherwise returns
+ false.
*/
bool TQRegion::operator==( const TQRegion &r ) const
{
return data == r.data ?
- TRUE : EqualRegion( data->region, r.data->region );
+ true : EqualRegion( data->region, r.data->region );
}
/*!
\fn bool TQRegion::operator!=( const TQRegion &r ) const
- Returns TRUE if the region is different from \a r; otherwise
- returns FALSE.
+ Returns true if the region is different from \a r; otherwise
+ returns false.
*/
/*