<class name="QPicture" doc="/**
&lt;p&gt;The &lt;a href=&quot;QPicture.html#QPicture(com.trolltech.qt.gui.QPicture)&quot;&gt;&lt;tt&gt;QPicture&lt;/tt&gt;&lt;/a&gt; class is a paint device that records and replays &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt; commands.&lt;/p&gt;
&lt;p&gt;A picture serializes painter commands to an IO device in a platform-independent format. They are sometimes referred to as meta-files.&lt;/p&gt;
&lt;p&gt;Qt pictures use a proprietary binary format. Unlike native picture (meta-file) formats on many window systems, Qt pictures have no limitations regarding their contents. Everything that can be painted on a widget or pixmap (e.g&amp;#x2e;, fonts, pixmaps, regions, transformed graphics, etc.) can also be stored in a picture.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QPicture.html#QPicture(com.trolltech.qt.gui.QPicture)&quot;&gt;&lt;tt&gt;QPicture&lt;/tt&gt;&lt;/a&gt; is resolution independent, i.e&amp;#x2e; a &lt;a href=&quot;QPicture.html#QPicture(com.trolltech.qt.gui.QPicture)&quot;&gt;&lt;tt&gt;QPicture&lt;/tt&gt;&lt;/a&gt; can be displayed on different devices (for example svg, pdf, ps, printer and screen) looking the same. This is, for instance, needed for WYSIWYG print preview. &lt;a href=&quot;QPicture.html#QPicture(com.trolltech.qt.gui.QPicture)&quot;&gt;&lt;tt&gt;QPicture&lt;/tt&gt;&lt;/a&gt; runs in the default system dpi, and scales the painter to match differences in resolution depending on the window system.&lt;/p&gt;
&lt;p&gt;Example of how to record a picture:&lt;/p&gt;
&lt;pre&gt;            QPicture picture;
            QPainter painter;
            painter.begin(&amp;amp;picture);           &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; paint in picture
            painter.drawEllipse(10,20, 80,70); &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; draw an ellipse
            painter.end();                     &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; painting done
            picture.save(&amp;quot;drawing.pic&amp;quot;);       &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; save picture&lt;/pre&gt;
&lt;p&gt;Note that the list of painter commands is reset on each call to the QPainter::begin() function.&lt;/p&gt;
&lt;p&gt;Example of how to replay a picture:&lt;/p&gt;
&lt;pre&gt;            QPicture picture;
            picture.load(&amp;quot;drawing.pic&amp;quot;);           &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; load picture
            QPainter painter;
            painter.begin(&amp;amp;myWidget);              &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; paint in myWidget
            painter.drawPicture(0, 0, picture);    &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; draw the picture at (0,0)
            painter.end();                         &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; painting done&lt;/pre&gt;
&lt;p&gt;Pictures can also be drawn using &lt;a href=&quot;QPicture.html#play(com.trolltech.qt.gui.QPainter)&quot;&gt;&lt;tt&gt;play&lt;/tt&gt;&lt;/a&gt;. Some basic data about a picture is available, for example, &lt;a href=&quot;QPicture.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QPicture.html#isNull()&quot;&gt;&lt;tt&gt;isNull&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QPicture.html#boundingRect()&quot;&gt;&lt;tt&gt;boundingRect&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMovie.html&quot;&gt;&lt;tt&gt;QMovie&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QPicture(int formatVersion)" doc="/**
&lt;p&gt;Constructs an empty picture.&lt;/p&gt;
&lt;p&gt;The &lt;tt&gt;formatVersion&lt;/tt&gt; parameter may be used to &lt;i&gt;create&lt;/i&gt; a &lt;a href=&quot;QPicture.html#QPicture(com.trolltech.qt.gui.QPicture)&quot;&gt;&lt;tt&gt;QPicture&lt;/tt&gt;&lt;/a&gt; that can be read by applications that are compiled with earlier versions of Qt.&lt;/p&gt;
&lt;p&gt;Note that the default formatVersion is -1 which signifies the current release, i.e&amp;#x2e; for Qt 4.0 a formatVersion of 7 is the same as the default formatVersion of -1.&lt;/p&gt;
&lt;p&gt;Reading pictures generated by earlier versions of Qt is not supported in Qt 4.0&amp;#x2e;&lt;/p&gt;
 */"/>
    <method name="public QPicture()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QPicture.html#QPicture(com.trolltech.qt.gui.QPicture)&quot;&gt;&lt;tt&gt;QPicture&lt;/tt&gt;&lt;/a&gt;(-1). */"/>
    <method name="public QPicture(com.trolltech.qt.gui.QPicture arg__1)" doc="/**
&lt;p&gt;Constructs a copy of &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This constructor is fast thanks to implicit sharing&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QRect boundingRect()" doc="/**
&lt;p&gt;Returns the picture's bounding rectangle or an invalid rectangle if the picture contains no data.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#setBoundingRect(com.trolltech.qt.core.QRect)&quot;&gt;&lt;tt&gt;setBoundingRect&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int depth()" doc="/**
&lt;p&gt;Returns the bit depth (number of bit planes) of the paint device.&lt;/p&gt;
 */"/>
    <method name="public final int height()" doc="/**
&lt;p&gt;Returns the height of the paint device in default coordinate system units (e.g&amp;#x2e; pixels for &lt;a href=&quot;QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#heightMM()&quot;&gt;&lt;tt&gt;heightMM&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int heightMM()" doc="/**
&lt;p&gt;Returns the height of the paint device in millimeters.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#height()&quot;&gt;&lt;tt&gt;height&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isNull()" doc="/**
&lt;p&gt;Returns true if the picture contains no data; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final int logicalDpiX()" doc="/**
&lt;p&gt;Returns the horizontal resolution of the device in dots per inch, which is used when computing font sizes. For X11, this is usually the same as could be computed from &lt;a href=&quot;QPicture.html#widthMM()&quot;&gt;&lt;tt&gt;widthMM&lt;/tt&gt;&lt;/a&gt;, but it varies on Windows.&lt;/p&gt;
&lt;p&gt;Note that if the &lt;a href=&quot;QPicture.html#logicalDpiX()&quot;&gt;&lt;tt&gt;logicalDpiX&lt;/tt&gt;&lt;/a&gt; doesn't equal the &lt;a href=&quot;QPicture.html#physicalDpiX()&quot;&gt;&lt;tt&gt;physicalDpiX&lt;/tt&gt;&lt;/a&gt;, the corresponding &lt;a href=&quot;QPaintEngine.html&quot;&gt;&lt;tt&gt;QPaintEngine&lt;/tt&gt;&lt;/a&gt; must handle the resolution mapping.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#logicalDpiY()&quot;&gt;&lt;tt&gt;logicalDpiY&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPicture.html#physicalDpiX()&quot;&gt;&lt;tt&gt;physicalDpiX&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int logicalDpiY()" doc="/**
&lt;p&gt;Returns the vertical resolution of the device in dots per inch, which is used when computing font sizes. For X11, this is usually the same as could be computed from &lt;a href=&quot;QPicture.html#heightMM()&quot;&gt;&lt;tt&gt;heightMM&lt;/tt&gt;&lt;/a&gt;, but it varies on Windows.&lt;/p&gt;
&lt;p&gt;Note that if the &lt;a href=&quot;QPicture.html#logicalDpiY()&quot;&gt;&lt;tt&gt;logicalDpiY&lt;/tt&gt;&lt;/a&gt; doesn't equal the &lt;a href=&quot;QPicture.html#physicalDpiY()&quot;&gt;&lt;tt&gt;physicalDpiY&lt;/tt&gt;&lt;/a&gt;, the corresponding &lt;a href=&quot;QPaintEngine.html&quot;&gt;&lt;tt&gt;QPaintEngine&lt;/tt&gt;&lt;/a&gt; must handle the resolution mapping.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#logicalDpiX()&quot;&gt;&lt;tt&gt;logicalDpiX&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPicture.html#physicalDpiY()&quot;&gt;&lt;tt&gt;physicalDpiY&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int numColors()" doc="/**
&lt;p&gt;Returns the number of different colors available for the paint device. Since this value is an int, it will not be sufficient to represent the number of colors on 32 bit displays, in this case INT_MAX is returned instead.&lt;/p&gt;
 */"/>
    <method name="public final void writeTo(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final void readFrom(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final boolean paintingActive()" doc="/**
&lt;p&gt;Returns true if the device is currently being painted on, i.e&amp;#x2e; someone has called QPainter::begin() but not yet called QPainter::end() for this device; otherwise returns false.&lt;/p&gt;

@see &lt;tt&gt;QPainter::isActive&lt;/tt&gt; */"/>
    <method name="public final int physicalDpiX()" doc="/**
&lt;p&gt;Returns the horizontal resolution of the device in dots per inch.&lt;/p&gt;
&lt;p&gt;Note that if the &lt;a href=&quot;QPicture.html#physicalDpiX()&quot;&gt;&lt;tt&gt;physicalDpiX&lt;/tt&gt;&lt;/a&gt; doesn't equal the &lt;a href=&quot;QPicture.html#logicalDpiX()&quot;&gt;&lt;tt&gt;logicalDpiX&lt;/tt&gt;&lt;/a&gt;, the corresponding &lt;a href=&quot;QPaintEngine.html&quot;&gt;&lt;tt&gt;QPaintEngine&lt;/tt&gt;&lt;/a&gt; must handle the resolution mapping.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#physicalDpiY()&quot;&gt;&lt;tt&gt;physicalDpiY&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPicture.html#logicalDpiX()&quot;&gt;&lt;tt&gt;logicalDpiX&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int physicalDpiY()" doc="/**
&lt;p&gt;Returns the horizontal resolution of the device in dots per inch.&lt;/p&gt;
&lt;p&gt;Note that if the &lt;a href=&quot;QPicture.html#physicalDpiY()&quot;&gt;&lt;tt&gt;physicalDpiY&lt;/tt&gt;&lt;/a&gt; doesn't equal the &lt;a href=&quot;QPicture.html#logicalDpiY()&quot;&gt;&lt;tt&gt;logicalDpiY&lt;/tt&gt;&lt;/a&gt;, the corresponding &lt;a href=&quot;QPaintEngine.html&quot;&gt;&lt;tt&gt;QPaintEngine&lt;/tt&gt;&lt;/a&gt; must handle the resolution mapping.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#physicalDpiX()&quot;&gt;&lt;tt&gt;physicalDpiX&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPicture.html#logicalDpiY()&quot;&gt;&lt;tt&gt;logicalDpiY&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean play(com.trolltech.qt.gui.QPainter p)" doc="/**
&lt;p&gt;Replays the picture using &lt;tt&gt;p&lt;/tt&gt;, and returns true if successful; otherwise returns false.&lt;/p&gt;
&lt;p&gt;This function does exactly the same as QPainter::drawPicture() with (x, y) = (0, 0).&lt;/p&gt;
 */"/>
    <method name="public final void setBoundingRect(com.trolltech.qt.core.QRect r)" doc="/**
&lt;p&gt;Sets the picture's bounding rectangle to &lt;tt&gt;r&lt;/tt&gt;. The automatically calculated value is overridden.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#boundingRect()&quot;&gt;&lt;tt&gt;boundingRect&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int size()" doc="/**
&lt;p&gt;Returns the size of the picture data.&lt;/p&gt;

@see &lt;tt&gt;data&lt;/tt&gt; */"/>
    <method name="public final int width()" doc="/**
&lt;p&gt;Returns the width of the paint device in default coordinate system units (e.g&amp;#x2e; pixels for &lt;a href=&quot;QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#widthMM()&quot;&gt;&lt;tt&gt;widthMM&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int widthMM()" doc="/**
&lt;p&gt;Returns the width of the paint device in millimeters.&lt;/p&gt;

@see &lt;a href=&quot;QPicture.html#width()&quot;&gt;&lt;tt&gt;width&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public int devType()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public int metric(com.trolltech.qt.gui.QPaintDevice.PaintDeviceMetric m)" doc="/**
&lt;p&gt;Internal implementation of the virtual QPaintDevice::metric() function.&lt;/p&gt;
&lt;p&gt;A picture has the following hard-coded values: numcolors=16777216 and depth=24.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;m&lt;/tt&gt; is the metric to get.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.gui.QPaintEngine paintEngine()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public void setData(byte[] data)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QPicture.html#setData(byte[])&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;data&lt;/tt&gt;, ). */"/>
</class>
