<> <> Last Edited: <> DIRECTORY Graph USING [Graph, Viewer], GraphPrivate USING []; GraphOps: CEDAR DEFINITIONS = { CreateGraph: PROC [ fileName: Rope.ROPE _ NIL, -- suggested file name to save the graph. caret: ARRAY CaretIndex OF CaretSpec _ ALL[NIL], showSlope: BOOL _ FALSE, target: ARRAY XY OF TargetSpec _ ALL[NIL], grids: ARRAY XY OF BOOL _ ALL[FALSE], -- true: on. division: ARRAY XY OF INT _ ALL[0], bounds: Imager.Box _ NullBox, -- [xmin, ymin, xmax, ymax] auto: ARRAY AutoType OF BOOL _ ALL[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: ROPE _ NIL, 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: ROPE _ NIL, 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: GRAPH _ NIL, iconic, inhibitDestroy: BOOL _ FALSE] RETURNS [viewer: ViewerClasses.Viewer _ NIL]; AddX