50 *
m_pixmap = QPixmap::fromImage(*((QImage *)
this));
76 LOG(VB_GENERAL, LOG_ERR,
77 "FATAL ERROR: No parent widget defined for QT Painter, bailing");
100 if (!clipRect.isEmpty())
115 const QRect src,
int alpha)
119 LOG(VB_GENERAL, LOG_ERR,
120 "FATAL ERROR: DrawImage called with no painter");
126 if (qim->NeedsRegen())
129 m_painter->setOpacity(
static_cast<qreal
>(alpha) / 255.0);
130 m_painter->drawPixmap(r.topLeft(), *(qim->GetPixmap()), src);
144 if (qim && qim->GetPixmap())
147 qim->SetPixmap(
nullptr);
virtual void SetChanged(bool change=true)
virtual void Begin(QPaintDevice *)
virtual void Teardown(void)
MythQtImage(MythQtPainter *parent)
void SetPixmap(QPixmap *p)
void SetChanged(bool change=true) override
void RegeneratePixmap(void)
QPixmap * GetPixmap(void)
bool NeedsRegen(void) const
~MythQtPainter() override
void SetClipRect(QRect clipRect) override
void Begin(QPaintDevice *parent) override
void DrawImage(QRect r, MythImage *im, QRect src, int alpha) override
MythImage * GetFormatImagePriv(void) override
Creates a reference counted image, call DecrRef() to delete.
std::list< QPixmap * > m_imageDeleteList
void DeleteFormatImagePriv(MythImage *im) override
#define LOG(_MASK_, _LEVEL_, _QSTRING_)