GraphOps.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited:
Sweetsun Chen, October 20, 1985 6:13:53 pm PDT
DIRECTORY
Graph USING [Graph, Viewer],
GraphPrivate USING [];
GraphOps: CEDAR DEFINITIONS = {
CreateGraph: PROC [
fileName: Rope.ROPENIL, -- suggested file name to save the graph.
caret: ARRAY CaretIndex OF CaretSpec ← ALL[NIL],
showSlope: BOOLFALSE,
target: ARRAY XY OF TargetSpec ← ALL[NIL],
grids: ARRAY XY OF BOOLALL[FALSE], -- true: on.
division: ARRAY XY OF INTALL[0],
bounds: Imager.Box ← NullBox, -- [xmin, ymin, xmax, ymax]
auto: ARRAY AutoType OF BOOLALL[TRUE], -- true: on.
color: GraphColors ← defaultColors,
font: GraphFonts ← defaultFonts,
texts: Texts ← NIL, -- *, can be left nil.
curves: EntityGroupList ← NIL -- *
] RETURNS [handle: GraphHandle];
AddText: PROC [handle: GraphHandle,
text: ROPENIL,
place: Imager.VEC ← [0.0, 0.0], -- location relative to origion and size of curvebox
fontIndex: FontIndex ← 0,
colorIndex: ColorIndex ← 0,
rotation: REAL ← 0.0, -- angle of rotation, ccw, in degrees.
justifX: JustifX ← left,
justifY: JustifY ← bottom,
id: INT ← 0 -- must be unique among all texts.
];
SetXValues: PROC [handle: GraphHandle, values: ValueList];
AddCurve: PROC [
handle: GraphHandle,
values: ValueList ← NIL,
name: ROPENIL,
colorIndex: ColorIndex ← 0,
mark: Mark ← none,
width: REAL ← UnitLineWidth,
group: EntityGroup ← NIL, -- *
parent: NestedEntities ← NIL,
id: INT ← 0, -- id must be unique among entities.
ViewerForGraph: PROC [graph: GRAPHNIL, iconic, inhibitDestroy: BOOLFALSE] RETURNS [viewer: ViewerClasses.Viewer ← NIL];
AddX