library: libGui #include "TGPicture.h"

# TGPicture

class description - source file - inheritance tree (.pdf)

## class TGPicture : public TObject, public TRefCnt

| Inheritance Chart:
`TObject`
`TRefCnt`
| <- | `TGPicture` |
<- |
`TGSelectedPicture` |

        protected:

                       TGPicture(const char* name, Bool_t scaled = kFALSE)
                       TGPicture(const char* name, Pixmap_t pxmap, Pixmap_t mask = 0)
          virtual void Draw(Option_t* = "")

        public:

                              TGPicture(const TGPicture&)
                      virtual ~TGPicture()
               static TClass* Class()
                 virtual void Draw(Handle_t id, GContext_t gc, Int_t x, Int_t y) const
                       UInt_t GetHeight() const
                     Pixmap_t GetMask() const
          virtual const char* GetName() const
                     Pixmap_t GetPicture() const
                       UInt_t GetWidth() const
              virtual ULong_t Hash() const
           static const char* HashName(const char* name, Int_t width, Int_t height) const
              virtual TClass* IsA() const
                       Bool_t IsScaled() const
                   TGPicture& operator=(const TGPicture&)
                 virtual void Print(Option_t* option = "") const
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

                      TString fName        name of picture
                       Bool_t fScaled      kTRUE if picture is scaled
                     Pixmap_t fPic         picture pixmap
                     Pixmap_t fMask        picture mask pixmap
          PictureAttributes_t fAttributes  picture attributes

## Class Description

     TGPicture & TGPicturePool

     The TGPicture class implements pictures and icons used in the
     different GUI elements and widgets. The TGPicturePool class
     implements a TGPicture cache. TGPictures are created, managed and
     destroyed by the TGPicturePool.

TGPicture(const char *name, Pixmap_t pxmap, Pixmap_t mask)

     ctor. Important: both pixmaps pxmap and mask must be unique (not shared)

void Draw(Handle_t id, GContext_t gc, Int_t x, Int_t y) const

     Draw a picture.

~TGPicture()

     Delete picture object.

const char* HashName(const char *name, Int_t width, Int_t height)

     Static function returning a unique name used to look up a picture.
     The unique name has the form "name__widthxheight".

void Print(Option_t *) const

     Print picture info.

### Inline Functions

              TGPicture TGPicture(const char* name, Pixmap_t pxmap, Pixmap_t mask = 0)
            const char* GetName() const
                 UInt_t GetWidth() const
                 UInt_t GetHeight() const
               Pixmap_t GetPicture() const
               Pixmap_t GetMask() const
                 Bool_t IsScaled() const
                ULong_t Hash() const
                   void Draw(Handle_t id, GContext_t gc, Int_t x, Int_t y) const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
              TGPicture TGPicture(const TGPicture&)
             TGPicture& operator=(const TGPicture&)

Author: Fons Rademakers 01/01/98
Last update: root/gui:$Name: $:$Id: TGPicture.cxx,v 1.24 2005/06/26 23:37:27 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *