[root] / trunk / gui / gui / src / TGPicture.cxx Repository:
ViewVC logotype

Log of /trunk/gui/gui/src/TGPicture.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 34286 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 1 20:38:57 2010 UTC (4 years, 6 months ago) by rdm
File length: 13757 byte(s)
Diff to previous 31681
fix format errors related to TString::Form(), TString::Format(), Form()
and Printf().

Revision 31681 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 8 15:58:57 2009 UTC (5 years, 1 month ago) by bellenot
File length: 13762 byte(s)
Diff to previous 23115
- More protections (coverity)

Revision 23115 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 10 13:35:37 2008 UTC (6 years, 9 months ago) by rdm
File length: 13638 byte(s)
Copied from: trunk/gui/src/TGPicture.cxx revision 23114
Diff to previous 22419
moved to directory "gui" the following directories:

fitpanel, ged, gui, guibuilder, guihtml, qtgsi, qtroot, sessionviewer

Revision 22419 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 3 00:25:01 2008 UTC (6 years, 10 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13638 byte(s)
Diff to previous 20882
From Andrew Savchenko:
ROOT can not be compiled with gcc-4.3.
Some ROOT source files doesn't contain required #include directives,
for example, they use strlen(), but #include <string.h> is missed or
malloc() is used and #include <stdlib.h> is missed. 

Earlier versions of gcc allowed some headers to be included implicitly,
but issued a warning (-Wimplicit-function-declaration). Newer one,
gcc-4.3 denies such silly behaviour: all required headers must be explicitly
included. 

Attached patch fixes this. Also it fixes another issue, which disallows
ROOT to compile under gcc-4.3: C functions don't belong to namespace std,
so expressions like std::memcpy() are no longer valid and plain memcpy()
should be used instead.

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13618 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13618 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13670 byte(s)
Diff to previous 15742
remove :$ from tag line

Revision 15742 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 9 05:27:55 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13680 byte(s)
Diff to previous 15173
From Eddy:
Fix many typos in comments

Revision 15173 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 24 18:20:12 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13675 byte(s)
Diff to previous 15134
Fix coding conventions violations

Revision 15134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13617 byte(s)
Diff to previous 13278
From Federico Carminati:

"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."

Revision 13278 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 17 19:09:28 2005 UTC (9 years, 2 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13108 byte(s)
Diff to previous 12199
From Ilka:
code style fixes (comments, descriptions and identation).

Revision 12199 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 26 23:37:27 2005 UTC (9 years, 6 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13057 byte(s)
Diff to previous 12179
cosmetics.

Revision 12179 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 24 12:27:30 2005 UTC (9 years, 7 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 12973 byte(s)
Diff to previous 12101
From Ilka, Valeri & Valeriy

TCanvas.cxx:
  - Minory mods which allow to solve QtRoot Canvas activation problems (move "
Set Pad parameters" to the    beginning).

TPad.cxx:
  - The current Pad is saved using TVirtualX::WritePixmap method to allow ROOT to
save pixmap under Qt even no TImage class implementation is provided.
TGPicture.cxx:
  - Removed QtRoot specific code.

TGQt.h:
  - Add as a "friend class" TQtClientGuard and a new IsRegistered method for
extra protection.

TGQt.cxx:
  - Restore the initial state of 4.04. and a new guard method IsRegisitered
added.
  - the following GUI related methods moved to GQtGUI.cxx source code:
unsigned char *GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w =
0, UInt_t h = 0);
    Pixmap_t       CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t
height);
    Window_t       GetCurrentWindow() const;
  - Fixed later assignment of canvas for TQtWidget object. That allows to fix
initialization problems for     TRootEmbeddedCanavs under QtRoot.

TVirtualX.interface.h:
  - Add the three new methods listed above

GQTGui.cxx:
  - Compilation warning removed
  - 3 methods listed above moved from TGQt.cxx (by Onuchine to back ASImage)
  - GetWidbiwID  - restored the original version and lift a protection against
the Windows_t misuse.                    That is  errore prone correction - to be
revised

TQtClientGuard.cxx:
  - An extra protection to check whether the widget is registered

Revision 12101 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 21 17:09:26 2005 UTC (9 years, 7 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 14166 byte(s)
Diff to previous 11911
From Valeriy and Ilka:

The last patch of Valeriy with some additional comments by Ilka:

- TVirtualX/TGWin32/TGWin32VirtualXProxy, TGQt new methods added
 o unsigned char *GetColorBits(Drawable_t  wid, Int_t  x, Int_t  y,  UInt_t w, U
   Int_t h)rns an array of pixels created from a part of drawable (defined by x, y,
     w, h)n format:  b1, g1, r1, 0,  b2, g2, r2, 0 ... bn, gn, rn, 0 ..
     Pixels are numbered from left to right and from top to bottom.
     By default all pixels from the whole drawable are returned.
     Note that return array is 32-bit aligned

  o Pixmap_t CreatePixmapFromData(unsigned char * bits, UInt_t  width,  UInt_t h
          eight)create pixmap from RGB data. RGB data is in format :
          b1, g1, r1, 0,  b2, g2, r2, 0 ... bn, gn, rn, 0 ..
       Pixels are numbered from left to right and from top to bottom.
       Note that data must be 32-bit aligned

- TGQt (*provided changes do not work; I cannot run rose_image.C tutorials under
 tRoot because of SegV in:
#3  0x0114172a in TGQt::GetWindowID (this=0xa1a2ab8, id=4)
    at qt/src/GQtGUI.cxx:507
#4  0x01b56914 in TASImage::Paint (this=0xaa80d68, option=0xac85d1c "xxx")
    at asimage/src/TASImage.cxx:1047
#5  0x02ddc948 in TPad::PaintModified (this=0xacb85d8)
    at gpad/src/TPad.cxx:2396
#6  0x02ddc834 in TPad::PaintModified (this=0xac1f108)
    at gpad/src/TPad.cxx:2381
#7  0x02db7cdb in TCanvas::Update (this=0xac1f108)
    at gpad/src/TCanvas.cxx:1858
*
TGQt::GetWindowID (this=0xa1a2ab8, id=4)  at qt/src/GQtGUI.cxx:507

    o  corrected an implementation  of "Window_t TGQt::GetWindowID(Int_t id)"
        That allows to run rose_image.C tutorials under QtRoot
    o implemented TGQt::GetCurrentWindow()
        That allows to save canvas/pad in in image formats  by using TASImage cl

- TImage/TASImage:

  o new method added PaintImage(Drawable_t wid, Int_t x, Int_t y) which allows t
  o the Draw option which allows to expand image to the pad size was renamed fro
  o new Draw/Paint option added -  if "z" is specified an image palette is drawn
  o TAttImage: SetPaletteEnabled/IsPaletteEnabled introduced - which allows to s
  o image convertion to gray is now "toggable"
  o new method :PaintImage(Drawable_t wid, Int_t x, Int_t y) introduced which al

- tutorials/galaxy_image.C. Unnecessary "img->SetName("n4254"); was removed

- TPad::Print - remove QtRoot specific code

- TToggle - "sanity" check added

- TGPicture.cxx - *added QtRoot specific code by gVirtualX->InheritsFrom("TGQt")

Revision 11911 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 30 22:38:39 2005 UTC (9 years, 7 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 12972 byte(s)
Diff to previous 11898
From Valeriy:
TGPicture:
 - fix deallocation autogenerated disabled pictures. That allows to fix
   seg. violation after running $ROOTSYS/test/stress reported by Markus Frank.

   An important comment was added to constructor
     TGPicture(const char *name, Pixmap_t pxmap, Pixmap_t mask)
     "both pixmaps pxmap and mask must be unique (not shared)"

 - new method  TGPicturePool::GetPicture(const char *name, char **xpm) added
   that allows to create pictures from in-memory XPM array
   Example:
     #include "myicon.xpm" // contains static char** myicon {..} array
     const TGPicture *pic = gClient->GetPicturePool()->GetPicture("myicon",
                                                                  myicon);
TGButton:
 - new method SetEnablled added which allows to activate/deactivate
   enabled/disabled state of button

TASImage/TImage:
 - Few new vector graphics methods added:
   DrawCubeBezier, DrawStraightEllips, DrawCircle, DrawEllips,DrawEllips2
   ToGray method, which allows to convert RGB image to Gray image

TImageDump:
  - open circle polymarkers are implemented

Revision 11898 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 27 12:24:44 2005 UTC (9 years, 8 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 11735 byte(s)
Diff to previous 11885
From Valeriy:
-TASImage:
  o CreateThumbnail() - add more contrastness to generated thumbnails
  o GetMask() - gVirtualX->CreateBitmap requires a width of input bitmap to be
    even to 8 . This mod fixes the problem of XPM images reading.

- TGListView - more corrections in adjusting page position after
  changing vew mode.

- TGPicture. Prblem with reading XPM files via TImage is fixed
  (TASImage::GetMask) I removed platform dependent code.

- TRootBrowser
   o minory mod in dynamic thumbnal generation
   o possibility to navigate through "browsing  history" added.
   o 3 new buttons added to ROOT browser toolbar -
     "Back", "Forward", "Refresh"

- root.mimes - minory mods.

Revision 11885 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 26 13:38:46 2005 UTC (9 years, 8 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 14395 byte(s)
Diff to previous 11862
fix some small memory leak and a bug in case image file does not exist.

Revision 11862 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 24 20:05:10 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 14241 byte(s)
Diff to previous 11813
From Valeriy Onuchin:
- root.mimes. Default actions changed for some image types (*.png, *.gif,
*.jpg etc.)
  Drawing images in canvas is better than  drawing it as TGPictureButton.
  Image drawn in canvas can be processed via context menu,  scaled, resized
etc.

- TPad::Print - roll-back recent changes in GIF saving. Use again
TVirtualX::WriteGIF
    method for saving GIF files which produces much smaller  files.
   BTW,  the patent on LZW compression  was expired july 2004. So, making
GIF is now legal.

- TGMimeTypes - fix nasty typo-bug in GetIcon method.  The  effect of the
bug was appeared as
   no large icons were displayed for  qq.png, qq.gif etc.  files types.

- TGPicture - minory mods

-   TGFileContainer::GetFilePictures - optimised for speed. To test a gain
in performance -
     run TBrowser on slow computer and open up $ROOTSYS/icons directory.
     New data member TGFileContainer::fCachePictures was added which allows
     to switch on/off this mechanism.

- TRootBrowser.  Weired "refresh behavior" was fixed - when some macro was
   browsed/executed and then canvas was deleted, browser's icon box was
refreshed and
   currrent "page position" was changed to the most upper one.
   Now page position remains on the same place.

- Refresh TBrowser on F5 pressed action added.

- TGLVEntry - SetPictures method added, whic allows to change  list view
entry pictures  dynamically.

- TSystemFile. SetIconName, GetIconName methods addd

Revision 11813 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 18 12:31:10 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13993 byte(s)
Diff to previous 11795
From Valeriy Onuchin:

this patch fixes all compilation problems for
ROOT under windows with VC6 compiler.

- The main problem is that VC6 compiler does not recognize
"long long" type in rootcint generated dictionaries,
To fix this, wherever "long long" type was writen in dictionary file it was
replaced with native win32 "long long" type_string "__int64".
Modified files are: cint/src/val2a.c, cint/src/newlink.c, cint/src/Class.cxx

Other changes:
- many  classes contained "list" variables.
  That produced name_clash with  std::list class name.
- many classes contained
 for (int i=0; ..) {..}
 for (int i=0; ..) {..}
 which caused "duplication of initialisation" bug.

- gl/src/CsgOps.cxx had outside declared templated parameter used inside
  internal function.
- TString Atoi, Atof - std namespace was removed.

_ TASimage - custom Streamer was changed. Reading/writing class version
   was added. That allows to keep "future compatibility"/"schema evolution"
   Demo files galaxy.root, gallery.root were rewritten.

- I rolled back changes in TGPicture class which are related to reading
   of XPM files because of problems under win32.

- TASImage::GetMask method was reimplemented.

- libAfterImage.tar.gz - fix all compilation problem under win32 (vc6)

Revision 11795 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun May 15 07:30:17 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 10329 byte(s)
Diff to previous 11793
From Valeriy Onuchin:
- TASImage, TRootBrowser, TGMimeTypes.cxx
  The size of image thumbnail was enlarged from 32x32 to 64x64 pixels.
  Appearance of picture thumbnails was much improved.
- TGPicture. Fix possible buffer overflow in HashName method.
- TRootCanvas.  Possibility to save canvas in XCF format added.
  This format is used in the GIMP (image processing  program).

In general the new method of dynamical creation of object's icon can be
extended for any kind of objects.

Revision 11793 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun May 15 05:53:45 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 10329 byte(s)
Diff to previous 10701
From Valeriy Onuchin:
- TASImage class:

 o new method GetImageBuffer is introduced. It returns in-memory buffer
compressed according to the  image type.
Buffer must be deallocated after usage.
This method can be used for sending images over the network.

o new method SetImageBuffer introduced. It creates image from  compressed
buffer. Supported formats:
       PNG - by default
       XPM - two options exist:
      1.  xpm as a single string (raw buffer). Such a string
             is returned by GetImageBuffer method.

      For example:

       char *buf;
       int sz;
       im1->GetImageBuffer(&buf, &int, TImage::kXpm); /*raw buffer*/
       TImage *im2 = TImage::Create();
       im2->SetImageBuffer(&buf, TImage::kXpm);

      2.  xpm as an array of strigs (preparsed)
      For example:
       char *xpm[] = {
          "64 28 58 1",
          "  c #0A030C",
          ". c #1C171B"
             ...
    TImage *im = TImage::Create();
    im->SetImageBuffer(xpm, TImage::kXpm);

o custom Streamer was implemented. That allows to save images in ROOT files.
   Image's  thumbnail is also saved into a file.

o galaxy_image.C tutorial is modified according to new  saving schema.

o new demo file gallery.root added to tutorials. It contains thumbnailed
and browsable pictures produced by some ROOT tutorials.

o fix bug im TASImage::DrawRectangle methods. Thanks to Thomas Bretz
  for reporting it.


- TKey class.
  Possibility to save thumbnail/icon  as XPM string along  with object added.
  Currently such mechanism is used for saving thumbnailed images.


- TGPicture.  Platform-dependent code was removed. Now  TGPictures
  are created by TImage objects.


- TRootBrowser classes. Possibility  to show objects with dynamically created
  icons added.

- numerous bug fixes in libAfterImage library.

Revision 10701 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 7 15:34:27 2004 UTC (10 years, 1 month ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13980 byte(s)
Diff to previous 10337
From Valeriy Onuchin:

- massive update of TImage/TASImage class.
- update rose_image.C macro to demonstrate new features.
- new example hist2image.C added

  I'll try to add more example and documentation asap.

- bug fixes in ROOT gui builder
- TGToolBar, TGShutter now "compatible" with hierarchical cleaning
- mods in TGPicture allow create masked pictures from images.

Revision 10337 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 18 12:47:28 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 13519 byte(s)
Diff to previous 9830
From Valeriy Onuchin:
-  new method GetPicture added to TImage,TASImage classes
  That allows to create TGPicture not only from XPM files but
  also from png, jpg, gif, tiff files.

 An example, of usage:

 TImage *img = TImage::Open("rose512.jpg");
 const TGPicture *pic = img->GetPicture();

 TGPictureButton *btn = new TGPictureButton(parent, pic)

- TGPicturePool::GetPicture(const char *name, Pixmap_t pxmap) added
  That allows to create TGPicture from given pixmap. For example, that will allow,
   to create TGPicture from TPad.

- TGPicturePool::GetPicture(const char *name) return picture for supported
  image formats xpm, png, jpg, gif, tiff
  Now it's possible to create TGPictureButton, TGImageMap from files of  these formats.

- default ROOT browser actions changed for png, jpg, gif, tiff files. That allows
  to browse these file with TBrowser

Revision 9830 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 24 09:46:41 2004 UTC (10 years, 5 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 12132 byte(s)
Diff to previous 9814
ExpandPathName() returns a char* and not a const char*.

Revision 9814 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 21 09:32:52 2004 UTC (10 years, 5 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 12145 byte(s)
Diff to previous 9478
fix memory leak in GetPicture().

Revision 9478 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 9 12:47:02 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 12080 byte(s)
Diff to previous 9476
The variable Bool_t retc was defdined twice and could be unitialized

Revision 9476 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 9 12:34:45 2004 UTC (10 years, 6 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 12093 byte(s)
Diff to previous 8666
removed compile time ifdef R__QT and GDK_WIN32 by using run time check
using gVirtualX->InheritsFrom("TGX11") or "TGQt".

Revision 8666 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 23 06:37:09 2004 UTC (10 years, 9 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 11837 byte(s)
Diff to previous 8609
From Valeri Fine
I still need you replace in
TGPicture *TGPicturePool::GetPicture

#ifdef GDK_WIN32

            with

#if defined(GDK_WIN32) || defined(R__QT)

Revision 8609 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 20 06:49:37 2004 UTC (10 years, 9 months ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 11812 byte(s)
Diff to previous 8228
In TGPicturePool::GetPicture invert the logic with #ifndef GDK_WIN32

Revision 8228 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 18 16:17:33 2004 UTC (10 years, 11 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 11814 byte(s)
Diff to previous 7755
From Valeriy:
use gClient->GetDefaultRoot() instead of GetRoot(). This allows the widgets
to be embedded but ensures popups to still be a child of the real X11 root
window.

Revision 7755 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 15 08:54:29 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/gui/src/TGPicture.cxx
File length: 11778 byte(s)
Diff to previous 6663
From Valeriy Onuchin


- few improvements from my todo list:
   o TGButton, TGLabel
       SetTextColor, SetFont methods added.
       Font, color can be changed globally (for every frame of some type),
       or locally (for some particular frame) - default option
   o TGNumberEntry
       Accelerate the speed for changing numbers when button is
       permanently pressed
  o TGPicture (inspired by Ilka's  recent changes)
       for picture specified by file name mods added:
       pname = gSystem->ExpandPathName(gSystem->UnixPathName(pname.Data()));
  o TGResourcePool
       add current directory to the icon_path for WIN32GDK
  o  cosmetic changes in WorldMap.C example
        This tutorial is now working under win32gdk
  o TGWin32, TGWin32ProxyBase
       Anather try to fix a problem reported by Ed Oltman recently

Revision 6663 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 28 11:55:32 2003 UTC (11 years, 8 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 11456 byte(s)
Diff to previous 3317
major changes in the resource management of the GUI classes. Introduced the
new class TGResourcePool which loads and keeps track of the 3 main resource
pools: fonts, picture and graphics contexts. Fonts are now handled via the
new TGFont class (and TGFontPool). In the past the loading of these resources
was done in TGClient and required all GUI classes to have TGClient as friend
to have their global statics initialized by TGClient. Adding a new widget
required TGClient.cxx to be changed too. This was obviously not good.
In addition it is now possible to find the full definition of the original
resource back based on a resource handle (GContext_t or FontStruct_t yielding
a TGGC or TGFont) which is needed for the SavePrimitive() functionality.

The resource pool can be found via TGClient (e.g. gClient->GetResourcePool()).
To see all active graphics contexts, fonts and pictures do:
   gClient->GetResourcePool()->GetGCPool()->Print()
   gClient->GetResourcePool()->GetFontPool()->Print()
   gClient->GetResourcePool()->GetPicturePool()->Print()
For more examples see the widget source code.

These changes are largely backward compatible except maybe for some low
level 3rd party widgets that use some TGFrame internals. In these cases
the following sed command will patch the code:
   sed -e "s/fgBlackGC()/GetBlackGC()()/g" \
       -e "s/fgWhiteGC()/GetWhiteGC()()/g" \
       -e "s/fgHilightGC()/GetHilightGC()()/g" \
       -e "s/fgShadowGC()/GetShadowGC()()/g" \
       -e "s/fgBckgndGC()/GetBckgndGC()()/g" \
       widget.cxx > widget.cxx.new

Revision 3317 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 28 16:05:42 2001 UTC (13 years, 1 month ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 10277 byte(s)
Diff to previous 685
win32gdk case added

Revision 685 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 29 08:57:05 2000 UTC (14 years, 3 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 9990 byte(s)
Diff to previous 3
many change connected with the introduction of the TGGC (graphics context)
class (all backward compatible). Also many of the static default GC's and
fontstructs are now available to the user. This can simplify code in many
places. See change in guitest.cxx.

Revision 3 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: trunk/gui/src/TGPicture.cxx
File length: 9998 byte(s)
Copied from: branches/rdm/gui/src/TGPicture.cxx revision 2
Diff to previous 2
This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.

Revision 2 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: branches/rdm/gui/src/TGPicture.cxx
File length: 9998 byte(s)
Initial import of ROOT into CVS

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9