A language for typesetting graphics
暂无分享,去创建一个
This dissertation presents some new constructs for a programming language in which two-dimensional figures can be expressed. The language is intended to work with existing text-formatting systems so that text and figures can be typeset at the same time. Another application for the language is to describe VLSI circuit layout.
The building block for figure language programs is called a "box"; it shares some features with procedures and some with records in general-purpose programming languages. A box includes a system of simultaneous equations that declares the relative positions of its significant points and requests for actions to be performed at those points: for example, a user may ask for lines drawn between, circles drawn around, or boxes placed at selected points.
A box is called by adding enough equations to the system in its definition that its significant points can be solved for uniquely. A box call may also include additional actions to be performed during the call (say, extra lines or circles to be drawn). The notions of drawing a line using a pattern (perhaps dashed or dotted) and texturing a polygonal area (for example, by cross-hatching) follow directly from the mechanism for defining and calling boxes.
Users may also ask for a box to be opaque so that it blots out pieces of picture that it covers. Two commands that correspond to the informal notion of sketching serve to localize this blotting effect when it could ruin parts of the picture that are wanted.
Good algorithms that implement these instructions for boxes composed of straight lines and circular arcs are presented along with methods to detect insufficiency or inconsistency in the defining equation systems. Extensions beyond the ruler-and-compass model are explored enough to suggest both theoretical and practical reasons to limit the kinds of curves and functions the system should deal with.
An appendix describes an implementation of the language that was used to produce the dissertation.