#include "qscreentransformed_qws.h"
#include <qscreendriverfactory_qws.h>
#include <qvector.h>
#include <private/qpainter_p.h>
#include <private/qmemrotate_p.h>
#include <qmatrix.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <errno.h>
#include <qwindowsystem_qws.h>
#include <qwsdisplay_qws.h>
Go to the source code of this file.
|
template<class DST , class SRC > |
static void | blit180 (QScreen *screen, const QImage &image, const QRect &rect, const QPoint &topLeft) |
|
template<class DST , class SRC > |
static void | blit270 (QScreen *screen, const QImage &image, const QRect &rect, const QPoint &topLeft) |
|
template<class DST , class SRC > |
static void | blit90 (QScreen *screen, const QImage &image, const QRect &rect, const QPoint &topLeft) |
|
static QRect | correctNormalized (const QRect &r) |
|
static QTransformedScreen::Transformation | filterTransformation (QString &spec) |
|
static int | getDisplayId (const QString &spec) |
|
Q_DECL_EXPORT void | qws_setScreenTransformation (QScreen *that, int t) |
|
◆ SET_BLIT_FUNC
#define SET_BLIT_FUNC |
( |
|
dst, |
|
|
|
src, |
|
|
|
rotation, |
|
|
|
func |
|
) |
| |
Value:do { \
switch (rotation) { \
case Rot90: \
func = blit90<dst, src>; \
break; \
case Rot180: \
func = blit180<dst, src>; \
break; \
case Rot270: \
func = blit270<dst, src>; \
break; \
default: \
break; \
} \
} while (0)
Definition at line 348 of file qscreentransformed_qws.cpp.
Referenced by QTransformedScreen::blit().
◆ BlitFunc
◆ blit180()
template<class DST , class SRC >
Definition at line 325 of file qscreentransformed_qws.cpp.
328 const SRC *src = (
const SRC*)(image.
scanLine(rect.
top())) + rect.
left();
329 DST *dest = (DST*)(screen->
base() + topLeft.
y() * screen->
linestep())
int left() const
Returns the x-coordinate of the rectangle's left edge.
int width() const
Returns the width of the rectangle.
int bytesPerLine() const
Returns the number of bytes per image scanline.
int height() const
Returns the height of the rectangle.
void Q_GUI_QWS_EXPORT qt_memrotate180(const quint32 *, int, int, int, quint32 *, int)
int linestep() const
Returns the length of each scanline of the framebuffer in bytes.
uchar * base() const
Returns a pointer to the beginning of the framebuffer.
int top() const
Returns the y-coordinate of the rectangle's top edge.
int y() const
Returns the y coordinate of this point.
int x() const
Returns the x coordinate of this point.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
◆ blit270()
template<class DST , class SRC >
Definition at line 336 of file qscreentransformed_qws.cpp.
339 const SRC *src = (
const SRC *)(image.
scanLine(rect.
top())) + rect.
left();
340 DST *dest = (DST*)(screen->
base() + topLeft.
y() * screen->
linestep())
int left() const
Returns the x-coordinate of the rectangle's left edge.
int width() const
Returns the width of the rectangle.
int bytesPerLine() const
Returns the number of bytes per image scanline.
int height() const
Returns the height of the rectangle.
int linestep() const
Returns the length of each scanline of the framebuffer in bytes.
uchar * base() const
Returns a pointer to the beginning of the framebuffer.
int top() const
Returns the y-coordinate of the rectangle's top edge.
void Q_GUI_QWS_EXPORT qt_memrotate270(const quint32 *, int, int, int, quint32 *, int)
int y() const
Returns the y coordinate of this point.
int x() const
Returns the x coordinate of this point.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
◆ blit90()
template<class DST , class SRC >
Definition at line 314 of file qscreentransformed_qws.cpp.
317 const SRC *src = (
const SRC*)(image.
scanLine(rect.
top())) + rect.
left();
318 DST *dest = (DST*)(screen->
base() + topLeft.
y() * screen->
linestep())
int left() const
Returns the x-coordinate of the rectangle's left edge.
int width() const
Returns the width of the rectangle.
int bytesPerLine() const
Returns the number of bytes per image scanline.
int height() const
Returns the height of the rectangle.
void Q_GUI_EXPORT qt_memrotate90(const quint32 *, int, int, int, quint32 *, int)
int linestep() const
Returns the length of each scanline of the framebuffer in bytes.
uchar * base() const
Returns a pointer to the beginning of the framebuffer.
int top() const
Returns the y-coordinate of the rectangle's top edge.
int y() const
Returns the y coordinate of this point.
int x() const
Returns the x coordinate of this point.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
◆ correctNormalized()
Definition at line 304 of file qscreentransformed_qws.cpp.
Referenced by QTransformedScreen::mapFromDevice(), and QTransformedScreen::mapToDevice().
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
int left() const
Returns the x-coordinate of the rectangle's left edge.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
int top() const
Returns the y-coordinate of the rectangle's top edge.
int right() const
Returns the x-coordinate of the rectangle's right edge.
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
◆ filterTransformation()
Definition at line 196 of file qscreentransformed_qws.cpp.
Referenced by QTransformedScreen::connect().
199 if (regexp.indexIn(spec) == -1)
202 const int degrees = regexp.cap(1).toInt();
203 spec.
remove(regexp.pos(0), regexp.matchedLength());
The QRegExp class provides pattern matching using regular expressions.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
◆ getDisplayId()
static int getDisplayId |
( |
const QString & |
spec | ) |
|
|
static |
Definition at line 186 of file qscreentransformed_qws.cpp.
Referenced by QTransformedScreen::connect().
189 if (regexp.lastIndexIn(spec) != -1) {
190 const QString capture = regexp.cap(1);
191 return capture.
toInt();
The QRegExp class provides pattern matching using regular expressions.
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
◆ qws_setScreenTransformation()