MythImage Class Reference

#include <mythimage.h>

Inheritance diagram for MythImage:
MythQtImage

List of all members.

Public Member Functions

 MythImage (MythPainter *parent)
MythPainterGetParent (void)
void SetParent (MythPainter *parent)
void UpRef (void)
bool DownRef (void)
int RefCount (void)
virtual void SetChanged (bool change=true)
bool IsChanged () const
bool IsGradient () const
bool IsReflected () const
void SetToYUV (void)
void ConvertToYUV (void)
void Assign (const QImage &img)
void Assign (const QPixmap &pix)
bool Load (MythImageReader *reader)
bool Load (const QString &filename, bool scale=true)
void Resize (const QSize &newSize, bool preserveAspect=false)
void Reflect (ReflectAxis axis, int shear, int scale, int length, int spacing=0)
void ToGreyscale ()
void SetID (unsigned int id)
unsigned int GetID (void) const
void SetFileName (QString fname)
QString GetFileName (void) const
void setIsReflected (bool reflected)
void SetIsInCache (bool bCached)

Static Public Member Functions

static MythImageGradient (MythPainter *painter, const QSize &size, const QColor &beg, const QColor &end, uint alpha, FillDirection direction=FillTopToBottom)
 Create a gradient image.

Protected Member Functions

virtual ~MythImage ()

Static Protected Member Functions

static void MakeGradient (QImage &image, const QColor &begin, const QColor &end, int alpha, bool drawBoundary=true, FillDirection direction=FillTopToBottom)

Protected Attributes

bool m_Changed
MythPainterm_Parent
int m_RefCount
QMutex m_RefCountLock
bool m_isGradient
QColor m_gradBegin
QColor m_gradEnd
int m_gradAlpha
FillDirection m_gradDirection
bool m_isReflected
bool m_isYUV
unsigned int m_imageId
QString m_FileName
bool m_cached

Static Protected Attributes

static MythUIHelperm_ui = NULL

Detailed Description

Definition at line 30 of file mythimage.h.


Constructor & Destructor Documentation

MythImage::MythImage ( MythPainter parent  ) 

Definition at line 28 of file mythimage.cpp.

MythImage::~MythImage (  )  [protected, virtual]

Definition at line 56 of file mythimage.cpp.


Member Function Documentation

MythPainter* MythImage::GetParent ( void   )  [inline]

Definition at line 35 of file mythimage.h.

Referenced by MythPainter::CheckFormatImage().

void MythImage::SetParent ( MythPainter parent  )  [inline]

Definition at line 36 of file mythimage.h.

Referenced by MythPainter::CheckFormatImage().

void MythImage::UpRef ( void   ) 
bool MythImage::DownRef ( void   ) 
int MythImage::RefCount ( void   ) 

Definition at line 92 of file mythimage.cpp.

Referenced by ImageLoader::LoadImage().

virtual void MythImage::SetChanged ( bool  change = true  )  [inline, virtual]
bool MythImage::IsChanged (  )  const [inline]
bool MythImage::IsGradient (  )  const [inline]

Definition at line 45 of file mythimage.h.

bool MythImage::IsReflected (  )  const [inline]

Definition at line 46 of file mythimage.h.

Referenced by MythUIImage::SetImage(), and MythUIImage::SetImages().

void MythImage::SetToYUV ( void   )  [inline]
void MythImage::ConvertToYUV ( void   ) 

Definition at line 391 of file mythimage.cpp.

Referenced by VideoOutput::DisplayOSD(), and MythYUVAPainter::DrawImage().

void MythImage::Assign ( const QImage &  img  ) 
void MythImage::Assign ( const QPixmap &  pix  ) 

Definition at line 122 of file mythimage.cpp.

bool MythImage::Load ( MythImageReader reader  ) 
bool MythImage::Load ( const QString &  filename,
bool  scale = true 
)

Definition at line 272 of file mythimage.cpp.

void MythImage::Resize ( const QSize &  newSize,
bool  preserveAspect = false 
)
void MythImage::Reflect ( ReflectAxis  axis,
int  shear,
int  scale,
int  length,
int  spacing = 0 
)
void MythImage::ToGreyscale (  ) 
MythImage * MythImage::Gradient ( MythPainter painter,
const QSize &  size,
const QColor &  beg,
const QColor &  end,
uint  alpha,
FillDirection  direction = FillTopToBottom 
) [static]

Create a gradient image.

Parameters:
size The size of the image.
begin The beginning colour.
end The ending colour.
Returns:
A MythImage filled with a gradient.

Definition at line 368 of file mythimage.cpp.

void MythImage::SetID ( unsigned int  id  )  [inline]

Definition at line 74 of file mythimage.h.

unsigned int MythImage::GetID ( void   )  const [inline]

Definition at line 75 of file mythimage.h.

void MythImage::SetFileName ( QString  fname  )  [inline]

Definition at line 77 of file mythimage.h.

Referenced by Load().

QString MythImage::GetFileName ( void   )  const [inline]

Definition at line 78 of file mythimage.h.

Referenced by MythUIImage::SetImage().

void MythImage::setIsReflected ( bool  reflected  )  [inline]

Definition at line 80 of file mythimage.h.

Referenced by ImageLoader::LoadImage().

void MythImage::SetIsInCache ( bool  bCached  ) 

Definition at line 98 of file mythimage.cpp.

Referenced by MythUIHelper::CacheImage().

void MythImage::MakeGradient ( QImage &  image,
const QColor &  begin,
const QColor &  end,
int  alpha,
bool  drawBoundary = true,
FillDirection  direction = FillTopToBottom 
) [static, protected]

Definition at line 325 of file mythimage.cpp.

Referenced by Gradient(), Reflect(), and Resize().


Member Data Documentation

Definition at line 91 of file mythimage.h.

Referenced by MythImage().

Definition at line 92 of file mythimage.h.

Referenced by MythImage(), and ~MythImage().

int MythImage::m_RefCount [protected]

Definition at line 94 of file mythimage.h.

Referenced by Assign(), DownRef(), MythImage(), RefCount(), SetIsInCache(), and UpRef().

QMutex MythImage::m_RefCountLock [protected]

Definition at line 95 of file mythimage.h.

Referenced by Assign(), DownRef(), RefCount(), SetIsInCache(), and UpRef().

Definition at line 97 of file mythimage.h.

Referenced by Gradient(), MythImage(), and Resize().

QColor MythImage::m_gradBegin [protected]

Definition at line 98 of file mythimage.h.

Referenced by Gradient(), MythImage(), and Resize().

QColor MythImage::m_gradEnd [protected]

Definition at line 99 of file mythimage.h.

Referenced by Gradient(), MythImage(), and Resize().

int MythImage::m_gradAlpha [protected]

Definition at line 100 of file mythimage.h.

Referenced by Gradient(), MythImage(), and Resize().

Definition at line 101 of file mythimage.h.

Referenced by Gradient(), MythImage(), and Resize().

Definition at line 103 of file mythimage.h.

Referenced by MythImage(), and Reflect().

bool MythImage::m_isYUV [protected]

Definition at line 104 of file mythimage.h.

Referenced by ConvertToYUV(), and MythImage().

unsigned int MythImage::m_imageId [protected]

Definition at line 106 of file mythimage.h.

Referenced by MythImage().

QString MythImage::m_FileName [protected]

Definition at line 108 of file mythimage.h.

Referenced by MythImage().

MythUIHelper * MythImage::m_ui = NULL [static, protected]

Definition at line 110 of file mythimage.h.

Referenced by Assign(), DownRef(), MythImage(), SetIsInCache(), and UpRef().

Definition at line 111 of file mythimage.h.

Referenced by Assign(), DownRef(), MythImage(), SetIsInCache(), and UpRef().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:16 2012 for MythTV by  doxygen 1.6.3