590 #if 1 || defined(QT_NO_QWS_CURSOR) || defined(QT_NO_QWS_ALHPA_CURSOR) 597 if (!
cursor.hasAlphaBuffer()) {
598 cursor.setAlphaBuffer(
true);
601 const int darkness=140;
605 drop.setColor(1, 0xffffffff);
606 for (
int i=0; i<16; i++) {
607 drop.setColor(2+i, (darkness*i/16)<<24);
619 drop.setPixel(col+dropx, row+dropy, 17);
624 for (
int blur=0; blur<nblur; blur++) {
625 QImage& to((blur&1)?drop:drop2);
626 QImage& from((blur&1)?drop2:drop);
627 for (
int row = 1; row < drop.height()-1; row++) {
628 for (
int col = 1; col < drop.width()-1; col++) {
630 for (
int dx=-1; dx<=1; dx++) {
631 for (
int dy=-1; dy<=1; dy++) {
632 t += from.pixelIndex(col+dx,row+dy)-2;
635 to.setPixel(col,row,2+t/9);
645 drop.setPixel(col, row, cp);
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
void setColor(int i, QRgb c)
Sets the color at the given index in the color table, to the given to colorValue. ...
int pixelIndex(int x, int y) const
Returns the pixel index at (x, y).
The QImage class provides a hardware-independent image representation that allows direct access to th...
int width() const
Returns the width of the image.
int height() const
Returns the height of the image.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...