|
From: A S H. <ho...@ie...> - 2004-05-07 16:55:29
|
I am new to ganttProject, but have found the program very useful. One=20= issue that caused me problems is that the graphical output of=20 ganttProjectis not scalable - it's converted directly to .png files and=20= does not copy well. In an attempt to start to fix this problem, I've written an octave=20 m-file script, myfig.m (should probably call it "gan2fig" instead), that reads ganttProject xml .gan files and=20 translates the Gantt chart to xfig format. xfig is a drawing tool that is used under Linux, Mac OS X, and allows=20 its output to be translated to - LaTeX (scalable) - postscript (scalable) - .eps (scalable) - .pdf (scalable) - many other things. The m-file and an example of its use are at http://www.eng.auburn.edu/users/hodelas/LaTeX/LaTeX_tf.html under the link "On using Gantt charts in LaTeX." There are also links=20= to xfig, etc., which I installed under Mac OS X using fink (I've also=20 used it under Linux, but I'm now using only Mac OS X.) I'd like to see these functions incorporated into GanttProject itself,=20= but there are two problems: (1) I don't know JAVA, and (2) Alexandre Thomas doesn't know octave/MATLAB. So, we would like to ask this mailing list if anyone can take my few=20 days worth of work and help to incorporate the features into ganttProject. I'd prefer to see the functions=20 directly incorporated into ganttProject in order to maintain maximum=20 portability. Below is an english translation of my (badly written) french=20 description of mychart.m to Mr. Thomas: On Friday, May 7, 2004, at 02:12 AM, Alexandre THOMAS wrote: > Ok > I've never heard about the octave language. > Perhaps you can pass a mail to the mailing list of the developers > (gan...@li...) > and can explain what you've done..Perhaps someone know java/octave=20 > both... That's a good idea. > I'll try to look at your programm and try to convert it into Java.. > By the way, could you explain the goal of the program. > > If I understand, it convert the xml project file directly into a eps=20= > of fig > file?? isn't it You are correct. The subroutines "getProject", "getProjectTextWidth,"=20 "concatenateTasks", and "fixTaskDates" make a data structure that contains all tasks. Your Java program has=20 no need of these subroutines since it begins with such a data structure. The subroutine "xfigheader" begins to write an xfig file with color=20 definitions, etc. The subroutine "set ProjectPlotTimes" converts the start dates and=20 durations into data structures of boxes and lines for xfig by calling=20= the subroutine "task2box." Notice that the word "box" is incorrect; =20 in xfig anything that is made with lines is a "polyline" object, type=20 2, and so perhaps I should write "task2polyline." setProjectPlotTimes=20= also calls "task2text," which makes a text data structure object for=20 xfig. Finally, the subroutine "drawtask" writes the parameters in the xfig=20 file that come from the data structures that were made in=20 setProjectPlotTimes. This is done by calling subroutines "drawtask"=20 and "drawtext." Following this, drawtask writes the lines and arrows=20 for the dependencies. All of these subroutines use a data structure notation that is very=20 similar to C++ et C, except that there is no need to write the class=20 definitions. One important difference is cell arrays, which are written with braces=20= {} instead of parenthesis (). A cell is an object that can be anything=20= - it's perhaps similar to a "union" in C/C++. Thus, if I write task =3D tasklist{ii}; that means to "put a copy of object ii in task list into variable task." > > I've another idea...Why not create another external tool (external = from > ganttproject) that can take the xml file and convert it into a pdf=20 > document.. > Can be another solution.... Oui! Je peut le faire apr=E8s je suis satisfi=E9 avec myfig (je dois=20 changer le nom =E0 "gan2fig"). > > in fact I like your work merci! - ce n'est pas tr=E8s =E9l=E9gant, mais il marche assez bien pour=20= maintenant. > kind regards > alexandre > > Selon A S Hodel <ho...@ie...>: > >> Je ne connais pas le JAVA, alors j'ai =E9crit les fonctionnes en = Octave=20 >> - >> c'est un peu semblable =E0 MATLAB/C++. >> Pour maintenant, peut-=EAtre c'est assez de mettre un "link" a mon >> web-page de LaTeX =E0 >> http://www.eng.auburn.edu/users/hodelas/LaTeX >> J'ai mit un exemple l=E0 aujourd'hui. Puis, s'il y aurais quelqu'un = qui >> connais tous les deux d' Octave et Java, >> il/elle peut ajouter les fonctionnes directment dans ganttProject. >> >> La source pour mychart.m est attach=E9 au desous. >> >> =C7a va avec vous? >> >> merci beaucoup pour ganttProject - c'est tr=E8s utile! >> >> Scotte >> >> > > A. S. Hodel Dept. ECE, 200 Broun Hall, Auburn University AL 36849-5201 (334) 844-1854/fax(334) 844-1809,=20 http://www.eng.auburn.edu/users/hodelas , ho...@au... |