[Up] [Next]
Go up to Ipe user macros
Go forward to How Ipe calls a user macro

Ipe user macros distributed with Ipe

Ipe comes with an Ipe user macro to import arbitrary Postscript files. This function will add a single group object to your current drawing. You can ungroup this object and edit it--all the Postscript objects in the file have been translated into Ipe objects.

Well, almost all the objects--the Ium does its best to figure out what is in the Postscript file, but there are a lot of things which it cannot handle. Here are the major restrictions:

Nevertheless, this is a powerful tool. It has been tried on a considerable number of Postscript files, and in most cases generates a reasonable approximation of the picture. It will always be necessary to edit the picture after importing, but the work is much simpler than recreation of the picture from scratch would have been.

  In particular showcase files can be usefully imported into Ipe with this function. Usually, little editing is sufficient to be able to reuse the showcase drawing afterwards.

  There is a Ium that offers aligning to the grid. align to grid moves some vertex (usually the first vertex, or the center of circles) to the nearest grid point, while align vertices to grid does more for polygonal and spline objects: all vertices or control points are moved to the nearest grid point.

mark circle center creates a mark at the center of the primary selection, if that is an arc or circle. Both objects will be selected, so you can group them together easily.

  bounding box creates a rectangle which is a bounding box for the current selection. Note that it will be a bounding box for the control points, if any spline object is present. (Yes, this is a bug. Fix it, if you want to.)

precise rotate and precise stretch allow you to rotate or stretch by a numerically specified angle or factor.

precise box makes a rectangle of numerically specified dimensions.

  clip to polygon allows you to clip a set of marks and polygonal objects against a clipping polygon. The clipping polygon must be a simple polygon (not a polyline which happens to have the same begin- and endpoint). Give the clipping polygon as the primary selection, and the objects to be clipped as the secondary selections.

  make parabolas accepts a line segment (as the primary selection) and a set of marks. For every mark, it computes the parabola defined by the line through the line segment and the point (i.e. the parabola of equidistance from the point and the line), restricted to the strip determined by the line segment, see Figure. It works by creating splines with three control points. (This function was written to make figures to illustrate Fortune's plane sweep algorithm for Voronoi diagrams.)


[Up] [Next]