MythTV
master
|
#include <mythpainter.h>
Public Member Functions | |
MythPainter () | |
virtual | ~MythPainter ()=default |
MythPainter destructor. More... | |
virtual QString | GetName (void)=0 |
virtual bool | SupportsAnimation (void)=0 |
virtual bool | SupportsAlpha (void)=0 |
virtual bool | SupportsClipping (void)=0 |
virtual void | FreeResources (void) |
virtual void | Begin (QPaintDevice *parent) |
virtual void | End () |
virtual void | SetClipRect (const QRect &clipRect) |
virtual void | SetClipRegion (const QRegion &clipRegion) |
virtual void | Clear (QPaintDevice *device, const QRegion ®ion) |
QPaintDevice * | GetParent (void) |
virtual void | DrawImage (const QRect &dest, MythImage *im, const QRect &src, int alpha)=0 |
void | DrawImage (int x, int y, MythImage *im, int alpha) |
void | DrawImage (const QPoint &topLeft, MythImage *im, int alph) |
virtual void | DrawText (const QRect &dest, const QString &msg, int flags, const MythFontProperties &font, int alpha, const QRect &boundRect) |
virtual void | DrawTextLayout (const QRect &canvasRect, const LayoutVector &layouts, const FormatVector &formats, const MythFontProperties &font, int alpha, const QRect &destRect) |
virtual void | DrawRect (const QRect &area, const QBrush &fillBrush, const QPen &linePen, int alpha) |
virtual void | DrawRoundRect (const QRect &area, int cornerRadius, const QBrush &fillBrush, const QPen &linePen, int alpha) |
virtual void | DrawEllipse (const QRect &area, const QBrush &fillBrush, const QPen &linePen, int alpha) |
virtual void | PushTransformation (const UIEffects &zoom, QPointF center=QPointF()) |
virtual void | PopTransformation (void) |
MythImage * | GetFormatImage () |
Returns a blank reference counted image in the format required for the Draw functions for this painter. More... | |
void | DeleteFormatImage (MythImage *im) |
void | SetDebugMode (bool showBorders, bool showNames) |
bool | ShowBorders (void) |
bool | ShowTypeNames (void) |
void | SetMaximumCacheSizes (int hardware, int software) |
Protected Member Functions | |
void | DrawTextPriv (MythImage *im, const QString &msg, int flags, const QRect &r, const MythFontProperties &font) |
void | DrawRectPriv (MythImage *im, const QRect &area, int radius, int ellipse, const QBrush &fillBrush, const QPen &linePen) |
MythImage * | GetImageFromString (const QString &msg, int flags, const QRect &r, const MythFontProperties &font) |
MythImage * | GetImageFromTextLayout (const LayoutVector &layouts, const FormatVector &formats, const MythFontProperties &font, QRect &canvas, QRect &dest) |
MythImage * | GetImageFromRect (const QRect &area, int radius, int ellipse, const QBrush &fillBrush, const QPen &linePen) |
virtual MythImage * | GetFormatImagePriv (void)=0 |
Creates a reference counted image, call DecrRef() to delete. More... | |
virtual void | DeleteFormatImagePriv (MythImage *im)=0 |
void | ExpireImages (int64_t max=0) |
virtual void | Teardown (void) |
void | CheckFormatImage (MythImage *im) |
Protected Attributes | |
QPaintDevice * | m_Parent |
int | m_HardwareCacheSize |
int | m_MaxHardwareCacheSize |
Private Attributes | |
int64_t | m_SoftwareCacheSize |
int64_t | m_MaxSoftwareCacheSize |
QMutex | m_allocationLock |
QSet< MythImage * > | m_allocatedImages |
QMap< QString, MythImage * > | m_StringToImageMap |
std::list< QString > | m_StringExpireList |
bool | m_showBorders |
bool | m_showNames |
Definition at line 32 of file mythpainter.h.
MythPainter::MythPainter | ( | ) |
Definition at line 22 of file mythpainter.cpp.
|
virtualdefault |
MythPainter destructor.
The MythPainter destructor does not cleanup, it is unsafe to do cleanup in the MythPainter destructor because DeleteImagePriv() is a pure virtual in this class. Instead children should call MythPainter::Teardown() for cleanup.
|
pure virtual |
Implemented in MythOpenGLPainter, MythQImagePainter, MythVDPAUPainter, MythD3D9Painter, MythQtPainter, and MythYUVAPainter.
Referenced by MythMainWindow::Init().
|
pure virtual |
Implemented in MythOpenGLPainter, MythQImagePainter, MythVDPAUPainter, MythD3D9Painter, and MythQtPainter.
Referenced by MythScreenStack::EnableEffects(), and MythUIText::ParseElement().
|
pure virtual |
Implemented in MythOpenGLPainter, MythQImagePainter, MythVDPAUPainter, MythD3D9Painter, and MythQtPainter.
Referenced by MythScreenStack::EnableEffects().
|
pure virtual |
Implemented in MythOpenGLPainter, MythQImagePainter, MythVDPAUPainter, MythD3D9Painter, and MythQtPainter.
Referenced by MythMainWindow::draw(), and MythMainWindow::drawScreen().
|
inlinevirtual |
Reimplemented in MythOpenGLPainter, MythVDPAUPainter, and MythD3D9Painter.
Definition at line 49 of file mythpainter.h.
Referenced by TV::customEvent(), VideoOutputD3D::Init(), and VideoOutputVDPAU::Init().
|
inlinevirtual |
Reimplemented in MythOpenGLPainter, MythQImagePainter, MythVDPAUPainter, MythD3D9Painter, and MythQtPainter.
Definition at line 50 of file mythpainter.h.
Referenced by MythQtPainter::Begin(), MythD3D9Painter::Begin(), MythQImagePainter::Begin(), MythOpenGLPainter::Begin(), MythVDPAUPainter::Begin(), MythMainWindow::draw(), OSD::Draw(), OSD::DrawDirect(), VideoVisualCircles::DrawPriv(), and VideoVisualSpectrum::DrawPriv().
|
inlinevirtual |
Reimplemented in MythOpenGLPainter, MythQImagePainter, MythVDPAUPainter, MythD3D9Painter, and MythQtPainter.
Definition at line 51 of file mythpainter.h.
Referenced by MythMainWindow::draw(), OSD::Draw(), OSD::DrawDirect(), VideoVisualCircles::DrawPriv(), VideoVisualSpectrum::DrawPriv(), MythQtPainter::End(), MythD3D9Painter::End(), MythOpenGLPainter::End(), MythQImagePainter::End(), and MythVDPAUPainter::End().
|
virtual |
Reimplemented in MythQImagePainter, and MythQtPainter.
Definition at line 50 of file mythpainter.cpp.
Referenced by MythMainWindow::draw(), MythUIVideo::DrawSelf(), MythUIShape::DrawSelf(), MythUISimpleText::DrawSelf(), MythUIGuideGrid::DrawSelf(), MythUIText::DrawSelf(), MythUIImage::DrawSelf(), and MythUIWebBrowser::DrawSelf().
|
virtual |
Reimplemented in MythQImagePainter.
Definition at line 54 of file mythpainter.cpp.
Referenced by OSD::Draw().
|
virtual |
Reimplemented in MythQImagePainter.
Definition at line 58 of file mythpainter.cpp.
Referenced by OSD::Draw().
|
inline |
Definition at line 57 of file mythpainter.h.
|
pure virtual |
Implemented in MythQImagePainter, MythOpenGLPainter, MythVDPAUPainter, MythD3D9Painter, MythQtPainter, and MythYUVAPainter.
Referenced by DrawEllipse(), DrawImage(), DrawRect(), DrawRoundRect(), MythUIVideo::DrawSelf(), MythUIImage::DrawSelf(), MythUIWebBrowser::DrawSelf(), DrawText(), and DrawTextLayout().
void MythPainter::DrawImage | ( | int | x, |
int | y, | ||
MythImage * | im, | ||
int | alpha | ||
) |
Definition at line 62 of file mythpainter.cpp.
void MythPainter::DrawImage | ( | const QPoint & | topLeft, |
MythImage * | im, | ||
int | alph | ||
) |
Definition at line 75 of file mythpainter.cpp.
|
virtual |
Reimplemented in MythQImagePainter, and MythYUVAPainter.
Definition at line 80 of file mythpainter.cpp.
Referenced by MythUIType::Draw(), MythUISimpleText::DrawSelf(), MythQImagePainter::DrawText(), and MythUIGuideGrid::drawText().
|
virtual |
Definition at line 127 of file mythpainter.cpp.
Referenced by MythUIText::DrawSelf().
|
virtual |
Reimplemented in MythQImagePainter, MythOpenGLPainter, MythD3D9Painter, and MythYUVAPainter.
Definition at line 161 of file mythpainter.cpp.
Referenced by MythUIType::Draw(), MythUIGuideGrid::drawBackground(), MythUIGuideGrid::drawBox(), MythUIGuideGrid::drawCurrent(), VideoVisualSpectrum::DrawPriv(), MythD3D9Painter::DrawRect(), MythOpenGLPainter::DrawRect(), MythQImagePainter::DrawRect(), and MythUIShape::DrawSelf().
|
virtual |
Reimplemented in MythQImagePainter, MythOpenGLPainter, and MythYUVAPainter.
Definition at line 172 of file mythpainter.cpp.
Referenced by MythUIGuideGrid::drawCurrent(), VideoVisualCircles::DrawPriv(), MythOpenGLPainter::DrawRoundRect(), MythQImagePainter::DrawRoundRect(), and MythUIShape::DrawSelf().
|
virtual |
Reimplemented in MythQImagePainter, and MythYUVAPainter.
Definition at line 184 of file mythpainter.cpp.
Referenced by MythQImagePainter::DrawEllipse(), and MythUIShape::DrawSelf().
|
virtual |
Reimplemented in MythOpenGLPainter.
Definition at line 195 of file mythpainter.cpp.
Referenced by MythUIType::Draw().
|
inlinevirtual |
Reimplemented in MythOpenGLPainter.
Definition at line 82 of file mythpainter.h.
Referenced by MythUIType::Draw().
MythImage * MythPainter::GetFormatImage | ( | void | ) |
Returns a blank reference counted image in the format required for the Draw functions for this painter.
Definition at line 537 of file mythpainter.cpp.
Referenced by SubtitleScreen::AddScaledImage(), MythBrowser::Create(), BDOverlayScreen::DisplayBDOverlay(), VideoOutput::DisplayOSD(), SubtitleScreen::DisplayScaledAVSubtitles(), ZMEvents::eventVisible(), ZMClient::getEventFrame(), ThumbFinder::getFrameImage(), GetImageFromRect(), GetImageFromString(), GetImageFromTextLayout(), MythImage::Gradient(), MythUIWebBrowser::Init(), MythNotificationScreen::Init(), MythUIHelper::LoadCacheImage(), ImageLoader::LoadImage(), MythUIVideo::MythUIVideo(), TeletextScreen::OptimiseDisplayedArea(), SubtitleScreen::RenderAssTrack(), MythUIVideo::Reset(), WebPage::slotIconChanged(), Player::updateFrame(), MHIContext::UpdateOSD(), and ThumbFinder::updatePositionBar().
void MythPainter::DeleteFormatImage | ( | MythImage * | im | ) |
Definition at line 546 of file mythpainter.cpp.
Referenced by MythImage::~MythImage().
Definition at line 90 of file mythpainter.h.
Referenced by setDebugShowBorders(), and setDebugShowNames().
|
inline |
Definition at line 96 of file mythpainter.h.
Referenced by MythUIType::Draw(), setDebugShowBorders(), and setDebugShowNames().
|
inline |
Definition at line 97 of file mythpainter.h.
Referenced by MythUIType::Draw(), setDebugShowBorders(), and setDebugShowNames().
void MythPainter::SetMaximumCacheSizes | ( | int | hardware, |
int | software | ||
) |
Definition at line 605 of file mythpainter.cpp.
Referenced by MythPainter().
|
protected |
Definition at line 201 of file mythpainter.cpp.
Referenced by GetImageFromString().
|
protected |
Definition at line 314 of file mythpainter.cpp.
Referenced by GetImageFromRect().
|
protected |
Definition at line 349 of file mythpainter.cpp.
Referenced by MythYUVAPainter::DrawText(), and DrawText().
|
protected |
Definition at line 382 of file mythpainter.cpp.
Referenced by DrawTextLayout().
|
protected |
Definition at line 472 of file mythpainter.cpp.
Referenced by MythYUVAPainter::DrawEllipse(), DrawEllipse(), MythYUVAPainter::DrawRect(), DrawRect(), MythYUVAPainter::DrawRoundRect(), and DrawRoundRect().
|
protectedpure virtual |
Creates a reference counted image, call DecrRef() to delete.
Implemented in MythQImagePainter, MythOpenGLPainter, MythD3D9Painter, MythVDPAUPainter, and MythQtPainter.
Referenced by GetFormatImage().
|
protectedpure virtual |
Implemented in MythQImagePainter, MythOpenGLPainter, MythD3D9Painter, MythVDPAUPainter, and MythQtPainter.
Referenced by DeleteFormatImage().
|
protected |
Definition at line 563 of file mythpainter.cpp.
Referenced by GetImageFromRect(), GetImageFromString(), GetImageFromTextLayout(), and Teardown().
|
protectedvirtual |
Reimplemented in MythD3D9Painter, and MythVDPAUPainter.
Definition at line 31 of file mythpainter.cpp.
Referenced by VideoOutputOpenGL::DestroyGPUResources(), MythVDPAUPainter::Teardown(), MythD3D9Painter::Teardown(), MythOpenGLPainter::~MythOpenGLPainter(), MythQImagePainter::~MythQImagePainter(), MythQtPainter::~MythQtPainter(), and MythYUVAPainter::~MythYUVAPainter().
|
protected |
Definition at line 553 of file mythpainter.cpp.
Referenced by MythD3D9Painter::GetImageFromCache(), MythVDPAUPainter::GetTextureFromCache(), and MythOpenGLPainter::GetTextureFromCache().
|
protected |
Definition at line 128 of file mythpainter.h.
|
protected |
Definition at line 129 of file mythpainter.h.
Referenced by MythVDPAUPainter::DeleteBitmaps(), MythD3D9Painter::DeleteBitmaps(), MythOpenGLPainter::DeleteTextures(), MythD3D9Painter::GetImageFromCache(), MythVDPAUPainter::GetTextureFromCache(), and MythOpenGLPainter::GetTextureFromCache().
|
protected |
Definition at line 130 of file mythpainter.h.
Referenced by MythD3D9Painter::GetImageFromCache(), MythVDPAUPainter::GetTextureFromCache(), MythOpenGLPainter::GetTextureFromCache(), and SetMaximumCacheSizes().
|
private |
Definition at line 133 of file mythpainter.h.
Referenced by ExpireImages(), GetImageFromRect(), GetImageFromString(), and GetImageFromTextLayout().
|
private |
Definition at line 134 of file mythpainter.h.
Referenced by GetImageFromRect(), GetImageFromString(), GetImageFromTextLayout(), and SetMaximumCacheSizes().
|
private |
Definition at line 136 of file mythpainter.h.
Referenced by CheckFormatImage(), DeleteFormatImage(), GetFormatImage(), and Teardown().
|
private |
Definition at line 137 of file mythpainter.h.
Referenced by CheckFormatImage(), DeleteFormatImage(), GetFormatImage(), and Teardown().
|
private |
Definition at line 139 of file mythpainter.h.
Referenced by ExpireImages(), GetImageFromRect(), GetImageFromString(), and GetImageFromTextLayout().
|
private |
Definition at line 140 of file mythpainter.h.
Referenced by ExpireImages(), GetImageFromRect(), GetImageFromString(), and GetImageFromTextLayout().
|
private |
Definition at line 142 of file mythpainter.h.
|
private |
Definition at line 143 of file mythpainter.h.