42 #include <QtGui/QPaintDevice> 43 #include <QtGui/QPainter> 44 #include <QtGui/QPixmap> 45 #include <QtGui/QWidget> 47 #include "private/qt_x11_p.h" 48 #include "private/qpixmap_x11_p.h" 49 #include "private/qwidget_p.h" 81 XFreeGC(
X11->display,
gc);
105 XRenderComposite(
X11->display, PictOpSrc, src, 0, dst,
106 0, 0, w, h,
it->x(),
it->y(),
107 it->width(),
it->height());
132 XSetClipRectangles(
X11->display,
gc, 0, 0, rects, num, YXBanded);
134 br.
x() + offset.
x(), br.
y() + offset.
y(), br.
width(), br.
height(), wbr.
x(), wbr.
y());
147 #ifndef QT_NO_XRENDER 170 staticRegion &=
QRect(0, 0, oldData->w, oldData->h);
177 GC tmpGc = XCreateGC(
X11->display, oldData->hd, 0, 0);
178 XSetClipRectangles(
X11->display, tmpGc, 0, 0, rects, num, YXBanded);
179 XCopyArea(
X11->display, oldData->hd, newData->
hd, tmpGc,
182 XFreeGC(
X11->display, tmpGc);
192 XFreeGC(
X11->display,
gc);
197 XSetGraphicsExposures(
X11->display,
gc, False);
211 rect.
x()+dx, rect.
y()+dy);
212 XFreeGC(
X11->display, gc);
227 srcRect = rect & widget->
rect();
229 srcRect = widget->
rect();
244 XSetGraphicsExposures(
X11->display, tmpGc, False);
246 srcRect.
x(), srcRect.
y(), srcRect.
width(), srcRect.
height(), 0, 0);
248 XFreeGC(
X11->display, tmpGc);
256 #ifndef QT_NO_XRENDER int depth() const
Returns the color depth (bits per pixel) of the X display.
QX11WindowSurface(QWidget *widget)
qreal y() const
Returns the y-coordinate of the rectangle's top edge.
WindowSurfaceFeatures features() const
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset)
Flushes the given region from the specified widget onto the screen.
int width() const
Returns the width of the pixmap.
QPointer< QWidget > widget
QSize size() const
Returns the size of the pixmap.
void * qt_getClipRects(const QRegion &r, int &num)
QRect rect(const QWidget *widget) const
Returns the rectangle for widget in the coordinates of this window surface.
#define it(className, varName)
void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
QPixmap grabWidget(const QWidget *widget, const QRect &rectangle=QRect()) const
Returns a QPixmap generated from the part of the backing store corresponding to widget.
virtual void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
int width() const
Returns the width of the rectangle.
virtual QPoint offset(const QWidget *widget) const
Returns the offset of widget in the coordinates of this window surface.
Qt::HANDLE handle() const
Returns the pixmap's handle to the device context.
QRect boundingRect() const
Returns the bounding rectangle of this region.
int depth() const
Returns the depth of the pixmap.
void resize(int width, int height)
int height() const
Returns the height of the rectangle.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the vector...
static const QRectF boundingRect(const QPointF *points, int pointCount)
int width() const
Returns the width.
T * data() const
Returns a pointer to the shared data object.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool hasStaticContents() const
qreal height() const
Returns the height of the rectangle.
QSize size() const
Returns the size of the rectangle.
bool isNull() const
Returns true if both the x and y coordinates are set to 0, otherwise returns false.
bool translucentBackground
static const char * data(const QByteArray &arr)
qreal width() const
Returns the width of the rectangle.
The QRegion class specifies a clip region for a painter.
QX11WindowSurfacePrivate * d_ptr
The QWindowSurface class provides the drawing area for top-level windows.
QRegion staticContents() const
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
iterator begin()
Returns an STL-style iterator pointing to the first item in the vector.
int y() const
Returns the y-coordinate of the rectangle's top edge.
qreal x() const
Returns the x-coordinate of the rectangle's left edge.
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.
QPaintDevice * paintDevice()
Implement this function to return the appropriate paint device.
int height() const
Returns the height.
The QRect class defines a rectangle in the plane using integer precision.
int y() const
Returns the y coordinate of this point.
The QPixmap class is an off-screen image representation that can be used as a paint device...
int height() const
Returns the height of the pixmap.
void translate(int dx, int dy)
Translates (moves) the region dx along the X axis and dy along the Y axis.
The QSize class defines the size of a two-dimensional object using integer point precision.
int x() const
Returns the x coordinate of this point.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
void translate(int dx, int dy)
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position...
void beginPaint(const QRegion &rgn)
This function is called before painting onto the surface begins, with the region in which the paintin...
QWidget * window() const
Returns a pointer to the top-level window associated with this surface.
bool scroll(const QRegion &area, int dx, int dy)
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative...
int screen() const
Returns the number of the screen currently in use.
static int area(const QSize &s)
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
QPixmapData * pixmapData() const