Colormap colormap;
#ifndef QT_NO_XRENDER
- enum { solid_fill_count = 16 };
+ enum { solid_fill_count = 20 };
struct SolidFills {
XRenderColor color;
int screen;
Picture picture;
} solid_fills[solid_fill_count];
- enum { pattern_fill_count = 16 };
+ enum { pattern_fill_count = 20 };
struct PatternFills {
XRenderColor color;
XRenderColor bg_color;
return XNone;
XRenderColor color = preMultiply(c);
- for (int i = 0; i < qt_x11Data->solid_fill_count; ++i) {
+ for (int i = 0; i < QX11Data::solid_fill_count; ++i) {
if (qt_x11Data->solid_fills[i].screen == screen
&& qt_x11Data->solid_fills[i].color.alpha == color.alpha
&& qt_x11Data->solid_fills[i].color.red == color.red
return qt_x11Data->solid_fills[i].picture;
}
// none found, replace one
- int i = qrand() % 16;
+ int i = qrand() % QX11Data::solid_fill_count;
if (qt_x11Data->solid_fills[i].screen != screen && qt_x11Data->solid_fills[i].picture) {
XRenderFreePicture (qt_x11Data->display, qt_x11Data->solid_fills[i].picture);
XRenderColor color = qt_x11Data->preMultiply(b.color());
XRenderColor bg_color = qt_x11Data->preMultiply(QColor(0, 0, 0, 0));
- for (int i = 0; i < qt_x11Data->pattern_fill_count; ++i) {
+ for (int i = 0; i < QX11Data::pattern_fill_count; ++i) {
if (qt_x11Data->pattern_fills[i].screen == screen
&& qt_x11Data->pattern_fills[i].style == b.style()
&& qt_x11Data->pattern_fills[i].color.alpha == color.alpha
return qt_x11Data->pattern_fills[i].picture;
}
// none found, replace one
- int i = qrand() % 16;
+ int i = qrand() % QX11Data::pattern_fill_count;
if (qt_x11Data->pattern_fills[i].screen != screen && qt_x11Data->pattern_fills[i].picture) {
XRenderFreePicture (qt_x11Data->display, qt_x11Data->pattern_fills[i].picture);