87 TString ext = strrchr(pname,
'.');
145 TString ext = strrchr(pname,
'.');
188 img->
Scale(new_width, new_height);
211 gVirtualX->GetWindowSize(pxmap, xy, xy, w, h);
244 while (isspace((
int)*ptr)) ++ptr;
247 while (isspace((
int)*ptr)) ++ptr;
312 Info(
"Print",
"no pictures in picture pool");
326 fAttributes.fColormap =
gClient->GetDefaultColormap();
327 fAttributes.fCloseness = 40000;
329 fAttributes.fPixels = 0;
330 fAttributes.fDepth = 0;
331 fAttributes.fNpixels = 0;
332 fAttributes.fXHotspot = 0;
333 fAttributes.fYHotspot = 0;
335 gVirtualX->GetWindowSize(fPic, xy, xy, fAttributes.fWidth, fAttributes.fHeight);
351 gVirtualX->CopyArea(fPic,
id, gc, 0, 0, fAttributes.fWidth, fAttributes.fHeight,
367 if (fAttributes.fPixels)
368 delete [] fAttributes.fPixels;
379 hashName.
Form(
"%s__%dx%d", name, width, height);
380 return hashName.
Data();
389 fScaled ?
" scaled, " :
" ", References(), fPic);
void Print(Option_t *option="") const
List all pictures in the pool.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
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.
TGPicturePool(const TGPicturePool &)
copy constructor
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
void SetForeground(Pixel_t v)
Set foreground color.
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.
void SetBackground(Pixel_t v)
Set background color.
THashTable implements a hash table to store TObject's.
static TGGC * fgSelectedGC
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.
Pixmap_t GetPicture() 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.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
const Mask_t kGCClipYOrigin
static TGGC & GetSelectedGC()
Return selection graphics context in use.
void Print(Option_t *option, Int_t recurse) const
Print the collection header and its elements.
TObject * FindObject(const char *name) const
Find object using its name.
virtual ~TGPicturePool()
Delete picture cache.
virtual Pixmap_t GetMask()
void Print(Option_t *option="") const
Print picture info.
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.
Colormap_t GetDefaultColormap() const
void Delete(Option_t *option="")
Remove all objects from the table AND delete all heap based objects.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
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 ~.
virtual const char * GetName() const
Returns name of object.
void SetClipMask(Pixmap_t v)
Bitmap for clipping.
TObject * Remove(TObject *obj)
Remove object from the hashtable.
const char * Data() const