1568 int clippedCount = 0;
1571 #ifndef QT_NO_XRENDER 1582 #ifndef QT_NO_XRENDER 1591 #ifndef QT_NO_XRENDER 1595 if (has_fill_texture)
1596 src = fill.
texture().x11PictureHandle();
1597 else if (has_fill_pattern)
1605 &clippedPoints, &clippedCount);
1607 #ifndef QT_NO_XRENDER 1608 bool solid_fill = fill.
color().
alpha() == 255;
1609 if (has_fill_texture && fill.
texture().
depth() == 1 && solid_fill) {
1610 has_fill_texture =
false;
1611 has_fill_pattern =
true;
1616 if (
X11->use_xrender
1618 && !has_fill_pattern
1619 && (clippedCount > 0)
1626 XRenderPictureAttributes attrs;
1627 attrs.poly_edge = antialias ? PolyEdgeSmooth : PolyEdgeSharp;
1628 XRenderChangePicture(
dpy,
picture, CPPolyEdge, &attrs);
1633 ? XRenderFindStandardFormat(
dpy, PictStandardA8)
1634 : XRenderFindStandardFormat(
dpy, PictStandardA1),
1642 if (clippedCount > 200000) {
1644 for (
int i = 0; i < clippedCount; ++i)
1648 const QRect aligned = bounds
1655 painter.translate(-aligned.
x(), -aligned.
y());
1657 painter.setBrush(fill);
1659 painter.setBrushOrigin(q->painter()->brushOrigin());
1660 painter.drawPolygon(poly);
1664 }
else if (clippedCount > 0) {
1666 for (
int i = 0; i < clippedCount; ++i) {
1667 xpoints[i].x =
qFloor(clippedPoints[i].x);
1668 xpoints[i].y =
qFloor(clippedPoints[i].y);
1673 XFillPolygon(
dpy,
hd, fill_gc,
1674 xpoints.data(), clippedCount,
The QPainter class performs low-level painting on widgets and other paint devices.
static Picture getPatternFill(int screen, const QBrush &b)
QPolygonClipper< qt_float_point, qt_float_point, float > polygonClipper
const QColor & color() const
Returns the brush color.
QRect tessellate(const QPointF *points, int nPoints, bool winding)
static void qt_XRenderCompositeTrapezoids(Display *dpy, int op, Picture src, Picture dst, _Xconst XRenderPictFormat *maskFormat, int xSrc, int ySrc, const XTrapezoid *traps, int size)
void fill(uint pixel)
Fills the entire image with the given pixelValue.
The QPointF class defines a point in the plane using floating point precision.
The QPolygon class provides a vector of points using integer precision.
int depth() const
Returns the depth of the pixmap.
void resetAdaptedOrigin()
qreal x() const
Returns the x-coordinate of this point.
void clipPolygon(const InType *inPoints, int inCount, OutType **outPoints, int *outCount, bool closePolygon=true)
QXRenderTessellator * tessellator
QSize size() const
Returns the size of the rectangle.
The QImage class provides a hardware-independent image representation that allows direct access to th...
QBrush brush() const
Returns the brush used to fill strokes generated with this pen.
Qt::BrushStyle style() const
Returns the brush style.
QPixmap texture() const
Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set...
The QBrush class defines the fill pattern of shapes drawn by QPainter.
void setupAdaptedOrigin(const QPoint &p)
ushort alpha
Returns the alpha color component of this color.
int y() const
Returns the y-coordinate of the rectangle's top edge.
bool hasAlpha() const
Returns true if this pixmap has an alpha channel, or has a mask, otherwise returns false...
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.
The QRect class defines a rectangle in the plane using integer precision.
QRect boundingRect() const
Returns the bounding rectangle of the polygon, or QRect(0, 0, 0, 0) if the polygon is empty...
qreal y() const
Returns the y-coordinate of this point.
The QSize class defines the size of a two-dimensional object using integer point precision.