~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/q3canvassprite.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/qt3support/canvas/q3canvas.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3CanvasSprite Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Q3CanvasSprite Class Reference</h1>
 
21
<p>The Q3CanvasSprite class provides an animated canvas item on a <a href="q3canvas.html">Q3Canvas</a>. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3CanvasSprite&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="q3canvasitem.html">Q3CanvasItem</a>.</p>
 
25
<ul>
 
26
<li><a href="q3canvassprite-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-types"></a>
 
29
<h3>Public Types</h3>
 
30
<ul>
 
31
<li><div class="fn"/>enum <b><a href="q3canvassprite.html#FrameAnimationType-enum">FrameAnimationType</a></b> { Cycle, Oscillate }</li>
 
32
</ul>
 
33
<a name="public-functions"></a>
 
34
<h3>Public Functions</h3>
 
35
<ul>
 
36
<li><div class="fn"/><b><a href="q3canvassprite.html#Q3CanvasSprite">Q3CanvasSprite</a></b> ( Q3CanvasPixmapArray * <i>a</i>, Q3Canvas * <i>canvas</i> )</li>
 
37
<li><div class="fn"/>virtual <b><a href="q3canvassprite.html#dtor.Q3CanvasSprite">~Q3CanvasSprite</a></b> ()</li>
 
38
<li><div class="fn"/>virtual void <b><a href="q3canvassprite.html#advance">advance</a></b> ( int <i>phase</i> )</li>
 
39
<li><div class="fn"/>int <b><a href="q3canvassprite.html#bottomEdge">bottomEdge</a></b> () const</li>
 
40
<li><div class="fn"/>int <b><a href="q3canvassprite.html#bottomEdge-2">bottomEdge</a></b> ( int <i>ny</i> ) const</li>
 
41
<li><div class="fn"/>virtual QRect <b><a href="q3canvassprite.html#boundingRect">boundingRect</a></b> () const</li>
 
42
<li><div class="fn"/>virtual void <b><a href="q3canvassprite.html#draw">draw</a></b> ( QPainter &amp; <i>painter</i> )</li>
 
43
<li><div class="fn"/>int <b><a href="q3canvassprite.html#frame">frame</a></b> () const</li>
 
44
<li><div class="fn"/>int <b><a href="q3canvassprite.html#frameCount">frameCount</a></b> () const</li>
 
45
<li><div class="fn"/>int <b><a href="q3canvassprite.html#height">height</a></b> () const</li>
 
46
<li><div class="fn"/>Q3CanvasPixmap * <b><a href="q3canvassprite.html#image">image</a></b> () const</li>
 
47
<li><div class="fn"/>Q3CanvasPixmap * <b><a href="q3canvassprite.html#image-2">image</a></b> ( int <i>f</i> ) const</li>
 
48
<li><div class="fn"/>virtual Q3CanvasPixmap * <b><a href="q3canvassprite.html#imageAdvanced">imageAdvanced</a></b> () const</li>
 
49
<li><div class="fn"/>int <b><a href="q3canvassprite.html#leftEdge">leftEdge</a></b> () const</li>
 
50
<li><div class="fn"/>int <b><a href="q3canvassprite.html#leftEdge-2">leftEdge</a></b> ( int <i>nx</i> ) const</li>
 
51
<li><div class="fn"/>virtual void <b><a href="q3canvassprite.html#move-2">move</a></b> ( double <i>nx</i>, double <i>ny</i>, int <i>nf</i> )</li>
 
52
<li><div class="fn"/>int <b><a href="q3canvassprite.html#rightEdge">rightEdge</a></b> () const</li>
 
53
<li><div class="fn"/>int <b><a href="q3canvassprite.html#rightEdge-2">rightEdge</a></b> ( int <i>nx</i> ) const</li>
 
54
<li><div class="fn"/>virtual int <b><a href="q3canvassprite.html#rtti">rtti</a></b> () const</li>
 
55
<li><div class="fn"/>void <b><a href="q3canvassprite.html#setFrame">setFrame</a></b> ( int <i>f</i> )</li>
 
56
<li><div class="fn"/>virtual void <b><a href="q3canvassprite.html#setFrameAnimation">setFrameAnimation</a></b> ( FrameAnimationType <i>type</i> = Cycle, int <i>step</i> = 1, int <i>state</i> = 0 )</li>
 
57
<li><div class="fn"/>void <b><a href="q3canvassprite.html#setSequence">setSequence</a></b> ( Q3CanvasPixmapArray * <i>a</i> )</li>
 
58
<li><div class="fn"/>int <b><a href="q3canvassprite.html#topEdge">topEdge</a></b> () const</li>
 
59
<li><div class="fn"/>int <b><a href="q3canvassprite.html#topEdge-2">topEdge</a></b> ( int <i>ny</i> ) const</li>
 
60
<li><div class="fn"/>int <b><a href="q3canvassprite.html#width">width</a></b> () const</li>
 
61
</ul>
 
62
<ul>
 
63
<li><div class="fn"/>34 public functions inherited from <a href="q3canvasitem.html#public-functions">Q3CanvasItem</a></li>
 
64
</ul>
 
65
<h3>Additional Inherited Members</h3>
 
66
<ul>
 
67
<li><div class="fn"/>1 protected function inherited from <a href="q3canvasitem.html#protected-functions">Q3CanvasItem</a></li>
 
68
</ul>
 
69
<a name="details"></a>
 
70
<hr />
 
71
<h2>Detailed Description</h2>
 
72
<p>The Q3CanvasSprite class provides an animated canvas item on a <a href="q3canvas.html">Q3Canvas</a>.</p>
 
73
<p>A canvas sprite is an object which can contain any number of images (referred to as frames), only one of which is current, i.e. displayed, at any one time. The images can be passed in the constructor or set or changed later with <a href="q3canvassprite.html#setSequence">setSequence</a>(). If you subclass Q3CanvasSprite you can change the frame that is displayed periodically, e.g. whenever Q3CanvasItem::advance(1) is called to create the effect of animation.</p>
 
74
<p>The current frame can be set with <a href="q3canvassprite.html#setFrame">setFrame</a>() or with <a href="q3canvassprite.html#move">move</a>(). The number of frames available is given by <a href="q3canvassprite.html#frameCount">frameCount</a>(). The bounding rectangle of the current frame is returned by <a href="q3canvassprite.html#boundingRect">boundingRect</a>().</p>
 
75
<p>The current frame's image can be retrieved with <a href="q3canvassprite.html#image">image</a>(); use <a href="q3canvassprite.html#imageAdvanced">imageAdvanced</a>() to retrieve the image for the frame that will be shown after advance(1) is called. Use the <a href="q3canvassprite.html#image">image</a>() overload passing it an integer index to retrieve a particular image from the list of frames.</p>
 
76
<p>Use <a href="q3canvassprite.html#width">width</a>() and <a href="q3canvassprite.html#height">height</a>() to retrieve the dimensions of the current frame.</p>
 
77
<p>Use <a href="q3canvassprite.html#leftEdge">leftEdge</a>() and <a href="q3canvassprite.html#rightEdge">rightEdge</a>() to retrieve the current frame's left-hand and right-hand x-coordinates respectively. Use <a href="q3canvassprite.html#bottomEdge">bottomEdge</a>() and <a href="q3canvassprite.html#topEdge">topEdge</a>() to retrieve the current frame's bottom and top y-coordinates respectively. These functions have an overload which will accept an integer frame number to retrieve the coordinates of a particular frame.</p>
 
78
<p>Q3CanvasSprite draws very quickly, at the expense of memory.</p>
 
79
<p>The current frame's image can be drawn on a painter with <a href="q3canvassprite.html#draw">draw</a>().</p>
 
80
<p>Like any other canvas item, canvas sprites can be moved with <a href="q3canvassprite.html#move">move</a>() which sets the x and y coordinates and the frame number, as well as with <a href="q3canvasitem.html#move">Q3CanvasItem::move</a>() and <a href="q3canvasitem.html#moveBy">Q3CanvasItem::moveBy</a>(), or by setting coordinates with <a href="q3canvasitem.html#setX">Q3CanvasItem::setX</a>(), <a href="q3canvasitem.html#setY">Q3CanvasItem::setY</a>() and <a href="q3canvasitem.html#setZ">Q3CanvasItem::setZ</a>().</p>
 
81
<hr />
 
82
<h2>Member Type Documentation</h2>
 
83
<h3 class="fn"><a name="FrameAnimationType-enum"></a>enum Q3CanvasSprite::FrameAnimationType</h3>
 
84
<p>This enum is used to identify the different types of frame animation offered by <a href="q3canvassprite.html">Q3CanvasSprite</a>.</p>
 
85
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
86
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
87
<tr><td valign="top"><tt>Q3CanvasSprite::Cycle</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">at each advance the frame number will be incremented by 1 (modulo the frame count).</td></tr>
 
88
<tr><td valign="top"><tt>Q3CanvasSprite::Oscillate</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">at each advance the frame number will be incremented by 1 up to the frame count then decremented to by 1 to 0, repeating this sequence forever.</td></tr>
 
89
</table>
 
90
<hr />
 
91
<h2>Member Function Documentation</h2>
 
92
<h3 class="fn"><a name="Q3CanvasSprite"></a>Q3CanvasSprite::Q3CanvasSprite ( <a href="q3canvaspixmaparray.html">Q3CanvasPixmapArray</a> * <i>a</i>, <a href="q3canvas.html">Q3Canvas</a> * <i>canvas</i> )</h3>
 
93
<p>Constructs a <a href="q3canvassprite.html">Q3CanvasSprite</a> which uses images from the <a href="q3canvaspixmaparray.html">Q3CanvasPixmapArray</a> <i>a</i>.</p>
 
94
<p>The sprite in initially positioned at (0, 0) on <i>canvas</i>, using frame 0.</p>
 
95
<h3 class="fn"><a name="dtor.Q3CanvasSprite"></a>Q3CanvasSprite::~Q3CanvasSprite ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
96
<p>Destroys the sprite and removes it from the canvas. Does <i>not</i> delete the images.</p>
 
97
<h3 class="fn"><a name="advance"></a>void Q3CanvasSprite::advance ( int <i>phase</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
98
<p>Extends the default <a href="q3canvasitem.html">Q3CanvasItem</a> implementation to provide the functionality of <a href="q3canvassprite.html#setFrameAnimation">setFrameAnimation</a>().</p>
 
99
<p>The <i>phase</i> is 0 or 1: see <a href="q3canvasitem.html#advance">Q3CanvasItem::advance</a>() for details.</p>
 
100
<p>Reimplemented from <a href="q3canvasitem.html#advance">Q3CanvasItem</a>.</p>
 
101
<p>See also <a href="q3canvasitem.html#advance">Q3CanvasItem::advance</a>() and <a href="q3canvasitem.html#setVelocity">setVelocity</a>().</p>
 
102
<h3 class="fn"><a name="bottomEdge"></a>int Q3CanvasSprite::bottomEdge () const</h3>
 
103
<p>Returns the y-coordinate of the current bottom edge of the sprite. (This may change as the sprite animates since different frames may have different bottom edges.)</p>
 
104
<p>See also <a href="q3canvassprite.html#leftEdge">leftEdge</a>(), <a href="q3canvassprite.html#rightEdge">rightEdge</a>(), and <a href="q3canvassprite.html#topEdge">topEdge</a>().</p>
 
105
<h3 class="fn"><a name="bottomEdge-2"></a>int Q3CanvasSprite::bottomEdge ( int <i>ny</i> ) const</h3>
 
106
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
107
<p>Returns what the y-coordinate of the top edge of the sprite would be if the sprite (actually its hotspot) were moved to y-position <i>ny</i>.</p>
 
108
<p>See also <a href="q3canvassprite.html#leftEdge">leftEdge</a>(), <a href="q3canvassprite.html#rightEdge">rightEdge</a>(), and <a href="q3canvassprite.html#topEdge">topEdge</a>().</p>
 
109
<h3 class="fn"><a name="boundingRect"></a><a href="qrect.html">QRect</a> Q3CanvasSprite::boundingRect () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
110
<p>Returns the bounding rectangle for the image in the sprite's current frame. This assumes that the images are tightly cropped (i.e. do not have transparent pixels all along a side).</p>
 
111
<p>Reimplemented from <a href="q3canvasitem.html#boundingRect">Q3CanvasItem</a>.</p>
 
112
<h3 class="fn"><a name="draw"></a>void Q3CanvasSprite::draw ( <a href="qpainter.html">QPainter</a> &amp; <i>painter</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
113
<p>Draws the current frame's image at the sprite's current position on painter <i>painter</i>.</p>
 
114
<p>Reimplemented from <a href="q3canvasitem.html#draw">Q3CanvasItem</a>.</p>
 
115
<h3 class="fn"><a name="frame"></a>int Q3CanvasSprite::frame () const</h3>
 
116
<p>Returns the index of the current animation frame in the <a href="q3canvassprite.html">Q3CanvasSprite</a>'s <a href="q3canvaspixmaparray.html">Q3CanvasPixmapArray</a>.</p>
 
117
<p>See also <a href="q3canvassprite.html#setFrame">setFrame</a>() and <a href="q3canvassprite.html#move">move</a>().</p>
 
118
<h3 class="fn"><a name="frameCount"></a>int Q3CanvasSprite::frameCount () const</h3>
 
119
<p>Returns the number of frames in the <a href="q3canvassprite.html">Q3CanvasSprite</a>'s <a href="q3canvaspixmaparray.html">Q3CanvasPixmapArray</a>.</p>
 
120
<h3 class="fn"><a name="height"></a>int Q3CanvasSprite::height () const</h3>
 
121
<p>The height of the sprite for the current frame's image.</p>
 
122
<p>See also <a href="q3canvassprite.html#frame">frame</a>().</p>
 
123
<h3 class="fn"><a name="image"></a><a href="q3canvaspixmap.html">Q3CanvasPixmap</a> * Q3CanvasSprite::image () const</h3>
 
124
<p>Returns the current frame's image.</p>
 
125
<p>See also <a href="q3canvassprite.html#frame">frame</a>() and <a href="q3canvassprite.html#setFrame">setFrame</a>().</p>
 
126
<h3 class="fn"><a name="image-2"></a><a href="q3canvaspixmap.html">Q3CanvasPixmap</a> * Q3CanvasSprite::image ( int <i>f</i> ) const</h3>
 
127
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
128
<p>Returns the image for frame <i>f</i>. Does not do any bounds checking on <i>f</i>.</p>
 
129
<h3 class="fn"><a name="imageAdvanced"></a><a href="q3canvaspixmap.html">Q3CanvasPixmap</a> * Q3CanvasSprite::imageAdvanced () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
130
<p>Returns the image the sprite <i>will</i> have after advance(1) is called. By default this is the same as <a href="q3canvassprite.html#image">image</a>().</p>
 
131
<h3 class="fn"><a name="leftEdge"></a>int Q3CanvasSprite::leftEdge () const</h3>
 
132
<p>Returns the x-coordinate of the current left edge of the sprite. (This may change as the sprite animates since different frames may have different left edges.)</p>
 
133
<p>See also <a href="q3canvassprite.html#rightEdge">rightEdge</a>(), <a href="q3canvassprite.html#bottomEdge">bottomEdge</a>(), and <a href="q3canvassprite.html#topEdge">topEdge</a>().</p>
 
134
<h3 class="fn"><a name="leftEdge-2"></a>int Q3CanvasSprite::leftEdge ( int <i>nx</i> ) const</h3>
 
135
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
136
<p>Returns what the x-coordinate of the left edge of the sprite would be if the sprite (actually its hotspot) were moved to x-position <i>nx</i>.</p>
 
137
<p>See also <a href="q3canvassprite.html#rightEdge">rightEdge</a>(), <a href="q3canvassprite.html#bottomEdge">bottomEdge</a>(), and <a href="q3canvassprite.html#topEdge">topEdge</a>().</p>
 
138
<h3 class="fn"><a name="move-2"></a>void Q3CanvasSprite::move ( double <i>nx</i>, double <i>ny</i>, int <i>nf</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
139
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
140
<p>Set the position of the sprite to <i>nx</i>, <i>ny</i> and the current frame to <i>nf</i>. <i>nf</i> will be ignored if it is larger than <a href="q3canvassprite.html#frameCount">frameCount</a>() or smaller than 0.</p>
 
141
<h3 class="fn"><a name="rightEdge"></a>int Q3CanvasSprite::rightEdge () const</h3>
 
142
<p>Returns the x-coordinate of the current right edge of the sprite. (This may change as the sprite animates since different frames may have different right edges.)</p>
 
143
<p>See also <a href="q3canvassprite.html#leftEdge">leftEdge</a>(), <a href="q3canvassprite.html#bottomEdge">bottomEdge</a>(), and <a href="q3canvassprite.html#topEdge">topEdge</a>().</p>
 
144
<h3 class="fn"><a name="rightEdge-2"></a>int Q3CanvasSprite::rightEdge ( int <i>nx</i> ) const</h3>
 
145
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
146
<p>Returns what the x-coordinate of the right edge of the sprite would be if the sprite (actually its hotspot) were moved to x-position <i>nx</i>.</p>
 
147
<p>See also <a href="q3canvassprite.html#leftEdge">leftEdge</a>(), <a href="q3canvassprite.html#bottomEdge">bottomEdge</a>(), and <a href="q3canvassprite.html#topEdge">topEdge</a>().</p>
 
148
<h3 class="fn"><a name="rtti"></a>int Q3CanvasSprite::rtti () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
149
<p>Returns 1 (<a href="q3canvasitem.html#RttiValues-enum">Q3CanvasItem::Rtti_Sprite</a>).</p>
 
150
<p>Reimplemented from <a href="q3canvasitem.html#rtti">Q3CanvasItem</a>.</p>
 
151
<p>See also <a href="q3canvasitem.html#rtti">Q3CanvasItem::rtti</a>().</p>
 
152
<h3 class="fn"><a name="setFrame"></a>void Q3CanvasSprite::setFrame ( int <i>f</i> )</h3>
 
153
<p>Sets the animation frame used for displaying the sprite to <i>f</i>, an index into the <a href="q3canvassprite.html">Q3CanvasSprite</a>'s <a href="q3canvaspixmaparray.html">Q3CanvasPixmapArray</a>. The call will be ignored if <i>f</i> is larger than <a href="q3canvassprite.html#frameCount">frameCount</a>() or smaller than 0.</p>
 
154
<p>See also <a href="q3canvassprite.html#frame">frame</a>() and <a href="q3canvassprite.html#move">move</a>().</p>
 
155
<h3 class="fn"><a name="setFrameAnimation"></a>void Q3CanvasSprite::setFrameAnimation ( <a href="q3canvassprite.html#FrameAnimationType-enum">FrameAnimationType</a> <i>type</i> = Cycle, int <i>step</i> = 1, int <i>state</i> = 0 )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
156
<p>Sets the animation characteristics for the sprite.</p>
 
157
<p>For <i>type</i> == <tt>Cycle</tt>, the frames will increase by <i>step</i> at each advance, modulo the <a href="q3canvassprite.html#frameCount">frameCount</a>().</p>
 
158
<p>For <i>type</i> == <tt>Oscillate</tt>, the frames will increase by <i>step</i> at each advance, up to the <a href="q3canvassprite.html#frameCount">frameCount</a>(), then decrease by <i>step</i> back to 0, repeating forever.</p>
 
159
<p>The <i>state</i> parameter is for internal use.</p>
 
160
<h3 class="fn"><a name="setSequence"></a>void Q3CanvasSprite::setSequence ( <a href="q3canvaspixmaparray.html">Q3CanvasPixmapArray</a> * <i>a</i> )</h3>
 
161
<p>Set the array of images used for displaying the sprite to the <a href="q3canvaspixmaparray.html">Q3CanvasPixmapArray</a> <i>a</i>.</p>
 
162
<p>If the current <a href="q3canvassprite.html#frame">frame</a>() is larger than the number of images in <i>a</i>, the current frame will be reset to 0.</p>
 
163
<h3 class="fn"><a name="topEdge"></a>int Q3CanvasSprite::topEdge () const</h3>
 
164
<p>Returns the y-coordinate of the top edge of the sprite. (This may change as the sprite animates since different frames may have different top edges.)</p>
 
165
<p>See also <a href="q3canvassprite.html#leftEdge">leftEdge</a>(), <a href="q3canvassprite.html#rightEdge">rightEdge</a>(), and <a href="q3canvassprite.html#bottomEdge">bottomEdge</a>().</p>
 
166
<h3 class="fn"><a name="topEdge-2"></a>int Q3CanvasSprite::topEdge ( int <i>ny</i> ) const</h3>
 
167
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
168
<p>Returns what the y-coordinate of the top edge of the sprite would be if the sprite (actually its hotspot) were moved to y-position <i>ny</i>.</p>
 
169
<p>See also <a href="q3canvassprite.html#leftEdge">leftEdge</a>(), <a href="q3canvassprite.html#rightEdge">rightEdge</a>(), and <a href="q3canvassprite.html#bottomEdge">bottomEdge</a>().</p>
 
170
<h3 class="fn"><a name="width"></a>int Q3CanvasSprite::width () const</h3>
 
171
<p>The width of the sprite for the current frame's image.</p>
 
172
<p>See also <a href="q3canvassprite.html#frame">frame</a>().</p>
 
173
<p /><address><hr /><div align="center">
 
174
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
175
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
176
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
177
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
178
</tr></table></div></address></body>
 
179
</html>