44 #ifndef QT_NO_QWS_TRANSFORMED 47 #include <private/qpainter_p.h> 48 #include <private/qmemrotate_p.h> 52 #include <sys/ioctl.h> 53 #include <sys/types.h> 66 #ifdef QT_REGION_DEBUG 78 #ifdef QT_QWS_DEPTH_GENERIC 86 #ifdef QT_QWS_DEPTH_GENERIC
87 doGenericColors(false),
94 #ifndef QT_BUILD_GUI_LIB 167 #ifdef QT_REGION_DEBUG 168 qDebug() <<
"QTransformedScreen::QTransformedScreen";
191 return capture.
toInt();
199 if (regexp.
indexIn(spec) == -1)
202 const int degrees = regexp.
cap(1).
toInt();
221 dspec = dspec.
left(dspec.
size() - displayIdSpec.
size());
238 #ifdef QT_QWS_DEPTH_GENERIC 297 #ifdef QT_REGION_DEBUG 298 qDebug() <<
"QTransformedScreen::setTransformation" << transformation
299 <<
"size" <<
w <<
h <<
"dev size" <<
dw <<
dh;
313 template <
class DST,
class SRC>
317 const SRC *src = (
const SRC*)(image.
scanLine(rect.
top())) + rect.
left();
318 DST *dest = (DST*)(screen->
base() + topLeft.
y() * screen->
linestep())
324 template <
class DST,
class SRC>
328 const SRC *src = (
const SRC*)(image.
scanLine(rect.
top())) + rect.
left();
329 DST *dest = (DST*)(screen->
base() + topLeft.
y() * screen->
linestep())
335 template <
class DST,
class SRC>
339 const SRC *src = (
const SRC *)(image.
scanLine(rect.
top())) + rect.
left();
340 DST *dest = (DST*)(screen->
base() + topLeft.
y() * screen->
linestep())
348 #define SET_BLIT_FUNC(dst, src, rotation, func) \ 350 switch (rotation) { \ 352 func = blit90<dst, src>; \ 355 func = blit180<dst, src>; \ 358 func = blit270<dst, src>; \ 382 #ifdef QT_QWS_DEPTH_GENERIC 383 if (
d_ptr->doGenericColors &&
depth() == 16) {
384 if (image.
depth() == 16)
391 #ifdef QT_QWS_DEPTH_32 393 #ifdef QT_QWS_DEPTH_16 394 if (image.
depth() == 16)
401 #if defined(QT_QWS_DEPTH_24) || defined(QT_QWS_DEPTH18) 407 #if defined(QT_QWS_DEPTH_16) || defined(QT_QWS_DEPTH_15) || defined(QT_QWS_DEPTH_12) 409 #if defined QT_QWS_ROTATE_BGR 416 #if defined QT_QWS_ROTATE_BGR 423 if (image.
depth() == 16)
429 #ifdef QT_QWS_DEPTH_8 433 else if (image.
depth() == 16)
446 for (
int i = 0; i < rects.
size(); ++i) {
447 const QRect r = rects.
at(i) & bound;
463 func(
this, image, r.
translated(-topLeft), dst);
478 #ifdef QT_REGION_DEBUG 479 qDebug() <<
"QTransformedScreen::solidFill region" << region <<
"transformed" << tr;
640 #ifdef QT_REGION_DEBUG 641 qDebug() <<
"mapToDevice size" << s <<
"rgn: " << rgn;
656 for (
int i = 0; i <
size; i++, r++) {
663 for (
int i = 0; i <
size; i++, r++) {
670 for (
int i = 0; i <
size; i++, r++) {
677 #ifdef QT_REGION_DEBUG 678 qDebug() <<
"mapToDevice trgn: " << trgn;
691 #ifdef QT_REGION_DEBUG 707 for (
int i = 0; i <
size; i++, r++) {
714 for (
int i = 0; i <
size; i++, r++) {
721 for (
int i = 0; i <
size; i++, r++) {
728 #ifdef QT_REGION_DEBUG 754 #endif // QT_NO_QWS_TRANSFORMED
Q_GUI_EXPORT QScreen * qt_screen
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
The QColor class provides colors based on RGB, HSV or CMYK values.
bool isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
The QProxyScreen class provides a generic interface to QScreen implementations.
int height() const
Returns the logical height of the framebuffer in pixels.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
#define QT_END_NAMESPACE
This macro expands to.
void setScreen(QScreen *screen)
Sets the real screen to be used by the proxy screen.
int lastIndexIn(const QString &str, int offset=-1, CaretMode caretMode=CaretAtZero) const
Attempts to find a match backwards in str from position offset.
int physicalHeight() const
Returns the physical height of the screen in millimeters.
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 ...
QString & prepend(QChar c)
int pos(int nth=0) const
Returns the position of the nth captured text in the searched string.
int matchedLength() const
Returns the length of the last matched string, or -1 if there was no match.
int left() const
Returns the x-coordinate of the rectangle's left edge.
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
int width() const
Returns the width of the rectangle.
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QRegion region() const
Reimplemented Function
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
Q_GUI_EXPORT QScreen * qt_get_screen(int display_id, const char *spec)
int deviceWidth() const
Returns the physical width of the framebuffer device in pixels.
int bytesPerLine() const
Returns the number of bytes per image scanline.
long ASN1_INTEGER_get ASN1_INTEGER * a
QRect boundingRect() const
Returns the bounding rectangle of this region.
int physHeight
the physical height of the screen in millimeters.
int height() const
Returns the height of the rectangle.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QString class provides a Unicode character string.
int size
the number of bytes in the visible region of the frame buffer
void Q_GUI_QWS_EXPORT qt_memrotate180(const quint32 *, int, int, int, quint32 *, int)
void Q_GUI_EXPORT qt_memrotate90(const quint32 *, int, int, int, quint32 *, int)
Format format() const
Returns the format of the image.
int physWidth
the physical width of the screen in millimeters.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Q_CORE_EXPORT void qDebug(const char *,...)
int width() const
Returns the logical width of the framebuffer in pixels.
int width() const
Returns the width.
uchar * data
points to the first visible pixel in the frame buffer.
#define QT_BEGIN_NAMESPACE
This macro expands to.
PixelType pixelType() const
Returns the pixel storage format of the screen.
int linestep() const
Returns the length of each scanline of the framebuffer in bytes.
QPoint bottomRight() const
Returns the position of the rectangle's bottom-right corner.
void truncate(int pos)
Truncates the string at the given position index.
int indexIn(const QString &str, int offset=0, CaretMode caretMode=CaretAtZero) const
Attempts to find a match in str from position offset (0 by default).
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
int size() const
Returns the number of characters in this string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
void exposeRegion(QRegion r, int changing)
Reimplemented Function
int w
the logical width of the screen.
#define Q_DECL_EXPORT
This macro marks a symbol for shared library export (see sharedlibrary.
The QImage class provides a hardware-independent image representation that allows direct access to th...
void setDirty(const QRect &)
Reimplemented Function
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
The QRegion class specifies a clip region for a painter.
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.
static QStringList keys()
Returns the list of valid keys, i.e.
void setCoords(int x1, int y1, int x2, int y2)
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its botto...
QSize mapFromDevice(const QSize &s) const
Reimplemented Function
const T & at(int i) const
Returns the item at index position i in the vector.
QSize size() const
Returns the size of the image, i.
QPoint topRight() const
Returns the position of the rectangle's top-right corner.
const char * constData() const
Returns a pointer to the data stored in the byte array.
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
uchar * base() const
Returns a pointer to the beginning of the framebuffer.
void setY(int y)
Sets the y coordinate of this point to the given y coordinate.
int top() const
Returns the y-coordinate of the rectangle's top edge.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
void blit(const QImage &img, const QPoint &topLeft, const QRegion ®ion)
Reimplemented Function
int compare(const QString &s) const
int right() const
Returns the x-coordinate of the rectangle's right edge.
QPoint bottomLeft() const
Returns the position of the rectangle's bottom-left corner.
int deviceHeight() const
Returns the full height of the framebuffer device in pixels.
int y() 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)
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
int x() const
Returns the x-coordinate of the rectangle's left edge.
The QPoint class defines a point in the plane using integer precision.
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
int height() const
Returns the height.
The QRect class defines a rectangle in the plane using integer precision.
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
int y() const
Returns the y coordinate of this point.
QSize mapToDevice(const QSize &s) const
Reimplemented Function
The QSize class defines the size of a two-dimensional object using integer point precision.
T * data()
Returns a pointer to the data stored in the vector.
int x() const
Returns the x coordinate of this point.
int h
the logical height of the screen.
QScreen * screen() const
Returns the real screen used by the proxy screen.
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
virtual void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
int physicalWidth() const
Returns the physical width of the screen in millimeters.
void setX(int x)
Sets the x coordinate of this point to the given x coordinate.
int size() const
Returns the number of items in the vector.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
void solidFill(const QColor &color, const QRegion ®ion)
Reimplemented Function