42 #include <QtGui/qprintengine.h> 58 #ifndef QT_NO_COMPRESS 62 #if defined(Q_OS_WINCE) 63 #include "qwinfunctions_wince.h" 67 #include "private/qdrawhelper_p.h" 87 :
QPdf::ByteStream(true)
93 *
this << w <<
"0 0 " << -h <<
"0 " << h <<
"cm /Im" <<
object <<
" Do\n";
104 #ifndef USE_NATIVE_GRADIENTS 130 d->stream->setDevice(
d->outDevice);
135 d->clipEnabled =
false;
136 d->allClipped =
false;
138 d->xrefPositions.clear();
142 d->graphicsState = 0;
143 d->patternColorSpace = 0;
146 d->imageCache.clear();
147 d->alphaCache.clear();
161 d->stream->unsetDevice();
178 QPixmap pm = sourceRect != pixmap.
rect() ? pixmap.
copy(sourceRect) : pixmap;
181 const int object =
d->addImage(image, &bitmap, pm.
cacheKey());
185 *
d->currentPage <<
"q\n/GSa gs\n";
188 rectangle.
x(), rectangle.
y()) * (
d->simplePen ?
QTransform() :
d->stroker.matrix));
191 d->brush =
d->pen.brush();
194 d->currentPage->streamImage(image.
width(), image.
height(), object);
195 *
d->currentPage <<
"Q\n";
207 QImage im = sourceRect != image.
rect() ? image.
copy(sourceRect) : image;
209 const int object =
d->addImage(im, &bitmap, im.
cacheKey());
213 *
d->currentPage <<
"q\n/GSa gs\n";
216 rectangle.
x(), rectangle.
y()) * (
d->simplePen ?
QTransform() :
d->stroker.matrix));
218 d->currentPage->streamImage(im.
width(), im.
height(), object);
219 *
d->currentPage <<
"Q\n";
226 bool bitmap = (pixmap.
depth() == 1);
231 bool hb =
d->hasBrush;
237 d->brush.setColor(
d->pen.color());
239 d->brushOrigin = -point;
240 *
d->currentPage <<
"q\n";
244 *
d->currentPage <<
"Q\n";
261 int gStateObject = 0;
262 int patternObject =
d->addBrushPattern(
d->stroker.matrix, &specifyColor, &gStateObject);
264 *
d->currentPage << (patternObject ?
"/PCSp cs " :
"/CSp cs ");
266 QColor rgba =
d->brush.color();
269 *
d->currentPage << gray << gray <<
gray;
271 *
d->currentPage << rgba.
redF()
277 *
d->currentPage <<
"/Pat" << patternObject;
278 *
d->currentPage <<
"scn\n";
281 *
d->currentPage <<
"/GState" << gStateObject <<
"gs\n";
283 *
d->currentPage <<
"/GSa gs\n";
317 #ifdef USE_NATIVE_GRADIENTS 318 int QPdfEnginePrivate::gradientBrush(
const QBrush &b,
const QMatrix &matrix,
int *gStateObject)
336 shader = QPdf::generateLinearGradientShader(lg, page_rect);
338 alphaShader = QPdf::generateLinearGradientShader(lg, page_rect,
true);
351 "/Shading " << shaderObject <<
"0 R\n" 358 << matrix.
dy() <<
"]\n";
370 for (
int i = 1; i < stops.
size(); ++i) {
384 c <<
"/Shader" << alphaShaderObject <<
"sh\n";
391 "/BBox [0 0 " << width_ << height_ <<
"]\n" 392 "/Group <</S /Transparency >>\n" 394 "/Shading << /Shader" << alphaShaderObject << alphaShaderObject <<
"0 R >>\n" 397 f <<
"/Length " << content.
length() <<
"\n" 407 xprintf(
"<< /SMask << /S /Alpha /G %d 0 R >> >>\n" 408 "endobj\n", softMaskFormObject);
419 if (brushAlpha == 255 && penAlpha == 255)
426 s <<
"<<\n/ca " << (brushAlpha/
qreal(255.)) <<
'\n';
427 s <<
"/CA " << (penAlpha/
qreal(255.)) <<
"\n>>";
443 *specifyColor =
true;
453 #ifdef USE_NATIVE_GRADIENTS 454 *specifyColor =
false;
455 return gradientBrush(b, matrix, gStateObject);
465 int imageObject = -1;
473 if (imageObject != -1) {
477 *specifyColor =
false;
484 s <<
"/Im" << imageObject <<
" Do\n";
493 "/PaintType " << paintType <<
"\n" 495 "/BBox [0 0 " << w << h <<
"]\n" 496 "/XStep " << w <<
"\n" 497 "/YStep " << h <<
"\n" 504 << matrix.
dy() <<
"]\n" 506 if (imageObject > 0) {
507 s <<
"/XObject << /Im" << imageObject <<
' ' << imageObject <<
"0 R >> ";
510 "/Length " << pattern.
length() <<
"\n" 552 int w = image.
width();
557 int bytesPerLine = (w + 7) >> 3;
559 data.
resize(bytesPerLine * h);
560 char *rawdata = data.
data();
561 for (
int y = 0; y < h; ++y) {
562 memcpy(rawdata, image.
scanLine(y), bytesPerLine);
563 rawdata += bytesPerLine;
570 bool hasAlpha =
false;
571 bool hasMask =
false;
581 softMaskData.
resize(w * h);
583 for (
int y = 0; y < h; ++y) {
585 for (
int x = 0; x < w; ++x) {
588 hasMask |= (alpha < 255);
589 hasAlpha |= (alpha != 0 && alpha != 255);
597 softMaskData.
resize(w * h);
599 for (
int y = 0; y < h; ++y) {
602 for (
int x = 0; x < w; ++x) {
603 *(data++) =
qGray(*rgb);
606 hasMask |= (alpha < 255);
607 hasAlpha |= (alpha != 0 && alpha != 255);
611 for (
int x = 0; x < w; ++x) {
612 *(data++) =
qRed(*rgb);
614 *(data++) =
qBlue(*rgb);
617 hasMask |= (alpha < 255);
618 hasAlpha |= (alpha != 0 && alpha != 255);
624 hasAlpha = hasMask =
false;
627 int softMaskObject = 0;
629 softMaskObject =
writeImage(softMaskData, w, h, 8, 0, 0);
630 }
else if (hasMask) {
633 int bytesPerLine = (w + 7) >> 3;
637 for (
int y = 0; y < h; ++y) {
638 for (
int x = 0; x < w; ++x) {
640 mdata[x>>3] |= (0x80 >> (x&7));
643 mdata += bytesPerLine;
648 maskObject, softMaskObject, dct);
661 size = fe->
tm.tmHeight;
670 trans =
QTransform(size*stretch, 0, 0, size, 0, 0);
677 qreal x1, y1, x2, y2;
678 trans.
map(0, 0, &x1, &y1);
683 x1s.
setNum(static_cast<double>(x1),
'f');
684 y1s.
setNum(static_cast<double>(y1),
'f');
685 x2s.
setNum(static_cast<double>(x2),
'f');
686 y2s.
setNum(static_cast<double>(y2),
'f');
687 QByteArray rectData = x1s +
' ' + y1s +
' ' + x2s +
' ' + y2s;
688 xprintf(
"<<\n/Type /Annot\n/Subtype /Link\n/Rect [");
690 #ifdef Q_DEBUG_PDF_LINKS 691 xprintf(
"]\n/Border [16 16 1]\n/A <<\n");
693 xprintf(
"]\n/Border [0 0 0]\n/A <<\n");
695 xprintf(
"/Type /Action\n/S /URI\n/URI (%s)\n",
743 const int msize = 10000;
748 int bufsize =
qvsnprintf(buf, msize, fmt, args);
760 #ifndef QT_NO_COMPRESS 765 zStruct.zalloc = Z_NULL;
766 zStruct.zfree = Z_NULL;
767 zStruct.opaque = Z_NULL;
768 if (::deflateInit(&zStruct, Z_DEFAULT_COMPRESSION) != Z_OK) {
769 qWarning(
"QPdfStream::writeCompressed: Error in deflateInit()");
772 zStruct.avail_in = 0;
775 while (!dev->
atEnd() || zStruct.avail_in != 0) {
776 if (zStruct.avail_in == 0) {
777 in = dev->
read(size);
778 zStruct.avail_in = in.
size();
779 zStruct.next_in =
reinterpret_cast<unsigned char*
>(in.
data());
780 if (in.
size() <= 0) {
781 qWarning(
"QPdfStream::writeCompressed: Error in read()");
782 ::deflateEnd(&zStruct);
786 zStruct.next_out =
reinterpret_cast<unsigned char*
>(out.
data());
787 zStruct.avail_out = out.
size();
788 if (::
deflate(&zStruct, 0) != Z_OK) {
789 qWarning(
"QPdfStream::writeCompressed: Error in deflate()");
790 ::deflateEnd(&zStruct);
793 int written = out.
size() - zStruct.avail_out;
800 zStruct.next_out =
reinterpret_cast<unsigned char*
>(out.
data());
801 zStruct.avail_out = out.
size();
803 if (ret != Z_OK && ret != Z_STREAM_END) {
804 qWarning(
"QPdfStream::writeCompressed: Error in deflate()");
805 ::deflateEnd(&zStruct);
808 int written = out.
size() - zStruct.avail_out;
812 }
while (ret == Z_OK);
814 ::deflateEnd(&zStruct);
822 while (!dev->
atEnd()) {
834 #ifndef QT_NO_COMPRESS 836 uLongf destLen = len + len/100 + 13;
837 Bytef* dest =
new Bytef[destLen];
838 if (Z_OK == ::compress(dest, &destLen, (
const Bytef*) src, (uLongf)len)) {
841 qWarning(
"QPdfStream::writeCompressed: Error in compress()");
856 int maskObject,
int softMaskObject,
bool dct)
863 "/Height %d\n", width, height);
869 xprintf(
"/BitsPerComponent 8\n" 870 "/ColorSpace %s\n", (depth == 32) ?
"/DeviceRGB" :
"/DeviceGray");
873 xprintf(
"/Mask %d 0 R\n", maskObject);
874 if (softMaskObject > 0)
875 xprintf(
"/SMask %d 0 R\n", softMaskObject);
878 xprintf(
"/Length %d 0 R\n", lenobj);
880 xprintf(
"/Interpolate true\n");
884 xprintf(
"/Filter /DCTDecode\n>>\nstream\n");
889 xprintf(
"/Filter /FlateDecode\n>>\nstream\n");
934 xprintf(
"[/Pattern /DeviceRGB]\n" 950 xprintf(
"\n/CreationDate (D:%d%02d%02d%02d%02d%02d)\n",
970 for (
int i = 0; i < size; ++i)
977 xprintf(
"/ProcSet [/PDF /Text /ImageB /ImageC]\n" 991 fileName = fileName.
arg(i++);
1010 s <<
"<< /Type /FontDescriptor\n" 1012 int tag = fontDescriptor;
1013 for (
int i = 0; i < 5; ++i) {
1014 s << (char)(
'A' + (tag % 26));
1018 "/Flags " << 4 <<
"\n" 1029 "/FontFile2 " << fontstream <<
"0 R\n" 1040 "/Length1 " << fontData.
size() <<
"\n" 1041 "/Length " << length_object <<
"0 R\n";
1043 s <<
"/Filter /FlateDecode\n";
1058 s <<
"<< /Type /Font\n" 1059 "/Subtype /CIDFontType2\n" 1061 "/CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >>\n" 1062 "/FontDescriptor " << fontDescriptor <<
"0 R\n" 1063 "/CIDToGIDMap /Identity\n" 1073 "stream\n", touc.
length());
1082 s <<
"<< /Type /Font\n" 1085 "/Encoding /Identity-H\n" 1086 "/DescendantFonts [" << cidfont <<
"0 R]\n" 1087 "/ToUnicode " << toUnicode <<
"0 R" 1120 "/Contents %d 0 R\n" 1121 "/Resources %d 0 R\n" 1123 "/MediaBox [0 0 %d %d]\n" 1126 pageRoot, pageStream, resources, annots,
1135 "/CSpg /DeviceGray\n" 1173 "/Length %d 0 R\n", pageStreamLength);
1175 xprintf(
"/Filter /FlateDecode\n");
1232 const ushort *utf16 =
string.utf16();
1234 for (
int i=0; i <
string.size(); ++i) {
1235 char part[2] = {char((*(utf16 + i)) >> 8), char((*(utf16 + i)) & 0xff)};
1236 for(
int j=0; j < 2; ++j) {
1237 if (part[j] ==
'(' || part[j] ==
')' || part[j] ==
'\\')
1248 #endif // QT_NO_PRINTER
The QColor class provides colors based on RGB, HSV or CMYK values.
QImage toImage() const
Converts the pixmap to a QImage.
Format
The following image formats are available in Qt.
qreal y() const
Returns the y-coordinate of the rectangle's top edge.
QVector< uint > graphicStates
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
QByteArray createToUnicodeMap() const
#define QT_END_NAMESPACE
This macro expands to.
const QColor & color() const
Returns the brush color.
void clear()
Removes all items from the hash.
char * data()
Returns a pointer to the data stored in the byte array.
static int deflate(Bytef *dest, ulong *destLen, const Bytef *source, ulong sourceLen)
qreal greenF() const
Returns the green color component of this color.
int writeCompressed(const char *src, int len)
const QGradient * gradient() const
Returns the gradient describing this brush.
The QMatrix class specifies 2D transformations of a coordinate system.
QByteArray generateMatrix(const QTransform &matrix)
#define it(className, varName)
QPrinter::Orientation orientation
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb)
bool open(OpenMode flags)
Opens the file using OpenMode mode, returning true if successful; otherwise false.
QByteArray & append(char c)
Appends the character ch to this byte array.
QByteArray toTruetype() const
PrinterMode
This enum describes the mode the printer should work in.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
qreal dx() const
Returns the horizontal translation factor.
The QByteArray class provides an array of bytes.
The QPointF class defines a point in the plane using floating point precision.
int month() const
Returns the number corresponding to the month of this date, using the following convention: ...
virtual int synthesized() const
QHash< QPair< uint, uint >, uint > alphaCache
void embedFont(QFontSubset *font)
int left() const
Returns the x-coordinate of the rectangle's left edge.
QColor color() const
Returns the color of this pen's brush.
void setQuality(int quality)
This is an image format specific function that sets the quality level of the image to quality...
QPdfEngine(QPrinter::PrinterMode m)
int day() const
Returns the day of the month (1 to 31) of this date.
The QDate class provides date functions.
long ASN1_INTEGER_get ASN1_INTEGER * a
QString anchorHref() const
Returns the text format's hypertext link, or an empty string if none has been set.
int addImage(const QImage &image, bool *bitmap, qint64 serial_no)
Adds an image to the pdf and return the pdf-object id.
int depth() const
Returns the depth of the pixmap.
The QBuffer class provides a QIODevice interface for a QByteArray.
qreal m12() const
Returns the vertical shearing factor.
QByteArray widthArray() const
The QString class provides a Unicode character string.
QRect rect() const
Returns the enclosing rectangle (0, 0, width(), height()) of the image.
QVector< int > xrefPositions
bool empty() const
This function is provided for STL compatibility.
void printString(const QString &string)
virtual bool atEnd() const
Returns true if the current read and write position is at the end of the device (i.e.
virtual Type type() const =0
Format format() const
Returns the format of the image.
const T value(const Key &key) const
Returns the value associated with the key.
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
qreal x() const
Returns the x-coordinate of this point.
void resize(int size)
Sets the size of the vector to size.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Type type() const
Reimplement this function to return the paint engine Type.
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
void drawRects(const QRectF *rects, int rectCount)
Draws the first rectCount rectangles in the buffer rects.
qreal m11() const
Returns the horizontal scaling factor.
QGradientStops stops() const
Returns the stop points for this gradient.
bool newPage()
Instructs the print engine to start a new page.
int addXrefEntry(int object, bool printostr=true)
int width() const
Returns the width.
qreal m21() const
Returns the horizontal shearing factor.
void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
Reimplement this function to draw the part of the image specified by the sr rectangle in the given re...
The QTime class provides clock time functions.
bool begin(QPaintDevice *pdev)
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool isActive() const
Returns true if the paint engine is actively drawing; otherwise returns false.
The QRectF class defines a rectangle in the plane using floating point precision. ...
QPrinter::PageOrder pageOrder
int addBrushPattern(const QTransform &matrix, bool *specifyColor, int *gStateObject)
void write(const QByteArray &data)
bool end()
Reimplement this function to finish painting on the current paint device.
void drawTiledPixmap(const QRectF &rectangle, const QPixmap &pixmap, const QPointF &point)
Reimplement this function to draw the pixmap in the given rect, starting at the given p...
bool isAnchor() const
Returns true if the text is formatted as an anchor; otherwise returns false.
The QImageWriter class provides a format independent interface for writing images to files or other d...
void setActive(bool newState)
Sets the active state of the paint engine to state.
qreal height() const
Returns the height of the rectangle.
void append(const T &t)
Inserts value at the end of the vector.
static const bool interpolateImages
Q_CORE_EXPORT void qWarning(const char *,...)
int second() const
Returns the second part (0 to 59) of the time.
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
#define QT_VERSION_STR
This macro expands to a string that specifies Qt's version number (for example, "4.
qreal width() const
Returns the width of the rectangle.
Q_CORE_EXPORT int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap)
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
int depth() const
Returns the depth of the image.
int minute() const
Returns the minute part (0 to 59) of the time.
Qt::BrushStyle style() const
Returns the brush style.
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the vector, searching forward from ind...
QPixmap texture() const
Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set...
bool isOpaque() const
Returns true if the brush is fully opaque otherwise false.
int writeImage(const QByteArray &data, int width, int height, int depth, int maskObject, int softMaskObject, bool dct=false)
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
static const bool do_compress
QRect toRect() const
Returns a QRect based on the values of this rectangle.
QHash< QFontEngine::FaceId, QFontSubset * > fonts
const T & at(int i) const
Returns the item at index position i in the vector.
QDateTime toUTC() const
Returns a datetime containing the date and time information in this datetime, but specified using the...
void drawPixmap(const QRectF &rectangle, const QPixmap &pixmap, const QRectF &sr)
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r...
QPrinter::ColorMode colorMode
QByteArray postscriptName
QPdfEnginePrivate(QPrinter::PrinterMode m)
static QString toUnicode(QTextCodec *tc, const char *str)
int length() const
Same as size().
const char * constData() const
Returns a pointer to the data stored in the byte array.
QDate date() const
Returns the date part of the datetime.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)
QHash< qint64, uint > imageCache
int top() const
Returns the y-coordinate of the rectangle's top edge.
int width() const
Returns the width of the image.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
virtual void drawTextItem(const QPointF &p, const QTextItemInt &ti)
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
void drawTextItem(const QPointF &p, const QTextItemInt &ti)
bool newPage()
Instructs the print engine to start a new page.
The QDateTime class provides date and time functions.
The QFile class provides an interface for reading from and writing to files.
virtual Properties properties() const
bool end()
Reimplement this function to finish painting on the current paint device.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the hash...
Type type() const
Returns the type of gradient.
ushort alpha
Returns the alpha color component of this color.
The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush...
The QGradient class is used in combination with QBrush to specify gradient fills. ...
qreal x() const
Returns the x-coordinate of the rectangle's left edge.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
qreal redF() const
Returns the red color component of this color.
qreal dy() const
Returns the vertical translation factor.
QVector< uint > annotations
T & last()
Returns a reference to the last item in the vector.
QByteArray patternForBrush(const QBrush &b)
void resize(int size)
Sets the size of the byte array to size bytes.
QByteArray & setNum(short, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
int addConstantAlphaObject(int brushAlpha, int penAlpha=255)
int height() const
Returns the height.
qreal blueF() const
Returns the blue color component of this color.
The QRect class defines a rectangle in the plane using integer precision.
static QDateTime currentDateTime()
Returns the current datetime, as reported by the system clock, in the local time zone.
iterator begin()
Returns an STL-style iterator pointing to the first item in the hash.
int height() const
Returns the height of the image.
qint64 cacheKey() const
Returns a number that identifies this QPixmap.
int size() const
Returns the number of bytes in this byte array.
bool contains(const T &t) const
Returns true if the vector contains an occurrence of value; otherwise returns false.
static const QCssKnownValue properties[NumProperties - 1]
QRect rect() const
Returns the pixmap's enclosing rectangle.
qreal y() const
Returns the y-coordinate of this point.
The QPixmap class is an off-screen image representation that can be used as a paint device...
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
qint64 qt_pixmap_id(const QPixmap &pixmap)
int year() const
Returns the year of this date.
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
The QSize class defines the size of a two-dimensional object using integer point precision.
QTransform pageMatrix() const
QTime time() const
Returns the time part of the datetime.
The QDataStream class provides serialization of binary data to a QIODevice.
QRgb rgba() const
Returns the RGB value of the color, including its alpha.
static QList< QByteArray > supportedImageFormats()
Returns the list of image formats supported by QImageWriter.
void streamImage(int w, int h, int object)
QPrinter::PrinterState state
bool isEmpty() const
Returns true if either of the width and height is less than or equal to 0; otherwise returns false...
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
QPixmap copy(int x, int y, int width, int height) const
Returns a deep copy of the subset of the pixmap that is specified by the rectangle QRect( x...
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
const QTextCharFormat charFormat
The QIODevice class is the base interface class of all I/O devices in Qt.
virtual void close()
Calls QFile::flush() and closes the file.
bool write(const QImage &image)
Writes the image image to the assigned device or file name.
QPaintEngine::PaintEngineFeatures qt_pdf_decide_features()
static QString fileName(const QString &fileUrl)
int size() const
Returns the number of items in the vector.
QVector< QRgb > colorTable() const
Returns a list of the colors contained in the image's color table, or an empty list if the image does...
int writeRawData(const char *, int len)
Writes len bytes from s to the stream.
void xprintf(const char *fmt,...)
qint64 qt_image_id(const QImage &image)
Q_DECL_CONSTEXPR int qRound(qreal d)
qint64 cacheKey() const
Returns a number that identifies the contents of this QImage object.
qreal m22() const
Returns the vertical scaling factor.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
QMatrix inverted(bool *invertible=0) const
Returns an inverted copy of this matrix.
int hour() const
Returns the hour part (0 to 23) of the time.
bool begin(QPaintDevice *pdev)
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...