QTfrontend/hats.cpp
changeset 2377 f3fab2b09e0c
parent 1281 1f8456577a39
child 2874 3c7c2bf1ba38
equal deleted inserted replaced
2376:ece7b87f1334 2377:f3fab2b09e0c
    41 		QString str = (*it).replace(QRegExp("^(.*)\\.png"), "\\1");
    41 		QString str = (*it).replace(QRegExp("^(.*)\\.png"), "\\1");
    42 		QPixmap pix(datadir->absolutePath() + "/Graphics/Hats/" + str + ".png");
    42 		QPixmap pix(datadir->absolutePath() + "/Graphics/Hats/" + str + ".png");
    43 
    43 
    44 		QPixmap tmppix(32, 37);
    44 		QPixmap tmppix(32, 37);
    45 		tmppix.fill(QColor(Qt::transparent));
    45 		tmppix.fill(QColor(Qt::transparent));
    46 		
    46 
    47 		QPainter painter(&tmppix);
    47 		QPainter painter(&tmppix);
    48 		painter.drawPixmap(QPoint(0, 5), hhpix);
    48 		painter.drawPixmap(QPoint(0, 5), hhpix);
    49 		painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
    49 		painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
    50 		painter.end();
    50 		painter.end();
    51 
    51