You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
6.3 KiB
129 lines
6.3 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/canvas/tqcanvas.cpp:2800 -->
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>TQCanvasPixmap Class</title>
|
|
<style type="text/css"><!--
|
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
|
a:link { color: #004faf; text-decoration: none }
|
|
a:visited { color: #672967; text-decoration: none }
|
|
body { background: #ffffff; color: black; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr bgcolor="#E5E5E5">
|
|
<td valign=center>
|
|
<a href="index.html">
|
|
<font color="#004faf">Home</font></a>
|
|
| <a href="classes.html">
|
|
<font color="#004faf">All Classes</font></a>
|
|
| <a href="mainclasses.html">
|
|
<font color="#004faf">Main Classes</font></a>
|
|
| <a href="annotated.html">
|
|
<font color="#004faf">Annotated</font></a>
|
|
| <a href="groups.html">
|
|
<font color="#004faf">Grouped Classes</font></a>
|
|
| <a href="functions.html">
|
|
<font color="#004faf">Functions</font></a>
|
|
</td>
|
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQCanvasPixmap Class Reference<br><small>[<a href="canvas.html">canvas module</a>]</small></h1>
|
|
|
|
<p>The TQCanvasPixmap class provides pixmaps for TQCanvasSprites.
|
|
<a href="#details">More...</a>
|
|
<p><tt>#include <<a href="tqcanvas-h.html">tqcanvas.h</a>></tt>
|
|
<p>Inherits <a href="ntqpixmap.html">TQPixmap</a>.
|
|
<p><a href="tqcanvaspixmap-members.html">List of all member functions.</a>
|
|
<h2>Public Members</h2>
|
|
<ul>
|
|
<li class=fn><a href="#TQCanvasPixmap"><b>TQCanvasPixmap</b></a> ( const TQString & datafilename )</li>
|
|
<li class=fn><a href="#TQCanvasPixmap-2"><b>TQCanvasPixmap</b></a> ( const TQImage & image )</li>
|
|
<li class=fn><a href="#TQCanvasPixmap-3"><b>TQCanvasPixmap</b></a> ( const TQPixmap & pm, const TQPoint & offset )</li>
|
|
<li class=fn><a href="#~TQCanvasPixmap"><b>~TQCanvasPixmap</b></a> ()</li>
|
|
<li class=fn>int <a href="#offsetX"><b>offsetX</b></a> () const</li>
|
|
<li class=fn>int <a href="#offsetY"><b>offsetY</b></a> () const</li>
|
|
<li class=fn>void <a href="#setOffset"><b>setOffset</b></a> ( int x, int y )</li>
|
|
</ul>
|
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
|
|
|
|
|
The TQCanvasPixmap class provides pixmaps for TQCanvasSprites.
|
|
|
|
<p>
|
|
|
|
|
|
<p> If you want to show a single pixmap on a <a href="tqcanvas.html">TQCanvas</a> use a
|
|
<a href="tqcanvassprite.html">TQCanvasSprite</a> with just one pixmap.
|
|
<p> When pixmaps are inserted into a <a href="tqcanvaspixmaparray.html">TQCanvasPixmapArray</a> they are held
|
|
as TQCanvasPixmaps. <a href="tqcanvassprite.html">TQCanvasSprite</a>s are used to show pixmaps on
|
|
<a href="tqcanvas.html">TQCanvas</a>es and hold their pixmaps in a TQCanvasPixmapArray. If
|
|
you retrieve a frame (pixmap) from a TQCanvasSprite it will be
|
|
returned as a TQCanvasPixmap.
|
|
<p> The pixmap is a <a href="ntqpixmap.html">TQPixmap</a> and can only be set in the constructor.
|
|
There are three different constructors, one taking a TQPixmap, one
|
|
a <a href="tqimage.html">TQImage</a> and one a file name that refers to a file in any
|
|
supported file format (see <a href="tqimageio.html">TQImageIO</a>).
|
|
<p> TQCanvasPixmap can have a hotspot which is defined in terms of an (x,
|
|
y) offset. When you create a TQCanvasPixmap from a PNG file or from
|
|
a TQImage that has a <a href="tqimage.html#offset">TQImage::offset</a>(), the offset() is initialized
|
|
appropriately, otherwise the constructor leaves it at (0, 0). You
|
|
can set it later using <a href="#setOffset">setOffset</a>(). When the TQCanvasPixmap is used
|
|
in a <a href="tqcanvassprite.html">TQCanvasSprite</a>, the offset position is the point at
|
|
<a href="tqcanvasitem.html#x">TQCanvasItem::x</a>() and <a href="tqcanvasitem.html#y">TQCanvasItem::y</a>(), not the top-left corner of
|
|
the pixmap.
|
|
<p> Note that for TQCanvasPixmap objects created by a TQCanvasSprite, the
|
|
position of each TQCanvasPixmap object is set so that the hotspot
|
|
stays in the same position.
|
|
<p> <p>See also <a href="tqcanvaspixmaparray.html">TQCanvasPixmapArray</a>, <a href="tqcanvasitem.html">TQCanvasItem</a>, <a href="tqcanvassprite.html">TQCanvasSprite</a>, <a href="graphics.html">Graphics Classes</a>, and <a href="images.html">Image Processing Classes</a>.
|
|
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<h3 class=fn><a name="TQCanvasPixmap"></a>TQCanvasPixmap::TQCanvasPixmap ( const <a href="ntqstring.html">TQString</a> & datafilename )
|
|
</h3>
|
|
Constructs a TQCanvasPixmap that uses the image stored in <em>datafilename</em>.
|
|
|
|
<h3 class=fn><a name="TQCanvasPixmap-2"></a>TQCanvasPixmap::TQCanvasPixmap ( const <a href="tqimage.html">TQImage</a> & image )
|
|
</h3>
|
|
Constructs a TQCanvasPixmap from the image <em>image</em>.
|
|
|
|
<h3 class=fn><a name="TQCanvasPixmap-3"></a>TQCanvasPixmap::TQCanvasPixmap ( const <a href="ntqpixmap.html">TQPixmap</a> & pm, const <a href="ntqpoint.html">TQPoint</a> & offset )
|
|
</h3>
|
|
Constructs a TQCanvasPixmap from the pixmap <em>pm</em> using the offset
|
|
<em>offset</em>.
|
|
|
|
<h3 class=fn><a name="~TQCanvasPixmap"></a>TQCanvasPixmap::~TQCanvasPixmap ()
|
|
</h3>
|
|
Destroys the pixmap.
|
|
|
|
<h3 class=fn>int <a name="offsetX"></a>TQCanvasPixmap::offsetX () const
|
|
</h3>
|
|
|
|
<p> Returns the x-offset of the pixmap's hotspot.
|
|
<p> <p>See also <a href="#setOffset">setOffset</a>().
|
|
|
|
<h3 class=fn>int <a name="offsetY"></a>TQCanvasPixmap::offsetY () const
|
|
</h3>
|
|
|
|
<p> Returns the y-offset of the pixmap's hotspot.
|
|
<p> <p>See also <a href="#setOffset">setOffset</a>().
|
|
|
|
<h3 class=fn>void <a name="setOffset"></a>TQCanvasPixmap::setOffset ( int x, int y )
|
|
</h3>
|
|
|
|
<p> Sets the offset of the pixmap's hotspot to (<em>x</em>, <em>y</em>).
|
|
<p> <b>Warning:</b> Do not call this function if any TQCanvasSprites are
|
|
currently showing this pixmap.
|
|
|
|
<!-- eof -->
|
|
<hr><p>
|
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
|
Copyright © 1995-2007
|
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
|
<table width=100% cellspacing=0 border=0><tr>
|
|
<td>Copyright © 2007
|
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
|
<td align=right><div align=right>TQt 3.3.8</div>
|
|
</table></div></address></body>
|
|
</html>
|