File: StretchLines.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Created by: Bob Mayo, July 2, 1984 2:53:37 pm PDT
Last Edited by: Mayo, July 26, 1984 12:37:25 pm PDT
-- StretchLines: Add stretch marks to ChipNDale. Stretch Lines are named line segments and come in two flavors: pointed and blunt. The tiler package interprets the pointed lines as designating that the entire cell should be stretched along that line, while the blunted ones are interpreted as meaning just stretch the goemetry under the mark without moving anything else.
DIRECTORY
Rope USING [ROPE],
Stretch USING [Direction],
CD USING [Design, ApplicationPtr, Position, Level, combined];
StretchLines: CEDAR DEFINITIONS =
BEGIN
LineData: TYPE = RECORD [
point: CD.Position,   -- left (or lower) endpoint of stretch line
length: INT ← 1,    -- length of line (forced be be equal or greater than some minimum)
direction: LineDirections ← up, -- the direction to stretch in
type: LineTypes ← pointed,  -- type type of object
label: Rope.ROPENIL,   -- the attached label
level: CD.Level ← CD.combined -- the level (or layer) that it is on. Always set to combined for pointed lines
];
LineTypes: TYPE = {pointed, blunt};
LineDirections: TYPE = Stretch.Direction;
objAtom: ATOM; -- Contains the atom that stretch marks are tagged with.
-- Place stretch line. If shift = TRUE then shift the object so that the line is at the point specified, if FALSE the lower left corner of the object (not the line) goes at the point specified.
Place: PROC [into: CD.Design, line: LineData, shift: BOOLTRUE];
-- Given a ChipNDale application that points to a stretch mark, return it's information.
Fetch: PROC [aptr: CD.ApplicationPtr] RETURNS [LineData];
END.