Qt 4.8
qdirectfbpaintdevice.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the plugins of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QDIRECTFBPAINTDEVICE_H
43 #define QDIRECTFBPAINTDEVICE_H
44 
45 #include <private/qpaintengine_raster_p.h>
46 #include "qdirectfbscreen.h"
47 
48 #ifndef QT_NO_QWS_DIRECTFB
49 
51 
53 
54 QT_MODULE(Gui)
55 
56 // Inherited by both window surface and pixmap
59 {
60 public:
62 
63  virtual IDirectFBSurface *directFBSurface() const;
64 
65  bool lockSurface(DFBSurfaceLockFlags lockFlags);
66  void unlockSurface();
67 
68  // Reimplemented from QCustomRasterPaintDevice:
69  void *memory() const;
70  QImage::Format format() const;
71  int bytesPerLine() const;
72  QSize size() const;
74  DFBSurfaceLockFlags lockFlags() const { return lockFlgs; }
75  QPaintEngine *paintEngine() const;
76 protected:
78  inline int dotsPerMeterX() const
79  {
80  return (screen->deviceWidth() * 1000) / screen->physicalWidth();
81  }
82  inline int dotsPerMeterY() const
83  {
84  return (screen->deviceHeight() * 1000) / screen->physicalHeight();
85  }
86 
87  IDirectFBSurface *dfbSurface;
88 #ifdef QT_DIRECTFB_SUBSURFACE
89  void releaseSubSurface();
90  IDirectFBSurface *subSurface;
91  friend class QDirectFBPaintEnginePrivate;
92  bool syncPending;
93 #endif
96  int bpl;
97  DFBSurfaceLockFlags lockFlgs;
101 };
102 
104 
106 
107 #endif // QT_NO_QWS_DIRECTFB
108 #endif //QDIRECTFBPAINTDEVICE_H
Format
The following image formats are available in Qt.
Definition: qimage.h:91
DFBSurfaceLockFlags lockFlgs
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
#define QT_MODULE(x)
Definition: qglobal.h:2783
The QCustomRasterPaintDevice class is provided to activate hardware accelerated paint engines in Qt f...
int physicalHeight() const
Returns the physical height of the screen in millimeters.
Definition: qscreen_qws.h:291
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
QDirectFBPaintDevice(QDirectFBScreen *scr)
QDirectFBScreen * screen
int deviceWidth() const
Returns the physical width of the framebuffer device in pixels.
Definition: qscreen_qws.h:233
QDirectFBPaintEngine * engine
void * memory() const
Returns a pointer to the paint device&#39;s memory buffer, or 0 if no such buffer exists.
DFBSurfaceLockFlags lockFlags() const
unsigned char uchar
Definition: qglobal.h:994
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QImage::Format format() const
Returns the format of the device&#39;s memory buffet.
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
int metric(QPaintDevice::PaintDeviceMetric metric) const
Reimplemented Function
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
Definition: qpaintengine.h:90
IDirectFBSurface * dfbSurface
int deviceHeight() const
Returns the full height of the framebuffer device in pixels.
Definition: qscreen_qws.h:234
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
virtual IDirectFBSurface * directFBSurface() const
bool lockSurface(DFBSurfaceLockFlags lockFlags)
int physicalWidth() const
Returns the physical width of the screen in millimeters.
Definition: qscreen_qws.h:290
#define QT_END_HEADER
Definition: qglobal.h:137
int bytesPerLine() const
Returns the number of bytes per line in the framebuffer.
QPaintEngine * paintEngine() const