Show in Frame No Frame
Up Previous Next Title Page Index Contents Search

6.4.6 Filename print

The diagram for the current graph can be exported to the printer, one of several graphics file types (.pct (PICT vector graphics), .gif, .png), or a model export file (.mec, or if the API is installed, also .mxm) using the Print template:
filename 'name.ext' print
If the file named is 'lpt1', the diagram is printed directly to the default printer, scaled to fit on a single page. If the filename ends in .pct, .gif, or .png, a PICT, GIF or PNG file is generated showing the whole diagram at 100%. If the filename ends in .mec or .mxm, the graph (not just this diagram) will be exported to a MetaEdit+ binary patch file or XML models file. Again, all output between filename and print keywords goes to building up the filename to export to.

For HTML files MetaEdit+ automatically creates imagemap information to make GIF and PNG pictures clickable. When a filename...print command is executed in the generator, if the stream that is open after the print command is a file named *.htm*, an image map will be written to that stream at the current position. That position should thus not be inside any other tag; other than that, it may be anywhere in the body of the HTML file.

The image map includes a polygon entry for each object and relationship, based on the connection points of that object. For the roles, the polyline denoted by role’s breakpoints is turned into a polygon representing an appropriate clickable area around the role line. As we also want the original points to be readable from the image map, e.g. for automatic processing or to be able to highlight a role line, we output the original points first and then continue to form a polygon surrounding the line - those who just want the original points can simply take the first quarter of the collection of points.

The href parameter for each entry is generated by an automatically run subgenerator, _imagemap_href. The default for this is defined in Graph, and makes the link point to a local target named with the oid of the object, e.g. #16_2876. It also uses onMouseOver and onMouseOut to display the name and type of that object in the browser status bar.

You may override the default _imagemap_href generator in your own Graph types by making generators there with the same name. For instance, Project Model defines its own such generator. Add the USEMAP="#filename.gif" parameter to the IMG tag: the filename.gif should be exactly the same as the SRC parameter, preceded by #.

Show in Frame No Frame
Up Previous Next Title Page Index Contents Search