示例#1
0
/*
 * WxPanel1UpdateUI
 */
void NumberChoiceDialog::WxPanel1UpdateUI(wxUpdateUIEvent& event)
{
	wxImage image("Images/scroll.jpg");
	wxBitmap tlo(image);
	wxClientDC dc(WxPanel1);
	wxBufferedDC bdc(&dc);
	bdc.DrawBitmap(tlo,0,0,true);
}
示例#2
0
void Ser::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
        // tworzenie sera
    QPixmap tlo(":/images/cheese.jpg");
    painter->setBrush(QBrush(tlo.scaled(20, 20)));
    painter->drawRect(-10, -10, 20, 20);

    this->Kolizja();
}
示例#3
0
void Cien::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
        // jeżeli podany obrazek
    if(!this->x_Tlo.isEmpty())
    {
        QPixmap tlo(this->x_Tlo);
        painter->setBrush(QBrush(tlo.scaled(this->x_Wymiary.width(),
                                            this->x_Wymiary.height())));
    }
    else
    {
        painter->setBrush(QBrush(QColor(0, 0, 0)));
        painter->setPen(QColor(0, 0, 0, 0));
    }

    painter->setOpacity(0.5);
    painter->drawRect(this->x_Wymiary);
}