Begin() public method

public Begin ( IQPaintDevice arg1 ) : bool
arg1 IQPaintDevice
return bool
示例#1
0
文件: cannonfield.cs 项目: KDE/qyoto
 private void paintShot(QPainter painter)
 {
     painter.Begin(this); // should not be necessary
     painter.SetPen(Qt.PenStyle.NoPen);
     painter.SetBrush(new QBrush(Qt.GlobalColor.black));
     painter.DrawRect(shotRect());
     painter.End(); // should not be necessary
 }
示例#2
0
文件: cannonfield.cs 项目: KDE/qyoto
    private void paintCannon(QPainter painter)
    {
        painter.Begin(this); // should not be necessary
        painter.SetPen(Qt.PenStyle.NoPen);
        painter.SetBrush(new QBrush(Qt.GlobalColor.blue));

        painter.Save();
        painter.Translate(0, Height());
        painter.DrawPie(new QRect(-35, -35, 70, 70), 0, 90 * 16);
        painter.Rotate(-currentAngle);
        painter.DrawRect(barrelRect);
        painter.Restore();
        painter.End(); // should not be necessary
    }