body {font-family: helvetica, arial, sans-serif; color: #505070; background-color: #ffffff} h1 {font-size: 200%; font-weight: bold; font-style:italic; color:#ff6969; margin-bottom: 0} h2 {marging-top: 0; margin-bottom: .4em; font-style:italic; color:#ff6969} h3 {border: solid 2px #ffa0d8; padding: 4px; margin-bottom: .2em} div p {text-align: justify} div {margin-top: 0} .intro {text-align: right; margin-top: -217px; margin-bottom: 120px} .button {border: solid 1px #501070; padding: 4px} .buttonbar {text-align: center; margin-top: 1.5em} .pink {color: #ff6969} a:link {color:#ff6969; font-weight: bold} a:active {color: #c04898; font-weight: bold} a:visited {color: #9820c8; font-weight: bold}
(Release 1.1.1)
METAGRAF has changed. From the first alfa released one year ago to the present version there is a big step. We, J.J.Arribas & S.Muelas, are proud of the work done and the result obtained. Nevertheless, every time we put something new in the program, we think of a lot of other things that would be convenient. So, and owing to the fact that MG's license is GPL, we will create a CVS repository in Source Forge where we hope to receive the help that, up to this moment, we haven't had.
The first consequence of this lack of help is the need to write these lines in this extremely limited English. Anyway, we will try to explain the many capabilities of MG and we hope to be, at least, understandable. Sorry about that.
This lines are not going to substitute the User's Manual, available from inside the program if wanted. They are a complement with interesting points and pretend to be easier to read than the manual. The idea is to begin by reading this page (that being a complete file, can be downloaded "on the fly" with any browser) and go thereafter to try somethings with Metagraf reading slowly the Manual.
We strongly recommend for reading this page, the use of Amaya or Opera, both of them free to download.
And now, let's go to business!
The version that we hereby present, has many new features, most of them really useful with a few that will show the impressive future possibilities of MG.
Here is a short list of the improvements already available:
And now it's time to begin with the detailed explanation of the way of using MG and how to exploit its capabilities to the maximum.
It is very important to understand the preferred way of working with MG. Its capability, enormously increased in this last version, of working with groups of objects is not without reason. The point is that working with groups is a lot quicker and safer. That means that if some optimization is wanted it is recommended to group objects as soon as they are finish. On the other hand, working with groups simplifies a lot some common tasks. For example, we can create "composite objects" that, once finished will not be modified any more. For those cases I have included the button "ATTACH" on the right. Once a few objects are "attached" in a group they can not be ungrouped any more. (So be cautious.) It is possible to draw new objects and text and everything over or under the group, but this kind of group will be maintained as it is "forever and ever....", as it is, really, a new object.
Drawings in MG require one or two minutes of reflection before beginning the job. The advantage of this approach is not to under estimate. One or two minutes can save one or two hours of modifying lines, changing text and so on, as it is usual with other well known programs. The incredible simplicity for moving, cloning or resizing objects and groups in MG, makes it a child's play to finish a part of a drawing in a few minutes. Then, grouping -and viewing- are the words. (About viewing, a little later on). Once the drawing is grouped and viewed, it is safe and we can continue with the next step.
As we have given so much importance to groups in MG, let's find out which are your tools for working with them:
Those buttons work in a straightforward way. They do what they promise to do. There are some subtle differences that must be stated. For the two general buttons to work, the objects must be selected (so, in red color). With the second one, ungroup, we have to select a group and clicking the button will ungroup the objects included and let them in a selected state, so in red color. The third one works just by clicking it. All the objects on the screen, singles or groups, selected or not, will be grouped and the group selected. The fourth doesn't care about selections of any kind. It is the same to have some groups selected and others not. It will ungroup everything -with the exception noted. But, it will ungroup all the objects and let them in a NOT selected state. Finally, for attaching objects it is necessary to group them and immediately to click this button. The group will be converted to a new object (so, be careful).
One last thing to be said about groups is that their use makes easier the selection of objects. In fact, when a new group is created, it is placed over the last object created on the screen ( as, really, it is the last object). One way to change the order of objects and to make one of them the "last one" is simply to select it, to group itself alone and to ungroup it. It will be placed over all the rest on the screen. It can be convenient for the user to try this mechanism as it is useful with selection (one of the points to improve in the TO DO list of MG).
This point has been totally modified and the new way is very simple and convenient. When something is drawn on the screen and we want to see it "the real way" or to save it, both things are done just by clicking the ghost button: When this button is clicked a double action takes place: on one side the file is processed and the "ghostview" screen launched (more precisely, gv in Unix and gsview32 in Windows). It will appear on the screen the drawing done "up to the moment". But on another side, a couple of new files with the general name: graf_num.mp and graf_num.bmg are created in the directory files, where "num" is a number beginning with 1 and increasing one unit every time the ghost button is clicked. (More about the distribution of directories in this release, later on).
In this way just by viewing the drawing done, we save a copy of it. But it is necessary to say something more. If we leave MG by clicking the "bye bye" button: , as must be generally done, all the files saved with the name graf_num.* in directory files will be erased. If we begin another MG session and open this directory, it will be empty of those files. So, our drawing is safe temporarily. To save it "forever and ever" we must click the save button: and choose a name and a directory to put it. Sometimes, it can be convenient just to give it a name and save it in the same directory files. It will not be erased as its name will not begin with "graf" (I guess...). We must mention that if MG is closed by clicking the closing button on the external window, no files will be deleted.
It is a good practice to group the drawing before saving it. Many times you will also find that once finished and saved a part of a drawing, you can delete it to have your screen cleaner and continue working in an easier way.
All the points related with "saving" are in a close relationship with those related with "recovering" or opening. Let's see how all that works now.
To recover a part of a picture already saved and deleted from screen, we have to click the open button: and choose the file to paste. Just by clicking open, the drawing will be pasted on the screen in the same place, and exactly as it was when we saved it. (Nevertheless, there is a bug not yet solved when recovering files with text written in TeX/LaTeX. So you must leave the titles for the end of the drawing if you don't use postscript text). If substitution of a drawing is the point, and there is no interest in pasting, the only thing to do in a different way is to press CTRL key when clicking the open button. The drawing on the screen will disappear and the saved one will take its place.
In both cases, saving and opening, it is possible (and simple) to open any directory to save or open the file.
For writing and editing simple text in drawings, a totally "new way of
doing" has been developed. Now, the upper left part of MG's screen has lost
the label with the name of the program and a, relatively small, text field
has taken its place. Although short, the text scrolls at the end of the
visible text field, so text of any length can be written.
After clicking the right mouse button, your text will appear, and if you continue to work, you will see the text field clean and without your written text. You can write as many texts as you want and place them on due places. If once the text in place you realize that there is some mistake in any word, and although you have written a lot more titles, at any time you can click a couple of times over the line of the text. Then you will see this text appear once more on the text field, where you can edit it and correct any mistake. Once done and before any other action, the correct button: , at right must be clicked. You will see that the text on the screen has changed to the new one.
So, to modify any written text on screen the steps are: click the text; modify it on the text field and click the correct button. The fact of using the small text field window for this action has been choose for reasons of simplicity, as it is much easier to see the clean text than be obliged to work on the screen with grids, lines of other objects, etc.
The old editor has been maintained for two reasons. First one, it is needed if we want to input some lines of written text on the drawing. As it is known, we can write direct metapost code on the editor and then place it in the file just by clicking the metapost button: and then over the screen. Second one, it allows to modify a final file by hand (some details, text .... and so on) and save it in this modified state.
Finally, we have decided to let "nature as it is" and don't change the standard cursors. After designing the "perfect cursor" for every need, we have realized that it changed with every O.S., and not only, but also with many window managers in Linux. So, back to the standard used by Java. Let's say a couple of words about them.
In Windows, the standard cursors are the cross-hair (not very small) one and the vertical hand closed but one finger extended. In Unix, the same cross-hair (smaller) and the hand is horizontal and also smaller and with a finger extended.
Anyway, when we see the cross-hair cursor it means that if we click on the screen a new object will be created. We must be careful about that. At the beginning of using MG it is not surprising that sometimes we just want to select an object to move or resize/reshape it but we have forgotten to go out from the "create objects state". Then, just at the time of clicking we realize the mistake and click quickly the right button of the mouse. The little hand with extended finger is there and clicking once more we see our object selected (red) as we wanted. The work continues; we are happy with it and at some moment we want to see/save it. We click our nice ghost button and ... nothing happens. Let's see why. Suppose that the last object created was a rectangle. We have not deactivated the "create object state" and we have done a very short click with it before correcting the mistake. But this "very short" click has been enough to create a problem. The object has been created, but with width and hight zero, so we don't see it on the screen. Nevertheless it is there, and it has been translated to MetaPost when saving the file. Then to view the drawing, the file is processed but "old, good, strict, serious" metapost doesn't like stupidities, so he refuses to process such thing....well, you see.
A norm of good practice is to return always to the "hand-state" of the cursor as soon as we have created anything. Just click the right button. Other programs use the three buttons of the mouse and you must know what to do at every moment looking to your right and trying to break the code of the small drawing. MG only asks you to click the right button every time you create an object. That's all.
Just in case you make this mistake and you realize it, the best thing to do is to try to select the point of the disturbing, unwanted, minimal object and delete it, as although a minimal point, if it is selected, is clearly seen. If you remember exactly where you have clicked and you are working in "snap-to.grid" mode, it can be possible (although difficult) to select it. Another easier possibility is to click and drag the mouse (little hand with extended finger) in a small rectangle around the zone where our short click has been done. The point will appear clearly if it is inside. Finally, if there is a mess of lines, curves, text and everything, the best thing to do is to select and group everything with the specific button and immediately ungroup with the standard button. Doing that, all the objects will be selected, so in red, and we must be able to see our point.
Radio buttons "XS" and "YS" control the x-scale and y-scale of the fonts. Remember that in this case x-scale means "scale along the tangent to the curve in the point", and y-scale refers to the perpendicular to the curve.
Radio button "SL" (from "slanted") means the shear in the glyphs. "PS" represents the scale for the curve. "HL" controls the position of the glyphs in a line perpendicular to the curve. If this value is apprx. "-3" the letters will be placed in the middle of the curve, which is the standard setting.
Radio button "SB" controls the position of the string of text related with the origin of the curve. If the standard null value is accepted, the text will begin at the origin of the curve. "SG" controls the separation between the glyphs.
"CL" controls the color of the curve if this one is drawn and "TH" the thickness. If this last value is null, the standard, no curve will be drawn. Any other reasonable value will make appear the curve.
The way to proceed is to write a value (number 2, for example) on the text field and click the button choose, for example "XS". If doing so, a new value appears on the text field and we agree with it for another button, we can click immediately this other button. Usually, the best thing is to delete this new value and write the desired one. In normal, not extremly sophisticated conditions, only buttons "XS", "YS" and "SG" are clicked, accepting the default values for the others.
Once given the values we must click once more on the text parameter button what makes the Parameter Adjuster Panel to desappear. Our work is finished and if we want to see the result, the way of doing is having the small window under the GV-PS button with the value "gv-tex", click on our ghost button what will launch ghostview and our text on the path. If we want to readjust some value, it is enough to select the curve, click once more to see the Parameter Adjuster and modify any value. It is not necessary to repeat clicks on buttons that we don't want to modify.
This is a feature added in the very last minute and not much tested. I will explain just the way of doing and hope to receive some feedback from the users.
In the "scripts" directory there is a file with the name "ps2mg". You can move this file to any place on your path or to let it where it is. It is an executable file in Linux. A modification of the well known "pstoedit" from Wolfgang Glunz, in a really alpha stage. (I have not sent anything yet to Wolfgang as it seems not terribly serious as it is :-)
If you have a postscript file that is a drawing with lines curved or not, you can run "ps2mg" over it and try to paste the result on MG's screen. Having "ps2mg" on your path or on the directory where you are working, just write:
ps2mg -f mgraf yourFile.ps yourFile.mg
and press ENTER. If the file is created without error messages on the console, go to MG and click the "paste postscript" button: you will see appear (hopefully) a new object on MG's screen. From this moment on, this object is a bezier curve or a polyline of MG and works in the same way.
A first test to see the nice precission of this approach is to draw any figure in MG and viewing (and saving) it. Then, without closing MG, use "ps2mg" on the "graf_1.1" created and expanding MG recover "graf_1.mg". Compare the pasted image with the original as it will be placed in exactly the same place.
This file will be continued with new adendas in the future to permit to include clarifications to points that can be difficult to understand. For doing so, I need some feedback from the users telling me, simply, what is not clear or what does not work in their computers. As I have said at the begining, shortly will be created a CVS repository in SOURCE FORGE where everyone can collaborate. Thanks for your patience.
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee or royalty is hereby granted, in the terms of the GPL license.