summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqpainter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqpainter.cpp')
-rw-r--r--src/kernel/tqpainter.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/kernel/tqpainter.cpp b/src/kernel/tqpainter.cpp
index 7b30e0af6..156f3774a 100644
--- a/src/kernel/tqpainter.cpp
+++ b/src/kernel/tqpainter.cpp
@@ -198,7 +198,7 @@ typedef TQPtrStack<TQWMatrix> TQWMatrixStack;
After all the coordinate transformation is done, TQPainter can clip
the drawing to an arbitrary rectangle or region. hasClipping() is
- TRUE if TQPainter clips, and clipRegion() returns the clip region.
+ true if TQPainter clips, and clipRegion() returns the clip region.
You can set it using either setClipRegion() or setClipRect().
Note that the clipping can be slow. It's all system-dependent,
but as a rule of thumb, you can assume that drawing speed is
@@ -470,7 +470,7 @@ TQPainter::TQPainter()
Constructs a painter that begins painting the paint device \a pd
immediately. Depending on the underlying graphic system the
painter will paint over children of the paintdevice if \a
- unclipped is TRUE.
+ unclipped is true.
This constructor is convenient for short-lived painters, e.g. in a
\link TQWidget::paintEvent() paint event\endlink and should be used
@@ -516,7 +516,7 @@ TQPainter::TQPainter( const TQPaintDevice *pd, bool unclipped )
Constructs a painter that begins painting the paint device \a pd
immediately, with the default arguments taken from \a
copyAttributes. The painter will paint over children of the paint
- device if \a unclipped is TRUE (although this is not supported on
+ device if \a unclipped is true (although this is not supported on
all platforms).
\sa begin()
@@ -557,7 +557,7 @@ TQPainter::~TQPainter()
This version opens the painter on a paint device \a pd and sets
the initial pen, background color and font from \a copyAttributes,
painting over the paint device's children when \a unclipped is
- TRUE. This is equivalent to:
+ true. This is equivalent to:
\code
TQPainter p;
@@ -595,15 +595,15 @@ bool TQPainter::begin( const TQPaintDevice *pd, const TQWidget *copyAttributes,
tqWarning( "TQPainter::begin: The widget to copy attributes from cannot "
"be null" );
#endif
- return FALSE;
+ return false;
}
if ( begin( pd, unclipped ) ) {
setPen( copyAttributes->foregroundColor() );
setBackgroundColor( copyAttributes->backgroundColor() );
setFont( copyAttributes->font() );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -624,9 +624,9 @@ void TQPainter::setf( uint b, bool v )
/*!
\fn bool TQPainter::isActive() const
- Returns TRUE if the painter is active painting, i.e. begin() has
+ Returns true if the painter is active painting, i.e. begin() has
been called and end() has not yet been called; otherwise returns
- FALSE.
+ false.
\sa TQPaintDevice::paintingActive()
*/
@@ -705,7 +705,7 @@ void TQPainter::save()
if ( pss == 0 ) {
pss = new TQPtrStack<TQPState>;
TQ_CHECK_PTR( pss );
- pss->setAutoDelete( TRUE );
+ pss->setAutoDelete( true );
ps_stack = pss;
}
TQPState *ps = new TQPState;
@@ -749,7 +749,7 @@ void TQPainter::restore()
if ( testf(ExtDev) ) {
pdev->cmd( TQPaintDevice::PdcRestore, this, 0 );
if ( pdev->devType() == TQInternal::Picture )
- block_ext = TRUE;
+ block_ext = true;
}
TQPStateStack *pss = (TQPStateStack *)ps_stack;
if ( pss == 0 || pss->isEmpty() ) {
@@ -808,7 +808,7 @@ void TQPainter::restore()
wm_stack = ps->wm_stack;
#endif
delete ps;
- block_ext = FALSE;
+ block_ext = false;
}
typedef TQPtrDict<TQPaintDevice> TQPaintDeviceDict;
@@ -1198,8 +1198,8 @@ void TQPainter::setTabArray( int *ta )
#ifndef TQT_NO_TRANSFORMATIONS
/*!
- Enables view transformations if \a enable is TRUE, or disables
- view transformations if \a enable is FALSE.
+ Enables view transformations if \a enable is true, or disables
+ view transformations if \a enable is false.
\sa hasViewXForm(), setWindow(), setViewport(), setWorldMatrix(),
setWorldXForm(), xForm()
@@ -1225,8 +1225,8 @@ void TQPainter::setViewXForm( bool enable )
/*!
\fn bool TQPainter::hasViewXForm() const
- Returns TRUE if view transformation is enabled; otherwise returns
- FALSE.
+ Returns true if view transformation is enabled; otherwise returns
+ false.
\sa setViewXForm(), xForm()
*/
@@ -1278,7 +1278,7 @@ void TQPainter::setWindow( int x, int y, int w, int h )
if ( testf(VxF) )
updateXForm();
else
- setViewXForm( TRUE );
+ setViewXForm( true );
}
/*!
@@ -1328,13 +1328,13 @@ void TQPainter::setViewport( int x, int y, int w, int h )
if ( testf(VxF) )
updateXForm();
else
- setViewXForm( TRUE );
+ setViewXForm( true );
}
/*!
- Enables world transformations if \a enable is TRUE, or disables
- world transformations if \a enable is FALSE. The world
+ Enables world transformations if \a enable is true, or disables
+ world transformations if \a enable is false. The world
transformation matrix is not changed.
\sa setWorldMatrix(), setWindow(), setViewport(), setViewXForm(),
@@ -1361,8 +1361,8 @@ void TQPainter::setWorldXForm( bool enable )
/*!
\fn bool TQPainter::hasWorldXForm() const
- Returns TRUE if world transformation is enabled; otherwise returns
- FALSE.
+ Returns true if world transformation is enabled; otherwise returns
+ false.
\sa setWorldXForm()
*/
@@ -1382,12 +1382,12 @@ const TQWMatrix &TQPainter::worldMatrix() const
Sets the world transformation matrix to \a m and enables world
transformation.
- If \a combine is TRUE, then \a m is combined with the current
+ If \a combine is true, then \a m is combined with the current
transformation matrix, otherwise \a m replaces the current
transformation matrix.
- If \a m is the identity matrix and \a combine is FALSE, this
- function calls setWorldXForm(FALSE). (The identity matrix is the
+ If \a m is the identity matrix and \a combine is false, this
+ function calls setWorldXForm(false). (The identity matrix is the
matrix where TQWMatrix::m11() and TQWMatrix::m22() are 1.0 and the
rest are 0.0.)
@@ -1411,7 +1411,7 @@ const TQWMatrix &TQPainter::worldMatrix() const
{
TQWMatrix m;
m.rotate( a );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
\endcode
@@ -1449,9 +1449,9 @@ void TQPainter::setWorldMatrix( const TQWMatrix &m, bool combine )
pdev->cmd( TQPaintDevice::PdcSetWMatrix, this, param );
}
if ( identity && pdev->devType() != TQInternal::Picture )
- setWorldXForm( FALSE );
+ setWorldXForm( false );
else if ( !testf(WxF) )
- setWorldXForm( TRUE );
+ setWorldXForm( true );
else
updateXForm();
}
@@ -1467,7 +1467,7 @@ void TQPainter::saveWorldMatrix()
if ( stack == 0 ) {
stack = new TQPtrStack<TQWMatrix>;
TQ_CHECK_PTR( stack );
- stack->setAutoDelete( TRUE );
+ stack->setAutoDelete( true );
wm_stack = stack;
}
@@ -1520,7 +1520,7 @@ void TQPainter::translate( double dx, double dy )
#ifndef TQT_NO_TRANSFORMATIONS
TQWMatrix m;
m.translate( dx, dy );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
#else
xlatex += (int)dx;
xlatey += (int)dy;
@@ -1541,7 +1541,7 @@ void TQPainter::scale( double sx, double sy )
{
TQWMatrix m;
m.scale( sx, sy );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
/*!
@@ -1555,7 +1555,7 @@ void TQPainter::shear( double sh, double sv )
{
TQWMatrix m;
m.shear( sv, sh );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
/*!
@@ -1569,7 +1569,7 @@ void TQPainter::rotate( double a )
{
TQWMatrix m;
m.rotate( a );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
@@ -1589,8 +1589,8 @@ void TQPainter::resetXForm()
ww = vw = pdev->metric( TQPaintDeviceMetrics::PdmWidth );
wh = vh = pdev->metric( TQPaintDeviceMetrics::PdmHeight );
wxmat = TQWMatrix();
- setWorldXForm( FALSE );
- setViewXForm( FALSE );
+ setWorldXForm( false );
+ setViewXForm( false );
}
/*!
@@ -1614,7 +1614,7 @@ void TQPainter::updateXForm()
}
xmat = m;
- txinv = FALSE; // no inverted matrix
+ txinv = false; // no inverted matrix
txop = TxNone;
if ( m12()==0.0 && m21()==0.0 && m11() >= 0.0 && m22() >= 0.0 ) {
if ( m11()==1.0 && m22()==1.0 ) {
@@ -1643,9 +1643,9 @@ void TQPainter::updateXForm()
void TQPainter::updateInvXForm()
{
#if defined(QT_CHECK_STATE)
- Q_ASSERT( txinv == FALSE );
+ Q_ASSERT( txinv == false );
#endif
- txinv = TRUE; // creating inverted matrix
+ txinv = true; // creating inverted matrix
bool invertible;
TQWMatrix m;
if ( testf(VxF) ) {
@@ -2143,7 +2143,7 @@ void TQPainter::fillRect( int x, int y, int w, int h, const TQBrush &brush )
/*!
\fn bool TQPainter::hasClipping() const
- Returns TRUE if clipping has been set; otherwise returns FALSE.
+ Returns true if clipping has been set; otherwise returns false.
\sa setClipping()
*/
@@ -2799,13 +2799,13 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
// tabs by spaces
TQChar *chr = (TQChar*)text.unicode();
const TQChar *end = chr + len;
- bool haveLineSep = FALSE;
+ bool haveLineSep = false;
while ( chr != end ) {
if ( *chr == '\r' || ( singleline && *chr == '\n' ) ) {
*chr = ' ';
} else if ( *chr == '\n' ) {
*chr = TQChar_linesep;
- haveLineSep = TRUE;
+ haveLineSep = true;
} else if ( *chr == '&' ) {
++maxUnderlines;
}
@@ -2944,8 +2944,8 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
}
if (!(tf & TQPainter::DontPrint)) {
- bool restoreClipping = FALSE;
- bool painterHasClip = FALSE;
+ bool restoreClipping = false;
+ bool painterHasClip = false;
TQRegion painterClipRegion;
if ( !dontclip ) {
#ifndef TQT_NO_TRANSFORMATIONS
@@ -2959,14 +2959,14 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
painterHasClip = painter->hasClipping();
painterClipRegion = painter->clipRegion();
- restoreClipping = TRUE;
+ restoreClipping = true;
painter->setClipRegion( reg );
} else {
if ( painter->hasClipping() ){
painterHasClip = painter->hasClipping();
painterClipRegion = painter->clipRegion();
- restoreClipping = TRUE;
- painter->setClipping( FALSE );
+ restoreClipping = true;
+ painter->setClipping( false );
}
}
@@ -3439,8 +3439,8 @@ void TQPen::setColor( const TQColor &c )
/*!
\fn bool TQPen::operator!=( const TQPen &p ) const
- Returns TRUE if the pen is different from \a p; otherwise returns
- FALSE.
+ Returns true if the pen is different from \a p; otherwise returns
+ false.
Two pens are different if they have different styles, widths or
colors.
@@ -3449,7 +3449,7 @@ void TQPen::setColor( const TQColor &c )
*/
/*!
- Returns TRUE if the pen is equal to \a p; otherwise returns FALSE.
+ Returns true if the pen is equal to \a p; otherwise returns false.
Two pens are equal if they have equal styles, widths and colors.
@@ -3816,8 +3816,8 @@ void TQBrush::setPixmap( const TQPixmap &pixmap )
/*!
\fn bool TQBrush::operator!=( const TQBrush &b ) const
- Returns TRUE if the brush is different from \a b; otherwise
- returns FALSE.
+ Returns true if the brush is different from \a b; otherwise
+ returns false.
Two brushes are different if they have different styles, colors or
pixmaps.
@@ -3826,8 +3826,8 @@ void TQBrush::setPixmap( const TQPixmap &pixmap )
*/
/*!
- Returns TRUE if the brush is equal to \a b; otherwise returns
- FALSE.
+ Returns true if the brush is equal to \a b; otherwise returns
+ false.
Two brushes are equal if they have equal styles, colors and
pixmaps.