Re: root 4.04/02 possible bugs and suggestions

From: Thomas Bretz <tbretz_at_astro.uni-wuerzburg.de>
Date: Mon, 09 May 2005 14:38:20 +0200


Hi Olivier,

>>* When creating a bmp from a canvas I get an error reading it with gimp or xv
>>saying: Invalid compression 1

>
> I agree. We will investigate.
>
>>* While creating a tiff I get an error saying: Invalid format 24bit

>
> I do not see that:
>
> root [0] .x hsimple.C
> root [1] c1->Print("c1.tiff")
> Info in <TCanvas::Print>: file c1.tiff has been created
> root [2]

Maybe your X-System is not running on 24bit? I get:
root.exe ERROR: unable to write file "test.tiff" - TIFF image format is not supported.

>>* when creating gif (or others) in batch mode I get a crash in
>>TASImage::DrawRectangle

>
> I do not see that either:
>
> pcepsft15.cern.ch> root.exe -b
> root [1] .x hsimple.C
> root [2] c1->Print("c1.gif")

Maybe your macro doesn't call DrawRectangle indirectly?

>>* the member functions Range() and TextNDC are available in all TVirtualPS
>>derived classes, but not in the base class - which makes it hard to use them
>>with TVirtualPS.

>
> I think they are available when needed. Have you an example showing why
> you need them in th ebase class ?

Yes, I have a TGMainFrame with a TRootEmbeddedCanvas. The popdown menu contains: "Save ss ps", "Save as pdf" and "Save as svg". Depending on user request I want to call a single function "SaveAs(TVirtualPS*vps)" which saves the contents of the Canvas to a file. The function shouldn't know abozut which kind of TVirtualPS I'm using. No I need something weird like
if (dynamic_cast<TPostScript*>(vps))

    dynamic_cast<TPostScript*>(vps).Range(....); and the same for TPDF and TSVG.

>>* TPDF and TPostScript behaves different when calling NewPage() before
>>anything was put in the document (TPostScript seem to ignore the new page
>>request, TPDF inserts an emty page)

>
> Can you send me an example ?

[and following}

Yes, I'll do it. I'll send you a private mail with more details.

>>* It would be nice if TVirtualPS derived classes would support writing it to a
>>pipe instead of a file only. This would allow to send a postscript directly to
>>a pipe (a2ps, lpr, etc)

>
> Yes it would be nice, but I am not sure to know how to do that.

Just allow a FILE* instead of a file-name in the constructor would be enough. (BTW an example can be found in TGTextEdit.

>>BTW: Independant of all critics: root 4.04/02 seems to work very well and
>>behaves stable. I like the new version!

>
> BTW TPostScript and TPDF have not changed for a very long time.

With TPostScript I'm happy for a long time. TPDF is new since some root 4.* I have never used it so far...

Thomas. Received on Mon May 09 2005 - 15:01:08 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET