86 TString ext = strrchr(pname,
'.');
144 TString ext = strrchr(pname,
'.');
187 img->
Scale(new_width, new_height);
210 gVirtualX->GetWindowSize(pxmap, xy, xy, w, h);
243 while (isspace((
int)*ptr)) ++ptr;
246 while (isspace((
int)*ptr)) ++ptr;
308 Info(
"Print",
"no pictures in picture pool");
322 fAttributes.fColormap =
gClient->GetDefaultColormap();
323 fAttributes.fCloseness = 40000;
325 fAttributes.fPixels = 0;
326 fAttributes.fDepth = 0;
327 fAttributes.fNpixels = 0;
328 fAttributes.fXHotspot = 0;
329 fAttributes.fYHotspot = 0;
331 gVirtualX->GetWindowSize(fPic, xy, xy, fAttributes.fWidth, fAttributes.fHeight);
347 gVirtualX->CopyArea(fPic,
id, gc, 0, 0, fAttributes.fWidth, fAttributes.fHeight,
363 if (fAttributes.fPixels)
364 delete [] fAttributes.fPixels;
375 hashName.
Form(
"%s__%dx%d", name, width, height);
376 return hashName.
Data();
385 fScaled ?
" scaled, " :
" ", References(), fPic);
static const char * HashName(const char *name, Int_t width, Int_t height)
Static function returning a unique name used to look up a picture.
void SetForeground(Pixel_t v)
Set foreground color.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void ToLower()
Change string to lower-case.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
PictureAttributes_t fAttributes
An abstract interface to image processing library.
virtual ~TGSelectedPicture()
Delete selected picture.
virtual Pixmap_t GetPixmap()
TGSelectedPicture(const TGSelectedPicture &gp)
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
virtual void Scale(UInt_t, UInt_t)
void Draw(Option_t *="")
Default Draw method for all objects.
const char * Data() const
void SetBackground(Pixel_t v)
Set background color.
THashTable implements a hash table to store TObject's.
static TGGC * fgSelectedGC
void Print(Option_t *option="") const
Print picture info.
void FreePicture(const TGPicture *pic)
Remove picture from cache if nobody is using it anymore.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
void SetStipple(Pixmap_t v)
Set 1 plane pixmap for stippling.
Colormap_t GetDefaultColormap() const
R__EXTERN TSystem * gSystem
const Mask_t kGCClipXOrigin
void SetFillStyle(Int_t v)
Set fill style (kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled).
virtual ~TGPicture()
Delete picture object.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
const Mask_t kGCClipYOrigin
TSubString Strip(EStripType s=kTrailing, char c= ' ') const
Return a substring of self stripped at beginning and/or end.
static TGGC & GetSelectedGC()
Return selection graphics context in use.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Pixmap_t GetPicture() const
virtual ~TGPicturePool()
Delete picture cache.
virtual const char * GetName() const
Returns name of object.
virtual Pixmap_t GetMask()
TGPicture(const char *name, Bool_t scaled=kFALSE)
void Add(TObject *obj)
Add object to the hash table.
void SetAttributes(GCValues_t *values)
Set attributes as specified in the values structure.
Mother of all ROOT objects.
void Delete(Option_t *option="")
Remove all objects from the table AND delete all heap based objects.
TObject * FindObject(const char *name) const
Find object using its name.
void Print(Option_t *option="") const
List all pictures in the pool.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
TGPicturePool & operator=(const TGPicturePool &)
assignment operator
const Mask_t kPACloseness
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
void SetClipMask(Pixmap_t v)
Bitmap for clipping.
TObject * Remove(TObject *obj)
Remove object from the hashtable.