source: trunk/src/gui/painting/qpaintengine.h@ 113

Last change on this file since 113 was 2, checked in by Dmitry A. Kuminov, 17 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 11.2 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the QtGui module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#ifndef QPAINTENGINE_H
43#define QPAINTENGINE_H
44
45#include <QtCore/qnamespace.h>
46#include <QtCore/qobjectdefs.h>
47#include <QtGui/qpainter.h>
48
49QT_BEGIN_HEADER
50
51QT_BEGIN_NAMESPACE
52
53QT_MODULE(Gui)
54
55class QFontEngine;
56class QLineF;
57class QPaintDevice;
58class QPaintEnginePrivate;
59class QPainterPath;
60class QPointF;
61class QPolygonF;
62class QRectF;
63struct QGlyphLayout;
64class QTextItemInt;
65class QPaintEngineState;
66
67class Q_GUI_EXPORT QTextItem {
68public:
69 enum RenderFlag {
70 RightToLeft = 0x1,
71 Overline = 0x10,
72 Underline = 0x20,
73 StrikeOut = 0x40,
74
75 Dummy = 0xffffffff
76 };
77 Q_DECLARE_FLAGS(RenderFlags, RenderFlag)
78 qreal descent() const;
79 qreal ascent() const;
80 qreal width() const;
81
82 RenderFlags renderFlags() const;
83 QString text() const;
84 QFont font() const;
85};
86Q_DECLARE_TYPEINFO(QTextItem, Q_PRIMITIVE_TYPE);
87
88
89class Q_GUI_EXPORT QPaintEngine
90{
91 Q_DECLARE_PRIVATE(QPaintEngine)
92public:
93 enum PaintEngineFeature {
94 PrimitiveTransform = 0x00000001, // Can transform primitives brushes
95 PatternTransform = 0x00000002, // Can transform pattern brushes
96 PixmapTransform = 0x00000004, // Can transform pixmaps
97 PatternBrush = 0x00000008, // Can fill with pixmaps and standard patterns
98 LinearGradientFill = 0x00000010, // Can fill gradient areas
99 RadialGradientFill = 0x00000020, // Can render radial gradients
100 ConicalGradientFill = 0x00000040, // Can render conical gradients
101 AlphaBlend = 0x00000080, // Can do source over alpha blend
102 PorterDuff = 0x00000100, // Can do general porter duff compositions
103 PainterPaths = 0x00000200, // Can fill, outline and clip paths
104 Antialiasing = 0x00000400, // Can antialias lines
105 BrushStroke = 0x00000800, // Can render brush based pens
106 ConstantOpacity = 0x00001000, // Can render at constant opacity
107 MaskedBrush = 0x00002000, // Can fill with textures that has an alpha channel or mask
108 PerspectiveTransform = 0x00004000, // Can do perspective transformations
109 BlendModes = 0x00008000, // Can do extended Porter&Duff composition