From a30f5359f03c3017fa19a6770fab32d25d22cb87 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 15 Jul 2024 19:08:22 +0900 Subject: Rename graphics class nt* related files to equivalent tq* (part 1) Signed-off-by: Michele Calgaro --- doc/html/t14-cannon-cpp.html | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'doc/html/t14-cannon-cpp.html') diff --git a/doc/html/t14-cannon-cpp.html b/doc/html/t14-cannon-cpp.html index e51955539..f9849a2d6 100644 --- a/doc/html/t14-cannon-cpp.html +++ b/doc/html/t14-cannon-cpp.html @@ -40,7 +40,7 @@ body { background: #ffffff; color: black; } #include "cannon.h" #include <tqtimer.h> -#include <ntqpainter.h> +#include <tqpainter.h> #include <ntqpixmap.h> #include <tqdatetime.h> @@ -191,15 +191,15 @@ void CannonField::mouseReleaseEventpaintEvent( TQPaintEvent *e ) +void CannonField::paintEvent( TQPaintEvent *e ) { - TQRect updateR = e->rect(); - TQPainter p( this ); + TQRect updateR = e->rect(); + TQPainter p( this ); if ( gameEnded ) { - p.setPen( black ); - p.setFont( TQFont( "Courier", 48, TQFont::Bold ) ); - p.drawText( rect(), AlignCenter, "Game Over" ); + p.setPen( black ); + p.setFont( TQFont( "Courier", 48, TQFont::Bold ) ); + p.drawText( rect(), AlignCenter, "Game Over" ); } if ( updateR.intersects( cannonRect() ) ) paintCannon( &p ); @@ -211,47 +211,47 @@ void CannonField::paintEvent( CannonField::paintShot( TQPainter *p ) +void CannonField::paintShot( TQPainter *p ) { - p->setBrush( black ); - p->setPen( NoPen ); - p->drawRect( shotRect() ); + p->setBrush( black ); + p->setPen( NoPen ); + p->drawRect( shotRect() ); } -void CannonField::paintTarget( TQPainter *p ) +void CannonField::paintTarget( TQPainter *p ) { - p->setBrush( red ); - p->setPen( black ); - p->drawRect( targetRect() ); + p->setBrush( red ); + p->setPen( black ); + p->drawRect( targetRect() ); } -void CannonField::paintBarrier( TQPainter *p ) +void CannonField::paintBarrier( TQPainter *p ) { - p->setBrush( yellow ); - p->setPen( black ); - p->drawRect( barrierRect() ); + p->setBrush( yellow ); + p->setPen( black ); + p->drawRect( barrierRect() ); } const TQRect barrelRect(33, -4, 15, 8); -void CannonField::paintCannon( TQPainter *p ) +void CannonField::paintCannon( TQPainter *p ) { TQRect cr = cannonRect(); TQPixmap pix( cr.size() ); pix.fill( this, cr.topLeft() ); - TQPainter tmp( &pix ); - tmp.setBrush( blue ); - tmp.setPen( NoPen ); + TQPainter tmp( &pix ); + tmp.setBrush( blue ); + tmp.setPen( NoPen ); - tmp.translate( 0, pix.height() - 1 ); - tmp.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 ); - tmp.rotate( -ang ); - tmp.drawRect( barrelRect ); - tmp.end(); + tmp.translate( 0, pix.height() - 1 ); + tmp.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 ); + tmp.rotate( -ang ); + tmp.drawRect( barrelRect ); + tmp.end(); - p->drawPixmap( cr.topLeft(), pix ); + p->drawPixmap( cr.topLeft(), pix ); } -- cgit v1.2.3