ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Attributes | List of all members
TAttImage Class Reference

TImage attributes.

Image attributes are:

This class is used (in general by secondary inheritance) by some other classes (image display).

Definition at line 108 of file TAttImage.h.

Public Types

enum  EImageQuality {
  kImgDefault = -1, kImgPoor = 0, kImgFast = 1, kImgGood = 2,
  kImgBest = 3
}
 

Public Member Functions

 TAttImage ()
 kTRUE - palette is drawn on the image More...
 
 TAttImage (EImageQuality lquality, UInt_t lcompression, Bool_t constRatio)
 TAttImage normal constructor. More...
 
virtual ~TAttImage ()
 TAttImage destructor. More...
 
void Copy (TAttImage &attline) const
 Copy this image attributes to a new attimage. More...
 
Bool_t GetConstRatio () const
 
UInt_t GetImageCompression () const
 
EImageQuality GetImageQuality () const
 
virtual const TImagePaletteGetPalette () const
 
virtual void ResetAttImage (Option_t *option="")
 Reset this image attributes to default values. More...
 
virtual void SaveImageAttributes (std::ostream &out, const char *name, EImageQuality qualdef=kImgDefault, UInt_t comprdef=0, Bool_t constRatiodef=kTRUE)
 Save image attributes as C++ statement(s) on output stream, but not the palette. More...
 
virtual void SetConstRatio (Bool_t constRatio=kTRUE)
 Set (constRatio = kTRUE) or unset (constRadio = kFALSE) the ratio flag. More...
 
virtual void SetPaletteEnabled (Bool_t on=kTRUE)
 
virtual void SetImageCompression (UInt_t lcompression)
 
virtual void SetImageQuality (EImageQuality lquality)
 
virtual void SetPalette (const TImagePalette *palette)
 Set a new palette for the image. More...
 
virtual void StartPaletteEditor ()
 Opens a GUI to edit the color palette. More...
 
virtual void EditorClosed ()
 
Bool_t IsPaletteEnabled () const
 

Protected Attributes

EImageQuality fImageQuality
 
UInt_t fImageCompression
 
Bool_t fConstRatio
 
TImagePalette fPalette
 
TPaletteEditorfPaletteEditor
 
Bool_t fPaletteEnabled
 GUI to edit the color palette. More...
 

#include <TAttImage.h>

Inheritance diagram for TAttImage:
[legend]

Member Enumeration Documentation

Enumerator
kImgDefault 
kImgPoor 
kImgFast 
kImgGood 
kImgBest 

Definition at line 112 of file TAttImage.h.

Constructor & Destructor Documentation

TAttImage::TAttImage ( )

kTRUE - palette is drawn on the image

TAttImage default constructor.

Calls ResetAttImage to set the attributes to a default state.

Definition at line 524 of file TAttImage.cxx.

TAttImage::TAttImage ( EImageQuality  lquality,
UInt_t  lcompression,
Bool_t  constRatio 
)

TAttImage normal constructor.

Image attributes are taken from the argument list

Parameters
[in]lqualitymust be one of EImageQuality (kImgDefault is same as kImgGood in the current implementation)
[in]lcompressiondefines the compression rate of the color data in the image. Speed and memory depends on this rate, but not the image display itself 0: no compression; 100: max compression
[in]constRatiokeeps the aspect ratio of the image constant on the screen (in pixel units)

Definition at line 544 of file TAttImage.cxx.

TAttImage::~TAttImage ( )
virtual

TAttImage destructor.

Definition at line 559 of file TAttImage.cxx.

Member Function Documentation

void TAttImage::Copy ( TAttImage attline) const

Copy this image attributes to a new attimage.

Definition at line 567 of file TAttImage.cxx.

virtual void TAttImage::EditorClosed ( )
inlinevirtual

Definition at line 152 of file TAttImage.h.

Referenced by TPaletteEditor::CloseWindow().

Bool_t TAttImage::GetConstRatio ( ) const
inline

Definition at line 134 of file TAttImage.h.

Referenced by TASImage::Paint().

UInt_t TAttImage::GetImageCompression ( ) const
inline
EImageQuality TAttImage::GetImageQuality ( ) const
inline
virtual const TImagePalette& TAttImage::GetPalette ( ) const
inlinevirtual

Definition at line 137 of file TAttImage.h.

Referenced by TASImage::Paint(), TASImage::SetImage(), and TASImage::SetPalette().

Bool_t TAttImage::IsPaletteEnabled ( ) const
inline

Definition at line 153 of file TAttImage.h.

void TAttImage::ResetAttImage ( Option_t option = "")
virtual

Reset this image attributes to default values.

Default values are:

  • quality: kImgPoor, (no smoothing while the image is zoomed)
  • compression: 0 (no compression)
  • constRatio: kTRUE
  • palette: a default rainbow palette

Definition at line 584 of file TAttImage.cxx.

Referenced by TAttImage().

void TAttImage::SaveImageAttributes ( std::ostream &  out,
const char *  name,
EImageQuality  qualdef = kImgDefault,
UInt_t  comprdef = 0,
Bool_t  constRatiodef = kTRUE 
)
virtual

Save image attributes as C++ statement(s) on output stream, but not the palette.

Definition at line 620 of file TAttImage.cxx.

void TAttImage::SetConstRatio ( Bool_t  constRatio = kTRUE)
virtual

Set (constRatio = kTRUE) or unset (constRadio = kFALSE) the ratio flag.

The aspect ratio of the image on the screen is constant if the ratio flag is set. That means one image pixel is always a square on the screen independent of the pad size and of the size of the zoomed area.

Definition at line 641 of file TAttImage.cxx.

Referenced by TMVA::draw_activation(), and TMVA::TMVAGlob::plot_logo().

virtual void TAttImage::SetImageCompression ( UInt_t  lcompression)
inlinevirtual

Definition at line 146 of file TAttImage.h.

virtual void TAttImage::SetImageQuality ( EImageQuality  lquality)
inlinevirtual

Definition at line 148 of file TAttImage.h.

void TAttImage::SetPalette ( const TImagePalette palette)
virtual

Set a new palette for the image.

If palette == 0 a default rainbow color palette is used.

Reimplemented in TASImage.

Definition at line 650 of file TAttImage.cxx.

Referenced by TASPaletteEditor::InsertNewPalette(), TASPaletteEditor::ProcessMessage(), TASImage::SetImage(), and TASImage::SetPalette().

virtual void TAttImage::SetPaletteEnabled ( Bool_t  on = kTRUE)
inlinevirtual

Reimplemented in TASImage.

Definition at line 145 of file TAttImage.h.

void TAttImage::StartPaletteEditor ( )
virtual

Opens a GUI to edit the color palette.

Reimplemented in TASImage.

Definition at line 686 of file TAttImage.cxx.

Referenced by TASImage::StartPaletteEditor().

Member Data Documentation

Bool_t TAttImage::fConstRatio
protected
UInt_t TAttImage::fImageCompression
protected
EImageQuality TAttImage::fImageQuality
protected
TImagePalette TAttImage::fPalette
protected

Definition at line 124 of file TAttImage.h.

Referenced by Copy(), GetPalette(), ResetAttImage(), SetPalette(), and TASImage::Vectorize().

TPaletteEditor* TAttImage::fPaletteEditor
protected

Definition at line 125 of file TAttImage.h.

Referenced by EditorClosed(), StartPaletteEditor(), TAttImage(), and ~TAttImage().

Bool_t TAttImage::fPaletteEnabled
protected
Collaboration diagram for TAttImage:
[legend]

The documentation for this class was generated from the following files: