Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdirectfbblitter.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QDIRECTFBBLITTER_H
5#define QDIRECTFBBLITTER_H
6
8
9#include <private/qblittable_p.h>
10
11#include <directfb.h>
12
14
16{
17public:
18 QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface);
19 QDirectFbBlitter(const QSize &size, bool alpha);
20 virtual ~QDirectFbBlitter();
21
22 void fillRect(const QRectF &rect, const QColor &color) override;
23 void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect) override;
24 void alphaFillRect(const QRectF &rect, const QColor &color, QPainter::CompositionMode cmode) override;
25 void drawPixmapOpacity(const QRectF &rect,
26 const QPixmap &pixmap,
27 const QRectF &subrect,
29 qreal opacity) override;
31 QFontEngine::GlyphFormat glyphFormat,
32 int numGlyphs,
33 const glyph_t *glyphs,
35 QFontEngine *fontEngine) override;
36
37 IDirectFBSurface *dfbSurface() const;
38
39 static DFBSurfacePixelFormat alphaPixmapFormat();
40 static DFBSurfacePixelFormat pixmapFormat();
41 static DFBSurfacePixelFormat selectPixmapFormat(bool withAlpha);
42
43protected:
44 QImage *doLock() override;
45 void doUnlock() override;
46
47 QDirectFBPointer<IDirectFBSurface> m_surface;
49
51
52private:
53 void drawDebugRect(const QRect &rect, const QColor &color);
54
55 bool m_premult;
56 bool m_debugPaint;
57};
58
60{
61public:
62 QBlittable *createBlittable(const QSize &size, bool alpha) const override;
63
65
66 bool fromFile(const QString &filename, const char *format,
67 Qt::ImageConversionFlags flags) override;
68
69private:
70 bool fromDataBufferDescription(const DFBDataBufferDescription &);
71};
72
77
82
83inline IDirectFBSurface *QDirectFbBlitter::dfbSurface() const
84{
85 return m_surface.data();
86}
87
89{
90public:
94
95 void resizeTextureData(int width, int height) override;
96
97 IDirectFBSurface *sourceSurface();
98
99private:
100 QDirectFBPointer<IDirectFBSurface> m_surface;
101};
102
104
105#endif // QDIRECTFBBLITTER_H
QBlittable * blittable() const
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
QBlittable * createBlittable(const QSize &size, bool alpha) const override
bool fromFile(const QString &filename, const char *format, Qt::ImageConversionFlags flags) override
QDirectFbBlitter * dfbBlitter() const
static DFBSurfacePixelFormat selectPixmapFormat(bool withAlpha)
bool drawCachedGlyphs(const QPaintEngineState *state, QFontEngine::GlyphFormat glyphFormat, int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions, QFontEngine *fontEngine) override
IDirectFBSurface * dfbSurface() const
void alphaFillRect(const QRectF &rect, const QColor &color, QPainter::CompositionMode cmode) override
QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface)
static DFBSurfacePixelFormat pixmapFormat()
QImage * doLock() override
QDirectFBPointer< IDirectFBSurface > m_surface
void drawPixmapOpacity(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect, QPainter::CompositionMode cmode, qreal opacity) override
static DFBSurfacePixelFormat alphaPixmapFormat()
void doUnlock() override
void fillRect(const QRectF &rect, const QColor &color) override
void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect) override
void resizeTextureData(int width, int height) override
QDirectFbTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
IDirectFBSurface * sourceSurface()
\inmodule QtGui
Definition qimage.h:37
The QPaintEngineState class provides information about the active paint engine's current state....
CompositionMode
Defines the modes supported for digital image compositing.
Definition qpainter.h:97
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
T * data() const noexcept
Returns the value of the pointer referenced by this object.
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
static const QCssKnownValue positions[NumKnownPositionModes - 1]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum const void GLbitfield GLsizei numGlyphs
GLint GLsizei width
GLuint color
[2]
GLbitfield flags
GLint GLsizei GLsizei GLenum format
GLuint GLenum matrix
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418
unsigned int glyph_t
double qreal
Definition qtypes.h:187
widget render & pixmap