[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/canvas.doc:36 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>Canvas Module</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>Canvas Module</h1>
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | <p>
|
---|
| 37 | <p> The canvas module provides a highly optimized 2D graphic area called
|
---|
| 38 | <a href="qcanvas.html">QCanvas</a>. The canvas can contain an arbitrary number of <a href="qcanvasitem.html">QCanvasItems</a>. Canvas items can have an arbitrary
|
---|
| 39 | shape, size and content, can be freely moved around in the canvas,
|
---|
| 40 | and can be checked for collisions. Canvas items can be set to move
|
---|
| 41 | across the canvas automatically and animated canvas items are
|
---|
| 42 | supported with <a href="qcanvassprite.html">QCanvasSprite</a>. (If you require 3D graphics see Qt's
|
---|
| 43 | <a href="opengl.html">OpenGL module</a>.)
|
---|
| 44 | <p> The canvas module uses a document/view model. The <a href="qcanvasview.html">QCanvasView</a> class
|
---|
| 45 | is used to show a particular view of a canvas. Multiple views can operate
|
---|
| 46 | on the same canvas at the same time. Every view can use an arbitrary
|
---|
| 47 | <a href="qwmatrix.html#TransformationMode">transformation matrix</a> on the canvas which makes it easy to implement
|
---|
| 48 | features such as zooming.
|
---|
| 49 | <p> <center><a href="qcanvas.html">
|
---|
| 50 | <img src="qcanvas.png" alt="Screenshot of a canvas"></a></center>
|
---|
| 51 | <p> Qt provides a number of predefined <a href="qcanvas.html">QCanvas</a> items as listed below.
|
---|
| 52 | <p> <ul>
|
---|
| 53 | <li> <a href="qcanvasitem.html">QCanvasItem</a> -- An abstract base class for all canvas items.
|
---|
| 54 | <li> <a href="qcanvasellipse.html">QCanvasEllipse</a> -- An ellipse or "pie segment".
|
---|
| 55 | <li> <a href="qcanvasline.html">QCanvasLine</a> -- A line segment.
|
---|
| 56 | <li> <a href="qcanvaspolygon.html">QCanvasPolygon</a> -- A polygon.
|
---|
| 57 | <li> <a href="qcanvaspolygonalitem.html">QCanvasPolygonalItem</a> -- A base class for items that have a
|
---|
| 58 | non-rectangular shape. Most canvas items derive from this class.
|
---|
| 59 | <li> <a href="qcanvasrectangle.html">QCanvasRectangle</a> -- A rectangle. The rectangle cannot be tilted or
|
---|
| 60 | rotated. Rotated rectangles can be drawn using QCanvasPolygon.
|
---|
| 61 | <li> <a href="qcanvasspline.html">QCanvasSpline</a> -- A multi-bezier spline.
|
---|
| 62 | <li> <a href="qcanvassprite.html">QCanvasSprite</a> -- An animated pixmap.
|
---|
| 63 | <li> <a href="qcanvastext.html">QCanvasText</a> -- A text string.
|
---|
| 64 | </ul>
|
---|
| 65 | <p> The two classes <a href="qcanvaspixmap.html">QCanvasPixmap</a> and <a href="qcanvaspixmaparray.html">QCanvasPixmapArray</a> are used
|
---|
| 66 | by <a href="qcanvassprite.html">QCanvasSprite</a> to show animated and moving pixmaps on the
|
---|
| 67 | canvas.
|
---|
| 68 | <p> More specialized items can be created by inheriting from one of the
|
---|
| 69 | canvas item classes. It is easiest to inherit from one of
|
---|
| 70 | <a href="qcanvasitem.html">QCanvasItem</a>'s derived classes (usually <a href="qcanvaspolygonalitem.html">QCanvasPolygonalItem</a>) rather
|
---|
| 71 | than inherit QCanvasItem directly.
|
---|
| 72 | <p> See <tt>examples/canvas</tt> for an example that shows off some of <a href="qcanvas.html">QCanvas</a>'s
|
---|
| 73 | capabilities.
|
---|
| 74 | <p>
|
---|
| 75 | <!-- eof -->
|
---|
| 76 | <p><address><hr><div align=center>
|
---|
| 77 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 78 | <td>Copyright © 2007
|
---|
| 79 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 80 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 81 | </table></div></address></body>
|
---|
| 82 | </html>
|
---|