The QPicture class is a paint device that records and replays QPainter commands.
.PP
A picture serializes painter commands to an IO device in a platform-independent format. For example, a picture created under Windows can be read on a Sun SPARC.
Qt pictures use a proprietary binary format. Unlike native picture (meta-file) formats on many window systems, TQt pictures have no limitations regarding their contents. Everything that can be painted can also be stored in a picture, e.g. fonts, pixmaps, regions, transformed graphics, etc.
Pictures can also be drawn using play(). Some basic data about a picture is available, for example, size(), isNull() and boundingRect().
.PP
See also Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPicture::QPicture ( int formatVersion = -1 )"
Constructs an empty picture.
.PP
The \fIformatVersion\fR parameter may be used to \fIcreate\fR a QPicture that can be read by applications that are compiled with earlier versions of Qt.
Note that the default formatVersion is -1 which signifies the current release, i.e. for TQt 3.1 a formatVersion of 5 is the same as the default formatVersion of -1.
Returns a pointer to the picture data. The pointer is only valid until the next non-const function is called on this picture. The returned pointer is 0 if the picture contains no data.
.PP
See also size() and isNull().
.SH "void QPicture::detach ()\fC [protected]\fR"
Detaches from shared picture data and makes sure that this picture is the only one referring to the data.
.PP
If multiple pictures share common data, this picture makes a copy of the data and detaches itself from the sharing mechanism. Nothing is done if there is just a single reference.
.SH "bool QPicture::isNull () const"
Returns TRUE if the picture contains no data; otherwise returns FALSE.
Loads a picture from the file specified by \fIfileName\fR and returns TRUE if successful; otherwise returns FALSE.
.PP
By default, the file will be interpreted as being in the native QPicture format. Specifying the \fIformat\fR string is optional and is only needed for importing picture data stored in a different format.
Saves a picture to the file specified by \fIfileName\fR and returns TRUE if successful; otherwise returns FALSE.
.PP
Specifying the file \fIformat\fR string is optional. It's not recommended unless you intend to export the picture data for use by a third party reader. By default the data will be saved in the native QPicture file format.