Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4367

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- paintsystem.qdoc -->
  <title>Qt 4.8: Paint System</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li>Paint System</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#topics">Topics</a></li>
<li class="level1"><a href="#classes-for-painting">Classes for Painting</a></li>
</ul>
</div>
<h1 class="title">Paint System</h1>
<span class="subtitle"></span>
<!-- $$$paintsystem.html-description -->
<div class="descr"> <a name="details"></a>
<p>Qt's paint system enables painting on screen and print devices using the same API, and is primarily based on the <a href="qpainter.html">QPainter</a>, <a href="qpaintdevice.html">QPaintDevice</a>, and <a href="qpaintengine.html">QPaintEngine</a> classes.</p>
<p><a href="qpainter.html">QPainter</a> is used to perform drawing operations, <a href="qpaintdevice.html">QPaintDevice</a> is an abstraction of a two-dimensional space that can be painted on using a <a href="qpainter.html">QPainter</a>, and <a href="qpaintengine.html">QPaintEngine</a> provides the interface that the painter uses to draw onto different types of devices. The <a href="qpaintengine.html">QPaintEngine</a> class is used internally by <a href="qpainter.html">QPainter</a> and <a href="qpaintdevice.html">QPaintDevice</a>, and is hidden from application programmers unless they create their own device type.</p>
<p class="centerAlign"><img src="images/paintsystem-core.png" alt="" /></p><p>The main benefit of this approach is that all painting follows the same painting pipeline making it easy to add support for new features and providing default implementations for unsupported ones.</p>
<a name="topics"></a>
<h2>Topics</h2>
<ul>
<li><a href="#classes-for-painting">Classes for Painting</a></li>
<li><a href="paintsystem-devices.html">Paint Devices and Backends</a></li>
<li><a href="paintsystem-drawing.html">Drawing and Filling</a></li>
<li><a href="coordsys.html">Coordinate System</a></li>
<li><a href="paintsystem-images.html">Reading and Writing Image Files</a></li>
<li><a href="paintsystem-styling.html">Styling</a></li>
<li><a href="printing.html">Printing with Qt</a></li>
</ul>
<a name="classes-for-painting"></a>
<h2>Classes for Painting</h2>
<p>These classes provide support for painting onto a paint device.</p>
<table class="annotated">
<tr class="odd topAlign"><td class="tblName"><p><a href="qbitmap.html">QBitmap</a></p></td><td class="tblDescr"><p>Monochrome (1-bit depth) pixmaps</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qbrush.html">QBrush</a></p></td><td class="tblDescr"><p>Defines the fill pattern of shapes drawn by QPainter</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qcolor.html">QColor</a></p></td><td class="tblDescr"><p>Colors based on RGB, HSV or CMYK values</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qcolormap.html">QColormap</a></p></td><td class="tblDescr"><p>Maps device independent QColors to device dependent pixel values</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qconicalgradient.html">QConicalGradient</a></p></td><td class="tblDescr"><p>Used in combination with QBrush to specify a conical gradient brush</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qdirectpainter.html">QDirectPainter</a></p></td><td class="tblDescr"><p>Direct access to the underlying hardware in Qt for Embedded Linux</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qfont.html">QFont</a></p></td><td class="tblDescr"><p>Specifies a font used for drawing text</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qfontmetrics.html">QFontMetrics</a></p></td><td class="tblDescr"><p>Font metrics information</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qfontmetricsf.html">QFontMetricsF</a></p></td><td class="tblDescr"><p>Font metrics information</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qgenericmatrix.html">QGenericMatrix</a></p></td><td class="tblDescr"><p>Template class that represents a NxM transformation matrix with N columns and M rows</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qgradient.html">QGradient</a></p></td><td class="tblDescr"><p>Used in combination with QBrush to specify gradient fills</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qicon.html">QIcon</a></p></td><td class="tblDescr"><p>Scalable icons in different modes and states</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qiconengine.html">QIconEngine</a></p></td><td class="tblDescr"><p>Abstract base class for QIcon renderers</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qiconenginev2.html">QIconEngineV2</a></p></td><td class="tblDescr"><p>Abstract base class for QIcon renderers</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qimage.html">QImage</a></p></td><td class="tblDescr"><p>Hardware-independent image representation that allows direct access to the pixel data, and can be used as a paint device</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qimagereader.html">QImageReader</a></p></td><td class="tblDescr"><p>Format independent interface for reading images from files or other devices</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qimagewriter.html">QImageWriter</a></p></td><td class="tblDescr"><p>Format independent interface for writing images to files or other devices</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qline.html">QLine</a></p></td><td class="tblDescr"><p>Two-dimensional vector using integer precision</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qlinef.html">QLineF</a></p></td><td class="tblDescr"><p>Two-dimensional vector using floating point precision</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qlineargradient.html">QLinearGradient</a></p></td><td class="tblDescr"><p>Used in combination with QBrush to specify a linear gradient brush</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qmargins.html">QMargins</a></p></td><td class="tblDescr"><p>Defines the four margins of a rectangle</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qmovie.html">QMovie</a></p></td><td class="tblDescr"><p>Convenience class for playing movies with QImageReader</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qpaintdevice.html">QPaintDevice</a></p></td><td class="tblDescr"><p>The base class of objects that can be painted</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qpaintengine.html">QPaintEngine</a></p></td><td class="tblDescr"><p>Abstract definition of how QPainter draws to a given device on a given platform</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qpainter.html">QPainter</a></p></td><td class="tblDescr"><p>Performs low-level painting on widgets and other paint devices</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qpainterpath.html">QPainterPath</a></p></td><td class="tblDescr"><p>Container for painting operations, enabling graphical shapes to be constructed and reused</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qpainterpathstroker.html">QPainterPathStroker</a></p></td><td class="tblDescr"><p>Used to generate fillable outlines for a given painter path</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qpalette.html">QPalette</a></p></td><td class="tblDescr"><p>Contains color groups for each widget state</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qpen.html">QPen</a></p></td><td class="tblDescr"><p>Defines how a QPainter should draw lines and outlines of shapes</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qpicture.html">QPicture</a></p></td><td class="tblDescr"><p>Paint device that records and replays QPainter commands</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qpixmap.html">QPixmap</a></p></td><td class="tblDescr"><p>Off-screen image representation that can be used as a paint device</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qpixmapcache.html">QPixmapCache</a></p></td><td class="tblDescr"><p>Application-wide cache for pixmaps</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qplatformfontdatabase.html">QPlatformFontDatabase</a></p></td><td class="tblDescr"><p>Makes it possible to customize how fonts are discovered and how they are rendered</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qplatformwindowformat.html">QPlatformWindowFormat</a></p></td><td class="tblDescr"><p>Specifies the display format of an OpenGL rendering context and if possible attributes of the corresponding QPlatformWindow</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qpoint.html">QPoint</a></p></td><td class="tblDescr"><p>Defines a point in the plane using integer precision</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qpointf.html">QPointF</a></p></td><td class="tblDescr"><p>Defines a point in the plane using floating point precision</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qpolygon.html">QPolygon</a></p></td><td class="tblDescr"><p>Vector of points using integer precision</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qpolygonf.html">QPolygonF</a></p></td><td class="tblDescr"><p>Vector of points using floating point precision</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qradialgradient.html">QRadialGradient</a></p></td><td class="tblDescr"><p>Used in combination with QBrush to specify a radial gradient brush</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qrect.html">QRect</a></p></td><td class="tblDescr"><p>Defines a rectangle in the plane using integer precision</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qrectf.html">QRectF</a></p></td><td class="tblDescr"><p>Defines a rectangle in the plane using floating point precision</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qregion.html">QRegion</a></p></td><td class="tblDescr"><p>Specifies a clip region for a painter</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qsize.html">QSize</a></p></td><td class="tblDescr"><p>Defines the size of a two-dimensional object using integer point precision</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qsizef.html">QSizeF</a></p></td><td class="tblDescr"><p>Defines the size of a two-dimensional object using floating point precision</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qstylepainter.html">QStylePainter</a></p></td><td class="tblDescr"><p>Convenience class for drawing QStyle elements inside a widget</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qsupportedwritingsystems.html">QSupportedWritingSystems</a></p></td><td class="tblDescr"><p>Used when registering fonts with the internal Qt fontdatabase</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qsvggenerator.html">QSvgGenerator</a></p></td><td class="tblDescr"><p>Paint device that is used to create SVG drawings</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qsvgrenderer.html">QSvgRenderer</a></p></td><td class="tblDescr"><p>Used to draw the contents of SVG files onto paint devices</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qsvgwidget.html">QSvgWidget</a></p></td><td class="tblDescr"><p>Widget that is used to display the contents of Scalable Vector Graphics (SVG) files</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qsymbiangraphicssystemhelper.html">QSymbianGraphicsSystemHelper</a></p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qtransform.html">QTransform</a></p></td><td class="tblDescr"><p>Specifies 2D transformations of a coordinate system</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qvector2d.html">QVector2D</a></p></td><td class="tblDescr"><p>Represents a vector or vertex in 2D space</p></td></tr>
</table>
<p>Alternatively, Qt provides the <a href="qtopengl.html">QtOpenGL</a> module, offering classes that makes it easy to use OpenGL in Qt applications. Among others, the module provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where the OpenGL API can be used to render the contents.</p>
</div>
<!-- @@@paintsystem.html -->
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>