Log of /trunk/graf2d/graf/inc/TImage.h
Parent Directory
Revision
23140 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 11 11:01:39 2008 UTC (6 years, 9 months ago) by
rdm
File length: 12749 byte(s)
Diff to
previous 23087
move the following directories to "graf2d":
asimage, freetype, gpad, graf, postscript, qt, win32gdk, x11, x11ttf
move the following directories to "graf3d":
eve, ftgl, g3d, gl, x3d
Revision
23087 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 9 14:10:56 2008 UTC (6 years, 9 months ago) by
rdm
Original Path:
trunk/graf/inc/TImage.h
File length: 12749 byte(s)
Diff to
previous 20882
From Alja, Bertrand and Matevz - merged branches/dev/fireworks 22550:23082.
Major changes imported by this merge are:
gl/
====
- reorganization of scene rendering in TGLViewer - render opaque
objects from all scenes first, then all transparent ones;
- improve saving of images from the GL-viewer so that the dialog boxes
and other windows do not result in black areas on the saved image;
- improved management of FTGL fonts accross GL contexts.
eve/
====
- new classes for visualization of calorimeter data in lego mode;
- allow fixed scale beyond given radius for fish-eye projections.
Revision
20500 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 26 10:59:06 2007 UTC (7 years, 3 months ago) by
brun
Original Path:
trunk/graf/inc/TImage.h
File length: 12666 byte(s)
Diff to
previous 19826
From valeriy:
o TASImage.h, TASImage.cxx, TImage.h
new method was introduced GetVecArray
Returns a pointer to internal array[width x height] of double values [0, 1]
This array is directly accessible. That allows to manipulate/change the image.
o TASImage::GetArray
Fix to return correct array (previously it was truncated when
x, y shift position were not zeros).
o TASImage::GetPolygonSpans
Fix segv when producing images from some Rene's macro.
o fix segv. when image is drawn in canvas and canvas resized.
o TAttImage.cxx
For "Pretty Palette with a Spectrum Violet->Red" set
white color to zeros.
Revision
18612 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 27 11:07:35 2007 UTC (7 years, 8 months ago) by
couet
Original Path:
trunk/graf/inc/TImage.h
File length: 12650 byte(s)
Diff to
previous 18059
- From V.Onuchin:
TImage::PaintImage:
extend this method to allow to draw a part of an image
on window (previously the whole image was drawn).
PaintImage(Drawable_t wid, Int_t x, Int_t y, Int_t xsrc, Int_t ysrc,
UInt_t wsrc, UInt_t hsrc);
where:
wid - a window where image is drawn
x,y - window coordinates where image is drawn
xsrc, ysrc, wsrc, hsrc - an image area to be drawn.
Revision
17365 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 16 17:01:08 2007 UTC (8 years ago) by
brun
Original Path:
trunk/graf/inc/TImage.h
File length: 12472 byte(s)
Diff to
previous 16520
From Axel:
Implemented TGObject::SaveAs(const char* filename = "", Option_t* option = "")
allowing to save TGObject to a file using TImage.
The file type is determined by the extension of the filename parameter.
I.e. fFrame->SaveAs("myframe.gif").
Revision
16404 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 2 16:12:39 2006 UTC (8 years, 3 months ago) by
brun
Original Path:
trunk/graf/inc/TImage.h
File length: 12404 byte(s)
Diff to
previous 15840
From Valeriy Onuchin:
- add possibility to create an animated GIF file from canvas
(in both GUI and batch mode).
It's possible to Print pad into an animated GIF file by specifying
the file name as "myfile.gif+" or "myfile.gif+NN" ,
where NN is the delay for displaying subimages during animation in 10ms units.
If NN is ommitted the delay between subimages is zero.
for (int i=0; i<10; ++i) {
// fill canvas for context
// ...
c1.Print("file.gif+"); // print canvas to GIF file
}// end loop
Revision
15191 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun May 28 20:08:00 2006 UTC (8 years, 7 months ago) by
brun
Original Path:
trunk/graf/inc/TImage.h
File length: 12337 byte(s)
Diff to
previous 13800
From valeriy Onuchine:
- TImage, TASImage
o Change return type of Vectorize method from "void" to "Double_t*".
o Implement FromWindow method under X11. This method allows to
create "snapshot image" from any ROOT window or frame.
- config/Makefile.depend
Add dependency of libGuiBld lib on libGraf.
GuiBuilder uses internally TImage/TASImage class.
- GX11Gui.cxx
X11 error handler was slightly modified.
Many X11 errors lead to freezing X11 server and
did not allow debugging.
To prevent freezing, a "forced seg.violation" was added
to the error handler.
The usage of the new "feature" is the following:
0. run "gdb root.exe"
1. set "gDebug = (int)gVirtualX" - that activates the new error handling.
2. run application which has X11 errors.
On X11 error the application was stopped by the "forced seg.violation".
3. "gdb>bt" - backtrace the problem.
!!! A big list of changes in libGui initiated by gui builder development !!!
- TGButton.h, TGButton.cxx
TGButton class:
o SetDown methods removed from context menu.
o SetEnabled method of context menu changed to TOGGLE.
Setting fWidgetFlags was added.
- TGTextButton class
o GetNormGC(), GetFontStruct() methods are introduced.
o SetFont removed from context menu.
o ChangeText(const char *title) was introduced and added to context menu.
o fixed an error in SetFont method which set font globally instead of
locally.
o SavePrimitive - save text justification
- TGPictureButton
o added getter method GetDisabledPicture()
- TGCanvas
o added to GuiBuilder widgets palette.
- TGColorDialog
o new methods:
- TGColorPalette *GetPalette(),
- TGColorPalette *GetCustomPalette(),
- void SetCurrentColor(Pixel_t col)
o new signal:
- void ColorSelected(Pixel_t)
o new parameter added to contructor "Bool_t wait".
If "wait" is kTRUE, "gClient->WaitForUnmap" is called internally
(normal/old usage). If "wait" is kFALSE - "gClient->WaitForUnmap"
should be called by user.
o few "usefull" colors added to "custom" palette.
- TGColorSelect
o added to GuiBuilder widgets palette.
- TGComboBox
o new methods:
- SortByName - allows to sort combobox entries by names.
- SetEnabled, IsEnabled.
- TGFontDialog was rewritten.
o Previous version worked under win32 only,
now it works on X11 also.
It allows to select any font available on the system.
o new parameter added to contructor "Bool_t wait".
If "wait" is kTRUE, "gClient->WaitForUnmap" is called internally
(normal/old usage). If "wait" is kFALSE - "gClient->WaitForUnmap"
should be called by user.
o new methods:
void SetFont(TGFont *font);
void SetColor(Pixel_t color);
void SetAlign(Int_t align);
void EnableAlign(Bool_t on = kTRUE);
void UpdateStyleSize(const char *family);
o new signals:
- FontSelected(char *font)
- AlignSelected(Int_t a)
- ColorSelected(Pixel_t c)
- TGFrame
o unused static member fgContextMenu removed.
- TGCompositeFrame
o TGCompositeFrame::SetEditDisabled modified. It is used for setting
fEditDisableXX attribute during gui buildind.
o ChangeSubframesBackground helper method was introduced.
- TGGroupFrame
o SetTextFont, SetTextColor methods were corrected for
"local" changing of the font.
- TGWindow
o kEditDisableKeyEnable added to EEditMode enum.
If this flag is set - window can handle keyboard events during gui
building.
- TGLabel
o new methods:
- GetNormGC, GetFontStruct
o fixed bugs in setting label's "local" text font.
o SavePrimitive - saving text justification added.
- TGListBox
o new methods:
- SortByName - allow to sort listbox entries by names.
- new auxilary/internal class TGLBFrameElement created.
It's used for ascending/descending sort of list box entries.
o reimplemented methods:
ChangeBackground, Layout, GetDefaultWidth
o disable changing layout manager in SetLayoutManager method.
Layout manager is not used for layout of list box.
- TGIcon
o SetImagePath method was corrected.
- TGScrollBarElement
o new methods:
- SetEnabled, IsEnabled. These methods are used in enabling/disabling
TGNumberEntry objects.
- TGScrollBar
o new getter methods:
- GetHead, GetTail, GetSlider
o new signals:
- PositionChanged, RangeChanged, PageSizeChanged
o ChangeBackground was reimplemented.
- TGShutter
o new methods:
- AddPage, RemovePage, RenamePage
o new signal Selected.
o disable changing layout manager in SetLayoutManager method.
Layout manager is not used for layout.
- TGView
o disable changing layout manager by SetLayoutManager method.
Layout manager is not used for layout.
o ChangeBackground(Pixel_t col) method added which changes background
color only of the canvas frame.
- TGNumberEntry
o more options added to context menu.
- TGProgressBar
o new getter/setter methods:
- GetBarColor, GetNormGC, GetFontStruct, SetForegroundColor.
- TGTab
o disable SetEditDisabled method to avoid changing "edit disable
attribute".
- TGTextEdit, TGTextView, TGView
o fixed bug - "character replace" mode didn't work
o setting insert mode added to context menu.
o setting "read only" mode added to context menu.
o new method which enable/disable "popup menu for edit actions" added.
o few corrections to SavePrimitive method.
- TGTextEntry
o guibuilder specific code was removed.
- TGuiBuilder.h, TGuiBldAction
o possibility to set picture for context menu entry added.
- treeviewer/inc/TSessionViewer.h
o forward declaration of TContextMenu class added.
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/graf/inc/TImage.h
File length: 12115 byte(s)
Diff to
previous 11914
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/graf/inc/TImage.h
File length: 11833 byte(s)
Diff to
previous 11793
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
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/graf/inc/TImage.h
File length: 10881 byte(s)
Diff to
previous 11724
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
11693 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 29 16:16:35 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/graf/inc/TImage.h
File length: 10627 byte(s)
Diff to
previous 10701
From Valeriy Onuchin:
- new class TImageDump derived from TVirtualPS is introduced.
That allows to save canvas in GIF, JPEG etc, image formats in batch mode.
This patch is introduced to check the portability of the code on all
platforms. More additions coming soon to:
- text rotation
- correct text alignment (y-centered)
- 1pixel frame drawing
- fix saving in PNG format
- speed optimisation
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/graf/inc/TImage.h
File length: 10561 byte(s)
Diff to
previous 10358
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
10358 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 19 17:13:28 2004 UTC (10 years, 3 months ago) by
brun
Original Path:
trunk/graf/inc/TImage.h
File length: 4111 byte(s)
Diff to
previous 10337
From Valeriy Onuchin:
- SetImage(Pixmap_t pxm), SetImage(const TGPicture *pic) added to TImage, TASImage classes
- added possibility to save canvas in xpm, jpeg, png, tiff formats
- set correct default value in TGSlider, TGHSlider, TGVSlider ctors.
- correction in handling Ctrl-S key by TRootGuiBuilder
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/graf/inc/TImage.h
File length: 3962 byte(s)
Diff to
previous 5096
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
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.