diff options
Diffstat (limited to 'doc/html/tutorial1-09.html')
-rw-r--r-- | doc/html/tutorial1-09.html | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/html/tutorial1-09.html b/doc/html/tutorial1-09.html index 3edac0352..57a97b894 100644 --- a/doc/html/tutorial1-09.html +++ b/doc/html/tutorial1-09.html @@ -52,32 +52,32 @@ implementation. </h3> <a name="1-1"></a><p> -<p> <pre> <a name="x2346"></a>void CannonField::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * ) +<p> <pre> <a name="x2346"></a>void CannonField::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * ) { - <a href="qpainter.html">TQPainter</a> p( this ); + <a href="ntqpainter.html">TQPainter</a> p( this ); </pre> -<p> We'll now start to use <a href="qpainter.html">TQPainter</a> in earnest. We create a painter that +<p> We'll now start to use <a href="ntqpainter.html">TQPainter</a> in earnest. We create a painter that operates on this widget. -<p> <pre> <a name="x2343"></a> p.<a href="qpainter.html#setBrush">setBrush</a>( blue ); +<p> <pre> <a name="x2343"></a> p.<a href="ntqpainter.html#setBrush">setBrush</a>( blue ); </pre> <p> When TQPainter fills a rectangle, a circle, or whatever, it fills the shape using its brush. Here we set it to use a blue brush. (We could also use a pattern.) -<p> <pre> <a name="x2344"></a> p.<a href="qpainter.html#setPen">setPen</a>( NoPen ); +<p> <pre> <a name="x2344"></a> p.<a href="ntqpainter.html#setPen">setPen</a>( NoPen ); </pre> <p> And the edges of what TQPainter draws are drawn using the pen. Here we set it to NoPen, meaning that there will be no special edge when we draw something; the blue brush will go all the way to the edges of the things we draw. -<p> <pre> <a name="x2345"></a> p.<a href="qpainter.html#translate">translate</a>( 0, rect().bottom() ); +<p> <pre> <a name="x2345"></a> p.<a href="ntqpainter.html#translate">translate</a>( 0, rect().bottom() ); </pre> -<p> The <a href="qpainter.html#translate">TQPainter::translate</a>() function translates the coordinate +<p> The <a href="ntqpainter.html#translate">TQPainter::translate</a>() function translates the coordinate system of the TQPainter; i.e., it moves it by an offset. Here we set the (0, 0) point to the bottom-left corner of the widget. The x and y directions remain unchanged, i.e., all the y coordinates inside the widget are now negative (see <a href="coordsys.html">The Coordinate System</a> for more information about TQt's coordinate system). -<p> <pre> <a name="x2340"></a> p.<a href="qpainter.html#drawPie">drawPie</a>( TQRect(-35, -35, 70, 70), 0, 90*16 ); +<p> <pre> <a name="x2340"></a> p.<a href="ntqpainter.html#drawPie">drawPie</a>( TQRect(-35, -35, 70, 70), 0, 90*16 ); </pre> <p> The drawPie() function draws a pie shape inside the specified rectangle using a start angle and an arc length. The angles are @@ -85,21 +85,21 @@ specified in 1/16th of a degree. Zero degrees is at the 3 o'clock position. The drawing direction is counter-clockwise. Here we draw a quarter of a circle in the bottom-left corner of the widget. The pie is filled with blue and has no outline. -<p> <pre> <a name="x2342"></a> p.<a href="qpainter.html#rotate">rotate</a>( -ang ); +<p> <pre> <a name="x2342"></a> p.<a href="ntqpainter.html#rotate">rotate</a>( -ang ); </pre> -<p> The <a href="qpainter.html#rotate">TQPainter::rotate</a>() function rotates the coordinate system of the -<a href="qpainter.html">TQPainter</a> around the origin. The rotation argument is a <tt>float</tt> given +<p> The <a href="ntqpainter.html#rotate">TQPainter::rotate</a>() function rotates the coordinate system of the +<a href="ntqpainter.html">TQPainter</a> around the origin. The rotation argument is a <tt>float</tt> given in degrees (not given in 1/16th of a degree as above) and clockwise. Here we rotate the coordinate system <tt>ang</tt> degrees counter-clockwise. -<p> <pre> <a name="x2341"></a> p.<a href="qpainter.html#drawRect">drawRect</a>( TQRect(33, -4, 15, 8) ); +<p> <pre> <a name="x2341"></a> p.<a href="ntqpainter.html#drawRect">drawRect</a>( TQRect(33, -4, 15, 8) ); </pre> -<p> The <a href="qpainter.html#drawRect">TQPainter::drawRect</a>() function draws the specified rectangle. Here +<p> The <a href="ntqpainter.html#drawRect">TQPainter::drawRect</a>() function draws the specified rectangle. Here we draw the barrel of the cannon. <p> It can often be difficult to envision the resulting drawing when the coordinate system has been transformed (translated, rotated, scaled, or sheared) as above. <p> In this case the coordinate system is first translated and then rotated. -If the rectangle <a href="qrect.html">TQRect</a>(33, -4, 15, 8) had been drawn in the translated +If the rectangle <a href="ntqrect.html">TQRect</a>(33, -4, 15, 8) had been drawn in the translated coordinate system, it would have looked like this: <p> <center><img src="t9_1.png" alt="The cannon translated but not rotated"></center> <p> Note that the rectangle is clipped by the border of the CannonField @@ -114,12 +114,12 @@ this time. <pre> int main( int argc, char **argv ) { - <a name="x2347"></a> TQApplication::<a href="qapplication.html#setColorSpec">setColorSpec</a>( TQApplication::CustomColor ); - <a href="qapplication.html">TQApplication</a> a( argc, argv ); + <a name="x2347"></a> TQApplication::<a href="ntqapplication.html#setColorSpec">setColorSpec</a>( TQApplication::CustomColor ); + <a href="ntqapplication.html">TQApplication</a> a( argc, argv ); </pre> <p> We tell TQt that we want a different color-allocation strategy for this program. There is no single correct color-allocation strategy. Because -this program uses an unusual yellow but not many colors, <tt>CustomColor</tt> is best. There are several other allocation strategies; you can read about them in the <a href="qapplication.html#setColorSpec">TQApplication::setColorSpec</a>() +this program uses an unusual yellow but not many colors, <tt>CustomColor</tt> is best. There are several other allocation strategies; you can read about them in the <a href="ntqapplication.html#setColorSpec">TQApplication::setColorSpec</a>() documentation. <p> Mostly you can ignore this, since the default is good. Occasionally some applications with unusual color use look bad; changing the |