def playOnPicture(self, pic): if not self.PIC_CHK_D(): return None if pic and pic.picture(): self.end() cpyPic = Qt.QPicture() cpyPic.setData(self.d.pic_.data(), self.d.pic_.size()) pa = Qt.QPainter(pic.picture()) cpyPic.play(pa) pa.end() self.begin() self.d.pte_.drawPicture(0, 0, cpyPic) return pic return False
def playOnPixmap(self, pix): if not self.PIC_CHK_D(): return None if not pix: return False self.end() cpyPic = Qt.QPicture() cpyPic.setData(self.d.pic_.data(), self.d.pic_.size()) pa = Qt.QPainter(pix) pa.setClipRect(0, 0, pix.width(), pix.height()) cpyPic.play(pa) pa.end() self.begin() self.d.pte_.drawPicture(0, 0, cpyPic) return pix
def __init__(self, *args): self.pic_ = Qt.QPicture() self.pte_ = Qt.QPainter() self.ownerPic_ = True self.ownerPte_ = True self.endPte_ = True