SGraph Interface

{Defined in UNIT SGraph.}


TSGraph=Class(TGraphicControl)

Class Function IsInspectorActive:Boolean;

Class Procedure SetInspectorActive(state:Boolean);

Class Function GetActiveGraph:TSGraph;

Class Procedure SetActiveGraph(aGraph:TSGraph);

Public

Data:TList;

numberOfDatum:LongInt;

numberOfLines:LongInt;

dataXMax,dataXMin,dataYMax,dataYMin:Double;

Constructor Create(aOwner:TComponent); override;

Procedure Free;

Procedure Paint; override;

Procedure PaintGraph(Canvas:TCanvas);

Procedure RegisterDatum(seriesIndex:Integer;h,v:Double);

Procedure RegisterLineSegment(h1,v1,h2,v2:Double; color:TColor);

Procedure RegisterAndPlot(seriesIndex:Integer;h,v:Double);

Procedure Line(h1,v1,h2,v2:Double; color:TColor);

Procedure Rescale;

Procedure RescaleVert;

Procedure RescaleHorz;

Procedure ClearSeriesData(seriesIndex:Integer);

Procedure DeleteSeries(seriesIndex:Integer);

Procedure DeleteAllObjects;

Procedure DeleteAllSeries;

Procedure DeleteLines;

Procedure SetSeriesStyle(seriesIndex:Integer; color:TColor; connectPts:Boolean; marker:markerShape);

Procedure Equate(Source:TSGraph);

Procedure Merge(Source:TSGraph);

Procedure EquateParameters(Source:TSGraph);

Function PixFromX(x:Double):Double;

Function XFromPix(pix:Double):Double;

Function PixFromY(y:Double):Double;

Function YFromPix(pix:Double):Double;

Function GetCanvas:TCanvas;

Function XPtrFromSeries(seriesIndex:Integer):vecPtr;

Function yPtrFromSeries(seriesIndex:Integer):vecPtr;

Function NumPointsFromSeries(seriesIndex:Integer):integer;

Procedure DatumFromSeries(seriesIndex,datumNum:Integer; var X,y:Double);

Published

Property showSample:Boolean read FShowSample Write SetShowSample;

Procedure CoordinateDisplay(sender:TObject;

Shift:TShiftState;

x,y:Integer);

Procedure StartCoordinateDisplay(sender:TObject;

button:TMouseButton;

Shift:TShiftState;

x,y:Integer);

Procedure EndCoordinateDisplay(sender:TObject;

button:TMouseButton;

Shift:TShiftState;

x,y:Integer);

property ParentColor;

property onMouseDown;

property onMouseMove;

property onMouseUp;

property Color;

property Align;

property Title:string;

property VertScale:TVertScale

property HorzScale:THorzScale

End;