The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Interface of SDL_RChart

const
  defLRim = 50;                          { default left rim in component CHART }
  defRRim = 10;                         { default right rim in component CHART }
  defTRim = 16;                           { default top rim in component CHART }
  defBRim = 32;                        { default bottom rim in component CHART }
  defShadowWidth = 0;                                { default width of shadow }
  defPenStyle = psSolid;                                   { default pen style }
  defDataCol  = clblack;                                  { default data color }
  defChartFrameCol = clBlack;                      { default chart frame color }
  defFillCol = clSilver;                                  { default fill color }
  defChartCol = clWhite;                      { default chart background color }
  defWindCol  = clBtnFace;                   { default window background color }
  defGridCol  = clBlack;                                  { default grid color }
  defLineWid  = 1;                                        { default line width }
  defRCHeight = 200;                                          { default height }
  defRCWidth = 280;                                            { default width }
  MinRCWidth = 80;                           { minimum width of RChart control }
  MinRCHeight = 20;                         { minimum height of RChart control }
  MaxTickPos = 50;                 { maximum number of synchronized grid lines }
  MaxZoomStack = 16;                                     { depth of zoom stack }
  MaxCrossH = 4;                                        { number of crosshairs }
  MaxTxtLbl = 30;                                      { number of text labels }
  MaxDataUsers = 4;                            { maximum number of data shares }
  MaxMTrace = 5000;                 { max. number of vertices of a mouse trace }

{$IFDEF PAIDVERS}
  SDLVersionInfo = 'rchart_r1050_full';                         { version info }
  IsLightEd = false;
{$ELSE}
  SDLVersionInfo = 'rchart_r1050_lighted';
  IsLightEd = true;
{$ENDIF}
  release = 1050;

type
  ESDLRChartError = class(ESDLError);      { exception type to indicate errors }
  TLayerSet = set of 1..MAXNUMRCLAYERS;
  TCaptionAnchorHoriz = (cahControlLeft, cahChartLeft, cahChartCenter,
                         cahChartRight, cahControlRight);
  TCaptionAnchorVert = (cavControlTop, cavChartTop, cavChartCenter,
                        cavChartBottom, cavControlBottom);
  TBGAreaMode = (bamNone, bamLeft, bamRight, bamTop, bamBottom,
                 bamVStripe, bamHStripe, bamRect, bamRectInv,
                 bamVStripeInv, bamHStripeInv);
  TContourPlotMode  = (cpmDots, cpmMonoDots, cpmColorSurface, cpmColorSurfNoIp);

  TEstimateZValEvent = procedure (Sender: TObject; x, y: double;
                pivx, pivy: integer; var z: double; var Mask: byte) of object;
  TBakGndImg = class (TPersistent)                         { background bitmap }
               private
                 FName         : string;         { name of bitmap file to load }
                 FOnChange     : TNotifyEvent;
                 FIncldPath    : boolean;         { if TRUE, include path info }
                 FFillMode     : TBkgFill;          { fill of background image }
                 FBGAreaMode   : TBgAreaMode;           { background area mode }
                 FBGAreaColor  : TColor;               { background area color }
                 FBGAreaLeft   : double;         { background area coordinates }
                 FBGAreaRight  : double;
                 FBGAreaTop    : double;
                 FBGAreaBottom : double;
                 procedure ResetComp;
                 procedure SetName (fn: string);
                 procedure SetIncldPath (x: boolean);
                 procedure SetFillMode (x: TBkgFill);
                 procedure SetBGAreaColor (c: TColor);
                 procedure SetBGAreaMode (m: TBgAreaMode);
                 procedure SetBGAreaLeft (coords: double);
                 procedure SetBGAreaRight (coords: double);
                 procedure SetBGAreaTop (coords: double);
                 procedure SetBGAreaBottom (coords: double);
               protected
                 procedure AssignTo (Dest: TPersistent); override;
               public
                 constructor Create(AOwner: TComponent);
                 destructor Destroy; override;
                 procedure Changed;
                 procedure Assign(Source: TPersistent); override;
                 property  OnChange: TNotifyEvent read FOnChange write FOnChange;
               published
                 property  Name: string read FName write SetName;
                 property  IncludePath: boolean read FIncldPath write SetIncldPath;
                 property  FillMode: TBkgFill read FFillMode write SetFillMode;
                 property AreaMode: TBgAreaMode
                             read FBgAreaMode write SetBgAreaMode;
                 property AreaColor: TColor
                             read FBGAreaColor write SetBgAreaColor;
                 property AreaLeft: double read FBGAreaLeft write SetBgAreaLeft;
                 property AreaRight: double
                             read FBGAreaRight write SetBgAreaRight;
                 property AreaTop: double read FBGAreaTop write SetBgAreaTop;
                 property AreaBottom: double
                             read FBGAreaBottom write SetBgAreaBottom;
               end;

  TJointLayers = class(TPersistent)
               private
                 FMasterLayerX : array [1..MAXNUMRCLAYERS] of integer;
                 FMasterLayerY : array [1..MAXNUMRCLAYERS] of integer;
                 FOnChange     : TNotifyEvent;
                 FOwner        : TComponent;
                 function GetControlledLayerX (Index: Integer): integer;
                 function GetControlledLayerY (Index: Integer): integer;
                 procedure SetControlledLayerX (Index: Integer; Value: integer);
                 procedure SetControlledLayerY (Index: Integer; Value: integer);
               protected
                 procedure Changed;
                 procedure AssignTo(Dest: TPersistent); override;
                 property OnChange: TNotifyEvent read FOnChange write FOnChange;
               public
                 constructor Create(AOwner: TComponent);
                 destructor  Destroy; override;
                 procedure Assign(Source: TPersistent);
                 procedure ResetComp;
               published
                 property L01xControlledBy: integer index 1
                             read GetControlledLayerX write SetControlledLayerX;
                 property L01yControlledBy: integer index 1
                             read GetControlledLayerY write SetControlledLayerY;
                 property L02xControlledBy: integer index 2
                             read GetControlledLayerX write SetControlledLayerX;
                 property L02yControlledBy: integer index 2
                             read GetControlledLayerY write SetControlledLayerY;
{$IFDEF PAIDVERS}
                 property L03xControlledBy: integer index 3
                             read GetControlledLayerX write SetControlledLayerX;
                 property L03yControlledBy: integer index 3
                             read GetControlledLayerY write SetControlledLayerY;
                 property L04xControlledBy: integer index 4
                             read GetControlledLayerX write SetControlledLayerX;
                 property L04yControlledBy: integer index 4
                             read GetControlledLayerY write SetControlledLayerY;
                 property L05xControlledBy: integer index 5
                             read GetControlledLayerX write SetControlledLayerX;
                 property L05yControlledBy: integer index 5
                             read GetControlledLayerY write SetControlledLayerY;
                 property L06xControlledBy: integer index 6
                             read GetControlledLayerX write SetControlledLayerX;
                 property L06yControlledBy: integer index 6
                             read GetControlledLayerY write SetControlledLayerY;
                 property L07xControlledBy: integer index 7
                             read GetControlledLayerX write SetControlledLayerX;
                 property L07yControlledBy: integer index 7
                             read GetControlledLayerY write SetControlledLayerY;
                 property L08xControlledBy: integer index 8
                             read GetControlledLayerX write SetControlledLayerX;
                 property L08yControlledBy: integer index 8
                             read GetControlledLayerY write SetControlledLayerY;
                 property L09xControlledBy: integer index 9
                             read GetControlledLayerX write SetControlledLayerX;
                 property L09yControlledBy: integer index 9
                             read GetControlledLayerY write SetControlledLayerY;
                 property L10xControlledBy: integer index 10
                             read GetControlledLayerX write SetControlledLayerX;
                 property L10yControlledBy: integer index 10
                             read GetControlledLayerY write SetControlledLayerY;
                 property L11xControlledBy: integer index 11
                             read GetControlledLayerX write SetControlledLayerX;
                 property L11yControlledBy: integer index 11
                             read GetControlledLayerY write SetControlledLayerY;
                 property L12xControlledBy: integer index 12
                             read GetControlledLayerX write SetControlledLayerX;
                 property L12yControlledBy: integer index 12
                             read GetControlledLayerY write SetControlledLayerY;
                 property L13xControlledBy: integer index 13
                             read GetControlledLayerX write SetControlledLayerX;
                 property L13yControlledBy: integer index 13
                             read GetControlledLayerY write SetControlledLayerY;
                 property L14xControlledBy: integer index 14
                             read GetControlledLayerX write SetControlledLayerX;
                 property L14yControlledBy: integer index 14
                             read GetControlledLayerY write SetControlledLayerY;
                 property L15xControlledBy: integer index 15
                             read GetControlledLayerX write SetControlledLayerX;
                 property L15yControlledBy: integer index 15
                             read GetControlledLayerY write SetControlledLayerY;
                 property L16xControlledBy: integer index 16
                             read GetControlledLayerX write SetControlledLayerX;
                 property L16yControlledBy: integer index 16
                             read GetControlledLayerY write SetControlledLayerY;
{$ENDIF}
               end;


  TScaleProps = class (TPersistent)  // published properties of scales
                private
                  FCaption      : string;
                  FCaptionPosX  : integer;
                  FCaptionPosY  : integer;
                  FCaptAlign    : TAlignment;
                  FCaptAnchor   : TScaleUnitAnchor;
                  FColorScale   : TColor;
                  FOnChange     : TNotifyEvent;
                  FDTFormat     : TDTLabel;
                  FDecPlaces    : integer;
                  FLogAx        : boolean;
                  FLabelType    : TFigType;
                  FFont         : TFont;
                  FMinTicks     : integer;
                  FNotYetLoaded : boolean;  { flag to prevent problems with
                                          log. scales during component loading }
                  FRangeLow     : double;
                  FRangeHigh    : double;
                  FShortTicks   : boolean;
                  FScaleInscript: string;
                  FScaleType    : TScaleType;
                  FScalePosX    : integer;
                  FScalePosY    : integer;
                  FMinRngDiff   : double;              { minimum range of axis }
                  FUserTickText : string;
                  FVisible      : boolean;
                  function GetScalePos: integer;
                  function GetScaleCenter: double;
                  procedure SetCaption (txt: string);
                  procedure SetCaptionPosX (x: integer);
                  procedure SetCaptionPosY (y: integer);
                  procedure SetCaptAlign (al: TAlignment);
                  procedure SetCaptAnchor (ca: TScaleUnitAnchor);
                  procedure SetColorScale (color: TColor);
                  procedure SetDTFormat (dtf: TDTLabel);
                  procedure SetDecPlaces (dp: integer);
                  procedure SetLogAx (logar: boolean);
                  procedure SetLabelType (lt: TFigType);
                  procedure SetMinTicks (nt: integer);
                  procedure SetMinRngDiff (minrng: double);
                  procedure SetScalePos (p: integer);
                  procedure SetRangeLow (rl: double);
                  procedure SetRangeHigh (rh: double);
                  procedure SetShortTicks (st: boolean);
                  procedure SetScaleInscript (scinsc: string);
                  procedure SetScaleType (sct: TScaleType);
                  procedure SetUserTickText (utt: string);
                  procedure SetVisible (vis: boolean);
                  procedure SetScaleFont (ft: TFont);
                protected
                  procedure AssignTo (Dest: TPersistent); override;
                  procedure FontStyleChanged(Sender: TObject);
                public
                  constructor Create;
                  destructor Destroy; override;
                  procedure Assign(Source: TPersistent); override;
                  procedure Changed;
                  property Center: double read GetScaleCenter;
                  procedure ResetComp;
                  property ScaleType: TScaleType
                               read FScaleType write SetScaleType;
                published
                  property Caption: string read FCaption write SetCaption;
                  property CaptionPosX: integer
                              read FCaptionPosX write SetCaptionPosX;
                  property CaptionPosY: integer
                              read FCaptionPosY write SetCaptionPosY;
                  property CaptionAlignment: TAlignment
                              read FCaptAlign write SetCaptAlign;
                  property CaptionAnchor: TScaleUnitAnchor
                              read FCaptAnchor write SetCaptAnchor;
                  property ColorScale: TColor read FColorScale write SetColorScale;
                  property DateFormat: TDTLabel read FDTFormat write SetDTFormat;
                  property DecPlaces: integer read FDecPlaces write SetDecPlaces;
                  property Font: TFont read FFont write SetScaleFont;
                  property Logarithmic: boolean read FLogAx write SetLogAx;
                  property LabelType: TFigType read FLabelType write SetLabelType;
                  property MinTicks: integer read FMinTicks write SetMinTicks;
                  property MinRange: double read FMinRngDiff write SetMinRngDiff;
                  property RangeLow: double read FRangeLow write SetRangeLow;
                  property RangeHigh: double read FRangeHigh write SetRangeHigh;
                  property ShortTicks: boolean
                              read FShortTicks write SetShortTicks;
                  property ScaleInscript: string
                              read FScaleInscript write SetScaleInscript;
                  property ScalePos: integer read GetScalePos write SetScalePos;
                  property UserTickText: string
                              read FUserTickText write SetUserTickText;
                  property Visible: boolean read FVisible write SetVisible;
                  property OnChange: TNotifyEvent read FOnChange write FOnChange;
                end;

  TScaleLocationHoriz = (slTop, slBottom);
  TScalePropsHoriz = class (TScaleProps)
                private
                  FScaleLoc    : TScaleLocationHoriz;
                  procedure ResetComp;
                public
                  constructor Create;
                  procedure SetScaleLoc (value: TScaleLocationHoriz);
                published
                  property ScaleLocation : TScaleLocationHoriz
                              read FScaleLoc write SetScaleLoc;
                end;

  TScaleLocationVert = (slLeft, slRight);
  TScalePropsVert = class (TScaleProps)
                private
                  FScaleLoc    : TScaleLocationVert;
                  procedure ResetComp;
                public
                  constructor Create;
                  procedure SetScaleLoc (value: TScaleLocationVert);
                published
                  property ScaleLocation : TScaleLocationVert
                              read FScaleLoc write SetScaleLoc;
                end;

  TTextLabel = class (TCustomTextLabel)
               private
               public
               published
                 property PosX;
                 property PosY;
                 property Layer;
                 property AttachToData;
                 property ColorBkg;
                 property ColorBorder;
                 property ColorShadow;
                 property ShadowDx;
                 property ShadowDy;
                 property Transparent;
                 property Alignment;
                 property VerticalAlignment;
                 property Font;
                 property Mode;
                 property Caption;
                 property Visible;
                 property OnChange;
               end;

  TrcItem = (tkNone, tkMarkAt, tkLine, tkLineto, tkRect, tkRectFrame,
             tk3DBar, tkText, tkMoveTo, tkEllipse, tkEverything,
             tkNotMoveTo, tkMoveRelPix, tkLineRelPix, tkArrow,
             tkTextOfs, tkRectRelPix, tkMarkEBar, tkLineOffs, tkArc);
                             { Attention: if the Itemtype is changed, the array
                               FItemCount should also be adjusted }

  TrcChartItem = record
                 x, y         : double;            { coordinates of chart item }
                 x2, y2       : double;           { other corner of rectangles
                                                or halfaxes ha, hb of ellipses
                                                        or delta x/y for texts }
                 Color        : TColor;                        { color of item }
                 FillColor    : TColor;                           { fill color }
                 ShadowColor  : TColor;                         { shadow color }
                 HiLightColor : TColor;                      { highlight color }
                 PenStyle     : TPenStyle;      { pen style used for this item }
                 Tag          : longint;                    { user defined tag }
                 LWid         : integer;                          { line width }
                 ItemClass    : byte;                   { class number of item }
                 ItemKind     : TrcItem;                  { kind of chart item }
                 Layer        : integer;     { coordinate system layer of item }
                 Transp       : boolean;                        { transparency }
                 FrameStyle   : TFrameStyle;                     { frame style }
                 Text         : string[15];                             { text }
                 SizeOrAngle  : integer;  { text font size, or arrow head size,
                                           angle1 of arcs, or angle of 3D bars }
                 DepthOrAngle : integer;  { angle2 of arcs or depth of 3D bars }
                 MarkOrAlign  : byte;         { mark number, or text alignment }
               end;


  GridStyleType = (gsNone, gsPoints, gsVertLines, gsHorizLines, gsLines,
                   gsHorizDotLines, gsVertDotLines, gsDotLines);
{$IFDEF PAIDVERS}
  TrcLayout = (rcl_X1Bottom_Y1Left, rcl_X1Bottom_Y2Left, rcl_X1Bottom_Y3Left,
               rcl_X1Bottom_Y4Left, rcl_X1Bottom_Y2Both, rcl_X2Bottom_Y2Left,
               rcl_X2Both_Y2Both);
{$ELSE}
  TrcLayout = (rcl_X1Bottom_Y1Left, rcl_X1Bottom_Y2Left, rcl_X1Bottom_Y2Both,
               rcl_X2Bottom_Y2Left, rcl_X2Both_Y2Both);
{$ENDIF}
  TTextBkg = (tbClear, tbSolid);
                                        { event for mouse pos. in chart coords }
  TMouseMoveInChartEvent = procedure (Sender: TObject; InChart: boolean;
                                      Shift: TShiftState;
                                      rMousePosX, rMousePosY: double) of object;
  TRenderEvent = procedure (Sender: TObject; Canvas: TCanvas;
                            Top, Left: integer) of object;
  TBeforeCrossHMoveEvent = procedure (Sender: TObject;
                            WhichCrossHair: TCrossHair; dx, dy: integer;
                            var AllowMove: boolean) of object;
  TCrossHairMoveEvent = procedure (Sender: TObject;
                                   WhichCrossHair: TCrossHair) of object;
  TTextLabelMoveEvent = procedure (Sender: TObject;
                                   WhichTextLabel: TTextLabel) of object;

  TCustomRChart = class (TCustomControl)
            private
    {$IFDEF SDLDEBUG}
              StartSystime     : double;
    {$ENDIF}
              FNumChartItems   : longint;{no. of chart items in data container }
              FNumAllocated    : longint;{ number of allocated container cells }
              FAllocSize       : integer; { allocation size for data container }
              LButtonWasDown   : boolean;  { global identifier to track panning
                                                          by left mouse button }
              FMAnchorScrX     : array[1..MAXNUMRCLAYERS] of integer;
                                         { anchor mouse pos. on TRChart canvas }
              FMAnchorScrY     : array[1..MAXNUMRCLAYERS] of integer;
              FMAnchorRcLoX    : array[1..MAXNUMRCLAYERS] of double;
              FMAnchorRcLoY    : array[1..MAXNUMRCLAYERS] of double;
              FMAnchorRcHiX    : array[1..MAXNUMRCLAYERS] of double;
              FMAnchorRcHiY    : array[1..MAXNUMRCLAYERS] of double;
              ColBakShadow     : TColor;
              ColBakShadowBgnd : TColor;
              ColBakWindow     : TColor;
              ColBakChart      : TColor;
              ColBakFrame      : TColor;
              ColBakFont       : TColor;
              ColBakScalesX    : array[1..MAXNUMRCLAYERS] of TColor;
              ColBakScalesY    : array[1..MAXNUMRCLAYERS] of TColor;
              ColBakSclFontX   : array[1..MAXNUMRCLAYERS] of TColor;
              ColBakSclFontY   : array[1..MAXNUMRCLAYERS] of TColor;
              FZoomState       : TZoomState;
              FStdLayout       : TRcLayout;
              FPanGridDx       : double;
              FPanGridDy       : double;
              MouseBoxState    : TMouseBoxState;
              LastMouseX       : integer;
              LastMouseY       : integer;
              MouseMoveActive  : boolean;
              MouseBoxX1       : integer;
              MouseBoxX2       : integer;
              MouseBoxY1       : integer;
              MouseBoxY2       : integer;
              FMTrace          : array of TColoredPoint;//user-drawn mouse trace
              FNumMTrace       : integer;
              FColorMTrace     : TColor;
              FMTraceInvert    : boolean;
              WindAnchorX      : integer;
              WindAnchorY      : integer;
              WindOldCornerX   : integer;
              WindOldCornerY   : integer;
              FUseDataOf       : TCustomRChart;   { assigned shared data chart }
              FDataUsers       : array[1..MaxDataUsers] of TCustomRChart;
              FDataUsersNum    : integer;
              FItClassVisib    : array[0..255] of boolean; { visibility of
                                                                  item classes }
              FLayerVisib      : array[1..MAXNUMRCLAYERS] of boolean; { visib.
                                                                     of layers }
              FOnMMvInChart    : TMouseMoveInChartEvent;
              FOnZoomPan       : TZoomPanEvent;
              FOnSelectRect    : TSelectRectEvent;
              FOnRubberBand    : TSelectRectEvent;
              FOnScaleTickDrawn: TScaleTickDrawnEvent;
              FOnBeforeTickLabel: TBeforeTickLabelEvent;
              FOnDataRendered  : TRenderEvent;
              FOnBefRenderData : TRenderEvent;
              FOnBefCrossHMove : TBeforeCrossHMoveEvent;
              FOnScalesRendered: TRenderEvent;
              FOnCrossHMove    : TCrossHairMoveEvent;
              FOnTxtLblMove    : TTextLabelMoveEvent;
              FOnMouseLeave    : TNotifyEvent;
              FOnMouseEnter    : TNotifyEvent;
              AuxBmp           : TBitMap;   { bitmap to hold background picture }
              GrafBmp          : TBitmap;          { off-screen graphics bitmap }
              ChartBmp         : TBitmap;             { off-screen chart bitmap }
              FBakGndFile      : TBakGndImg;                  { background file }
              FJointLayers     : TJointLayers;                    { joint layer }
              FDataTag         : longint;                    { user defined tag }
              RcGridStyle      : GridStyleType;                 { style of grid }
              RcGridCol        : TColor;                        { color of grid }
              RcGridDx         : double;            { x-distance of grid points }
              RcGridDy         : double;            { y-distance of grid points }
              RcLRim           : integer;                            { left rim }
              RcRRim           : integer;                           { right rim }
              RcTRim           : integer;                             { top rim }
              RcBRim           : integer;                          { bottom rim }
              F3DRim           : integer;                     { width of shadow }
              RcShadowStyle    : TShadowStyle;                { style of shadow }
              FShadowColor     : TColor;                      { color of shadow }
              RcShadowBakCol   : TColor;           { color of shadow background }
              RcMouseAction    : TMouseActMode;  { type of allowed mouse action }
              FWasDblClk       : boolean;          { flag to suppress MouseDown
                                                     event after a double click }
              RcDataCol        : TColor;                        { color of data }
              FChartFrameCol   : TColor;                 { color of chart frame }
              RcFillCol        : TColor;           { fill color of rect/ellipse }
              RcChartCol       : TColor;            { color of chart background }
              RcPenStyle       : TPenStyle;              { pen style of drawing }
              RcWindCol        : TColor;           { color of window background }
              RcLineWid        : byte;      { line width of tkLine and tkLineTo }
              FChartCaption    : string;                     { caption of chart }
              FCaptPosX        : integer;               { x position of caption }
              FCaptPosY        : integer;               { y position of caption }
              FCaptAlignment   : TAlignment;       { alignment of chart caption }
              FCaptAnchorX     : TCaptionAnchorHoriz;
              FCaptAnchorY     : TCaptionAnchorVert;
              RcClassDefault   : byte;     { default class number for new items }
              FActiveLayer     : integer;     { index of currently active layer }
              FMouseAffLayer   : array[1..MAXNUMRCLAYERS] of boolean;
                                                    { TRUE: mouse affects layer }
              Cpkx, Cpdx       : array[1..MAXNUMRCLAYERS] of extended;
                                                 { params for scaling on x-axis }
              Cpky, Cpdy       : array[1..MAXNUMRCLAYERS] of extended;
                                                 { params for scaling on y-axis }
              RcXLabelType     : TFigType;                   { type of labeling }
              RcYLabelType     : TFigType;                   { type of labeling }
              FMousePosX       : double;       { mouse x position - real coords }
              FMousePosY       : double;       { mouse y position - real coords }
              FMCurFixed       : boolean;            { TRUE: fixed mouse cursor }
              FCrossHair       : array[1..MaxCrossH] of TCrossHair;{cross hairs }
              FTextLabels      : array[1..MaxTxtLbl] of TTextLabel;{text labels }
              FScalesX         : array[1..MAXNUMRCLAYERS] of TScale;
              FScalesY         : array[1..MAXNUMRCLAYERS] of TScale;
              FScalePropsX     : array[1..MAXNUMRCLAYERS] of TScalePropsHoriz;
              FScalePropsY     : array[1..MAXNUMRCLAYERS] of TScalePropsVert;
              FAvoidDupMarks   : boolean; { TRUE: avoid drawing duplicate marks }
              FDupMarksMinD    : integer; { minimum distance of duplicate marks }
              CHNext           : integer;  { index of crosshair picked by mouse }
              TLNext           : integer; { index of text label picked by mouse }
              FAutoRedraw      : boolean; {TRUE: automatic redraw on any change }
              FNumPPa          : longint;         { number of polyline segments }
              FTextFontStyle   : TFontStyles;       { font style of text labels }
              FTextBkStyle     : TTextBkg;    { background style of text labels }
              FTextBkColor     : TColor;      { background color of text labels }
              FTextAlignment   : TAlignment;                { alignment of text }
              Fxasp, Fyasp     : integer;              { pixel widths of canvas }
              FIsometric       : boolean;          { TRUE: scales are isometric }
              FTranspItems     : boolean;{TRUE: transparent ellipse & rectangle }
              FZoomStack       : array[1..MAXNUMRCLAYERS, 1..MaxZoomStack] of
                                    TRectDouble;
              FZStackPoi       : integer;                  { zoom stack pointer }
              FZoomRange       : array[1..4] of extended; { confined zoom range }
              function  AddScaleInscription (Instring: string;
                           Inscr: string): string;
              procedure AdjustCanInfoOfSharedCharts;
              procedure AdjustScaling; virtual;
{$IFDEF SDLDEBUG}
              function  CompStateAsText: string;
{$ENDIF}
              function  ExtractUserText (TickText: string; ix: integer): string;
              procedure ForceRange (Layer: integer; xLo, yLo, xHi, yHi: extended;
                           EnterToZoomStack: boolean; ConfineRange: boolean);
              procedure ForceRngIntern (Layer: integer; xLo, yLo, xHi,
                           yHi: extended; EnterToZoomStack: boolean;
                           ConfineRange: boolean);
              procedure SetRangeIntern (Layer: integer; xLo, yLo, xHi,
                           yHi: extended; EnterToZoomStack: boolean;
                           ConfineRange: boolean);
              function  GetTypeOfFirstItem: TrcItem;
              function  GetTypeOfLastItem: TrcItem;
              function  GetClassVisib (cnum: byte): boolean;
              function  GetChartItem (idx: longint): TrcChartItem;
              function  GetMTracePoint (idx: longint): TColoredPoint;
              function  GetCHPosX (chnum: integer): double;
              function  GetCHPosY (chnum: integer): double;
              function  GetCrossHair1: TCrossHair;
              function  GetCrossHair2: TCrossHair;
              function  GetCrossHair3: TCrossHair;
              function  GetCrossHair4: TCrossHair;
              function  GetLayerVisib (Layer: integer): boolean;
              function  GetMAffLayer (layer: integer): boolean;
              function  GetScalePropsX1: TScalePropsHoriz;
              function  GetScalePropsY1: TScalePropsVert;
              function  GetScalePropsX2: TScalePropsHoriz;
              function  GetScalePropsY2: TScalePropsVert;
{$IFDEF PAIDVERS}
              function  GetScalePropsX3: TScalePropsHoriz;
              function  GetScalePropsY3: TScalePropsVert;
              function  GetScalePropsX4: TScalePropsHoriz;
              function  GetScalePropsY4: TScalePropsVert;
{$ENDIF}
              procedure BackupColorsAndMakeBW;
              procedure ReloadBackupColors;
              function  GetScalePropsX (sclix: integer): TScalePropsHoriz;
              function  GetScalePropsY (sclix: integer): TScalePropsVert;
              function  GetItemCount (it: TrcItem): longint;
              function  GetFTextLabel (ix: integer): TTextLabel;
              function  GetTickPosX (ix: integer): double;
              function  GetTickPosXCnt: integer;
              function  GetTickPosY (ix: integer): double;
              function  GetTickPosYCnt: integer;
              function  GetMousePosX: double;
              function  GetMousePosY: double;
              function  GetZoomStackEntry (Layer, StackIx: integer): TRectDouble;

              procedure LLCalcExtents (Layer: integer; Rim, MinRng: double;
                           var xLo, yLo, xHi, yHi: double);
              procedure LLCalcMinMax (Layer: integer; RangeLoX, RangeLoY, RangeHiX,
                           RangeHiY: double; var xLo, yLo, xHi, yHi: double);
              procedure ResetComp;
              procedure SetAllocSize (alloc: integer);
              procedure SetActiveLayer (lay: integer);
              procedure SetChartitem (idx: longint; item: TrcChartItem);
              procedure SetClassVisib (cnum: byte; value: boolean);
              procedure SetCHPosX (chnum: integer; value: double);
              procedure SetCHPosY (chnum: integer; value: double);
              procedure SetDupMarksMinD (value: integer);
              procedure SetLRim (r: integer);
              procedure SetRRim (r: integer);
              procedure SetTRim (r: INTEGER);
              procedure SetBRim (r: integer);
              procedure SetIsoMetric (im: boolean);
              procedure SetAvoidDupMarks (value: boolean);
              procedure SetLayerVisib (Layer: integer; value: boolean);
              procedure SetMAffLayer (layer: integer; value: boolean);
              procedure SetUseDataOf (orc: TCustomRChart);
              procedure SetF3DRim (r: integer);
              procedure SetDataTag (tag: longint);
              procedure SetShadowStyle (ss: TShadowStyle);
              procedure SetShadowColor (c: TColor);
              procedure SetShadowBakColor (c: TColor);
              procedure SetClassDefault (DefClass: byte);
              procedure SetCrossHair1 (x: TCrossHair);
              procedure SetCrossHair2 (x: TCrossHair);
              procedure SetCrossHair3 (x: TCrossHair);
              procedure SetCrossHair4 (x: TCrossHair);
              procedure SetScalePropsX1 (x: TScalePropsHoriz);
              procedure SetScalePropsY1 (x: TScalePropsVert);
              procedure SetScalePropsX2 (x: TScalePropsHoriz);
              procedure SetScalePropsY2 (x: TScalePropsVert);
{$IFDEF PAIDVERS}
              procedure SetScalePropsX3 (x: TScalePropsHoriz);
              procedure SetScalePropsY3 (x: TScalePropsVert);
              procedure SetScalePropsX4 (x: TScalePropsHoriz);
              procedure SetScalePropsY4 (x: TScalePropsVert);
{$ENDIF}
              procedure SetScalePropsX (sclix: integer; x: TScalePropsHoriz);
              procedure SetScalePropsY (sclix: integer; x: TScalePropsVert);
              procedure SetScaleProps (var Scl: TScale; SclProps: TScaleProps);
              procedure SetGridStyle (gs: GridStyleType);
              procedure SetGridDx (dx: double);
              procedure SetGridDy (dy: double);
              procedure SetDataCol (c: TColor);
              procedure SetScaleCol (c: TColor);
              procedure SetFillCol (c: TColor);
              procedure SetChartCol (c: TColor);
              procedure SetWindCol (c: TColor);
              procedure SetGridCol (c: TColor);
              procedure SetChartCaption (hstr: string);
              procedure SetCaptPosX (p: integer);
              procedure SetCaptPosY (p: integer);
              procedure SetCaptAlignment (al: TAlignment);
              procedure SetCaptAnchorX (ca: TCaptionAnchorHoriz);
              procedure SetCaptAnchorY (ca: TCaptionAnchorVert);
              procedure SetPenStyle (ps: TPenStyle);
              procedure SetLineWid (w: byte);
              procedure WMMouseMoveInChart(var Message: TWMMouse);
                           message WM_MOUSEMOVE;
              {$IFNDEF ISCLX}   //&&& DHACK
              procedure CMMouseLeave(var msg:TMessage); message CM_MOUSELeave;
              procedure CMMouseEnter(var msg:TMessage); message CM_MOUSEEnter;
              {$ENDIF}
              procedure WMGetDlgCode(var message: TWMGetDlgCode);
                           message WM_GETDLGCODE;
              procedure SetTextFontStyle (tfs: TFontStyles);
              procedure SetTextBkStyle (bs: TTextBkg);
              procedure SetTextBkColor (bc: TColor);
              procedure SetTextAlignment (al: TAlignment);
              procedure SetFTextLabel (ix: integer; value: TTextLabel);
              procedure SetJointLayers (value: TJointLayers);
              procedure SetBakGndFile (x: TBakGndImg);
              procedure SetStdLayout (lyt: TRCLayout);
              procedure ZoomStateOnStack;

            protected
              FDataContainer  : array of TrcChartItem;{ array of drawing items }
              FLastElemOnShow : longint; { index of last entry when
                                           ShowGraf is called }
              FItemCount      : array[TrcItem] of longint;     { element count }
              FSuppressPaint  : boolean;      { TRUE: suppress all paint calls }
              procedure Assign(Source: TPersistent); override;
              procedure AssignTo (Dest: TPersistent); override;
              procedure Paint; override;
              procedure Loaded; override;
              procedure DblClick; override;
              procedure InitGraf (cv: TCanvas;
                           PosX, PosY, Wid, Hgt: integer); virtual;
              procedure ConstructChartBmp(cv: TCanvas);
              procedure ConstructDataBmp (bmp: TBitMap; PosX, PosY: integer;
                           BlkWhite: boolean; FirstItem: integer); virtual;
              procedure ConstructDataBmpCanvas (cv: TCanvas; PosX, PosY: integer;
                           BlkWhite: boolean; FirstItem: integer); virtual;
              procedure DrawCrossHairs (xPos, yPos: integer; SrcBmp: TBitMap);
              procedure DrawMouseTrace (xPos, yPos: integer; SrcBmp: TBitMap);
              procedure DrawFinish (xPos, yPos: integer;
                                    SrcBmp: TBitMap; DestCv: TCanvas);
              procedure MouseMove (Shift: TShiftState; X,Y: integer); override;
              procedure MouseMoveInChart (InChart: boolean; Shift: TShiftState;
                                          RMousePosX, RMousePosY: double);
              procedure MouseDown (Button: TMouseButton;
                                   Shift: TShiftState; X, Y: Integer); override;
              procedure MouseUp (Button: TMouseButton;
                                 Shift: TShiftState; X, Y: Integer); override;
              procedure StyleChanged (Sender: TObject);
              procedure ScalePropsChanged(Sender: TObject);
              procedure SetSuppressPaint (supp: boolean); virtual;
              procedure DoOnScaleTickDrawn (Sender: TObject; Canvas: TCanvas;
                            ScaleType: TScaleType; CurrentTickPos: double;
                            ChartX, ChartY: integer);
              procedure DoOnBeforeTickLabel (Sender: TObject;
                            ScaleType: TScaleType; CurrentTickPos: double;
                            var TickLabel: string);
              procedure DoZoomPanEvent;
              procedure DoSelectRectEvent (Layer: integer;
                            LoX, LoY, HiX, HiY: double);
              procedure DoRubberBandEvent (Layer: integer;
                            LoX, LoY, HiX, HiY: double);
              procedure DoCrossHMoveEvent (WhichCH: TCrossHair);
              procedure DoTxtLblMoveEvent (WhichTL: TTextLabel);

                       // properties and method to be public
              procedure M2R (Layer: integer; xin,yin: longint;
                             var xout,yout: double);
              procedure R2M (Layer: integer; xin,yin: double;
                             var xout,yout: longint);
              procedure ClearGraf;
              procedure ConfineZoomRange (xLo, yLo, xHi, yHi: double);
              procedure ShowGraf;
              procedure ShowGrafNewOnly;
              function  MouseBox (var xLo, yLo, xHi, yHi: double): boolean;
              procedure MouseBoxAbort;
                                                           { draw }
              property  ActiveLayer: integer
                           read FActiveLayer write SetActiveLayer;
              function  AddTextLabel (PosX, PosY: double; TxtColor: TColor;
                           Txt: string; PropertyTemplate: integer): integer;
              procedure Arc (cx, cy, HorizAxLeng, VertAxLeng, Angle1, Angle2: double);
              procedure Arrow (x1,y1, x2,y2: double; HeadSize: integer);
              procedure Bar3D (llx, lly, urx, ury: double;
                               Depth: integer; Angle: integer);
              procedure ClearAllTextLabels;
              procedure ClearMouseTrace;
              procedure ClearZoomHistory;
              procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite: boolean); overload;
              procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite,
                               IncludeCrossHairs: boolean); overload;
              procedure CopyToBitmapDAOnly (ABitmap: TBitmap; 
                               BlkWhite: boolean); overload;
              procedure CopyToBitmapDAOnly (ABitmap: TBitmap; BlkWhite,
                               IncludeCrossHairs: boolean); overload;
              procedure CopyToBMP (FName: string; BlkWhite: boolean);
              procedure CopyToClipboard (BlkWhite: boolean); overload;
              procedure CopyToClipboard (BlkWhite, 
                           IncludeCrossHairs: boolean); overload;
              procedure CopyToClipboardDAOnly (BlkWhite: boolean); overload;
              procedure CopyToClipboardDAOnly (BlkWhite, 
                           IncludeCrossHairs: boolean); overload;
{$IFNDEF ISCLX}
              procedure CopyToClipboardWMF (BlkWhite: boolean);
              procedure CopyToWMF (FName: string; BlkWhite: boolean);
              procedure CopyToOpenPrinter (var x,y: integer; ScaleF: double;
                           BlkWhite: boolean);
              procedure PrintIt (ScaleF: double; BlkWhite: boolean);
{$ENDIF}
              property  DataContainer[idx: longint]: TrcChartItem
                           read GetChartItem write SetChartItem;
              property  CrossHairPosX [chnum: integer]: double
                           read GetCHPosX write SetCHPosX;
              property  CrossHairPosY [chnum: integer]: double
                           read GetCHPosY write SetCHPosY;
              procedure CrossHairSetPos (chnum: integer; x,y: double);
              procedure CrossHairSetup (ch: integer; chColor: TColor;
                           Mode: TCrossHMode; LineType: TPenStyle;
                           LineWidth: integer);
              property  DataTag: longint read FDataTag write SetDataTag;
              procedure DrawTo (x,y: double);
              procedure DrawToRelPix (dx,dy: integer);
              procedure Ellipse (cx, cy, HorizAxLeng, VertAxLeng: double);
              procedure HideAllTextLabels;
              procedure Line (x1,y1, x2, y2: double);
              procedure LineOffset (x1,y1, x2, y2: double; dx, dy: integer);
              procedure MoveTo (x,y: double);
              procedure MoveToRelPix (dx,dy: integer);
              procedure MarkAt (x,y: double; mk: byte);
              procedure MarkErrorBar (x,y: double; dlower, dupper: double;
                          Dir: TOrientation; mk: byte);
              procedure Rectangle (x1,y1, x2, y2: double);
              procedure RectangleRelPix (centx,centy: double; dx, dy: integer);
              procedure RectFrame (x1,y1, x2, y2: double; FrameStyle: TFrameStyle;
                           ShadowColor, HiLightColor: TColor);
              procedure SaveDataASC (FName: string);
{$IFNDEF DOTNET}
              procedure SaveData (FName: string);
              procedure LoadData (FName: string; AppendIt: boolean);
{$ENDIF}
              procedure SetRange (Layer: integer; xLo, yLo, xHi, yHi: extended);
              procedure AutoRange (Layer: integer; Margin: double); overload;
              procedure AutoRange (Layer: integer;
                           Margin, MinRange: double); overload;
              procedure AutoRangeXOnly (Layer: integer;
                           Margin: double); overload;
              procedure AutoRangeXOnly (Layer: integer;
                           Margin, MinRange: double); overload;
              procedure AutoRangeYOnly (Layer: integer;
                           Margin: double); overload;
              procedure AutoRangeYOnly (Layer: integer;
                           Margin, MinRange: double); overload;
              procedure SetEqualRange (Layers: TLayerSet);
              procedure SetEqualRangeXOnly (Layers: TLayerSet);
              procedure SetEqualRangeYOnly (Layers: TLayerSet);
              procedure Text (x,y: double; size: integer; txt: string); overload;
              procedure Text (x,y: double; size: integer; txt: string;
                           dx, dy: integer; Alignment: TAlignment); overload;
                                                           { process single item }
              procedure RemoveLastItem;
              procedure RemoveFirstItem;
              procedure RemoveItem (Index: longint);
              function  RemoveItemsByClass (ClassNumber: byte): longint;
              function  RemoveItemsByLayer (Layer: integer): longint;
              procedure FindMinMax (Layer: integer; RangeLoX, RangeLoY, RangeHiX,
                           RangeHiY: double; var MinX, MinY, MaxX, MaxY: double);
              function  FindNearestItemReal (mx, my: double; ItemID: TrcItem;
                           ClassNumber: byte; var Dist: double): longint;
              function  FindNearestItemScreen (mx, my: double; ItemID: TrcItem;
                           ClassNumber: byte; var Dist: double): longint;
              function  FindNearestItemAlongAxis (pos: double; Axis: TAxis;
                           ItemID: TrcItem; ClassNumber: byte;
                           var dist: double): longint;
              function  FindUsedLayers: TLayerSet;
              function  GetItemParams (Item: longint): TrcChartItem;
              property  ItemCount[it: TrcItem]: longint read GetItemCount;
              procedure SetItemParams (Item: longint; ItParams: TrcChartItem);
              procedure ScaleItem (Item: longint; kx, dx, ky, dy: double);
                                                           { process more items }
              function  MarkItemsInWindow (xLo, YLo, XHi, YHi: double;
                           ItemID: TrcItem; ClassNumber: byte): longint;
              procedure MarkAllItems (ItemID: TrcItem; ClassNumber: byte);
              property  MinDupMarkDist: integer
                           read FDupMarksMinD write SetDupMarksMinD;
              property  MouseAffectsLayer[Layer: integer]: boolean
                           read GetMAffLayer write SetMAffLayer;
              property  MousePosX: double read GetMousePosX;
              property  MousePosY: double read GetMousePosY;
              property  MouseTrace[idx: longint]: TColoredPoint
                           read GetMTracePoint;
              property  NumMTracePoints: longint read FNumMTrace;
              property  NumItems: longint read FNumChartItems;
              property  ClassVisible [cnum:byte]: boolean
                           read GetClassVisib write SetClassVisib;
              property  LayerVisible [layer: integer]: boolean
                           read GetLayerVisib write SetLayerVisib;
              procedure ScaleAllItems (kx, dx, ky, dy: double);
              property  ScalePropsX [SclIx: integer]: TScalePropsHoriz
                           read GetScalePropsX write setScalePropsX;
              property  ScalePropsY [SclIx: integer]: TScalePropsVert
                           read GetScalePropsY write setScalePropsY;
              procedure ScaleSelectedItems (kx, dx, ky, dy: double;
                           ClassNumber: byte);
              procedure SetTextLabel (Idx: integer; PosX, PosY: double;
                           TxtColor: TColor; Txt: string;
                           PropertyTemplate: integer);
              property  SuppressPaint: boolean
                           read FSuppressPaint write SetSuppressPaint;
              property  TransparentItems: boolean
                           read FTranspItems write FTranspItems;
              property  TypeOfLastItem: TrcItem read GetTypeOfLastItem;
              property  TypeOfFirstItem: TrcItem read GetTypeOfFirstItem;
              procedure NewColorOfClassItems (Newcol: TColor; ClassNumber: byte);
              property  TextLabels[ix: integer]: TTextLabel
                           read GetFTextLabel write SetFTextLabel;
              property  TickPosX [ix: integer]: double read GetTickPosX;
              property  TickPosY [iy: integer]: double read GetTickPosY;
              property  TickNumX: integer read GetTickPosXCnt;
              property  TickNumY: integer read GetTickPosYCnt;
              property  ZoomState: TZoomState read FZoomState;
              procedure ZoomHistory (Index: integer);
              property  ZoomStack [Layer, StackIx: integer]: TRectDouble
                           read GetZoomStackEntry;

                      // properties to be published
              property Font;
              property Align;
              property Visible;
              property ShowHint;
              property PopupMenu;
              property Anchors;
              property Constraints;
{$IFNDEF ISCLX}
              property DragKind;
              property DragCursor;
              property DragMode;
{$ENDIF}
              property AllocSize: integer read FAllocSize write SetAllocSize;
              property AutoRedraw: boolean read FAutoRedraw write FAutoRedraw;
              property LRim: integer read RcLrim write SetLRim default DefLRim;
              property RRim: integer read RcRRim write SetRRim default DefRRim;
              property TRim: integer read RcTRim write SetTRim default DefTRim;
              property BRim: integer read RcBRim write SetBRim default DefBRim;
              property MarginLeft: integer
                           read RcLrim write SetLRim default DefLRim;
              property MarginRight: integer
                           read RcRRim write SetRRim default DefRRim;
              property MarginTop: integer
                           read RcTRim write SetTRim default DefTRim;
              property MarginBottom: integer
                           read RcBRim write SetBRim default DefBRim;
              property BackGroundImg: TBakGndImg
                           read FBakGndFile write SetBakGndFile;
              property ClassDefault: byte
                           read RcClassDefault write SetClassDefault;
              property GridStyle: GridStyleType
                           read RcGridStyle write SetGridStyle;
              property GridDx: double read RcGridDx write SetGridDx;
              property GridDy: double read RcGridDy write SetGridDy;
              property Isometric: boolean read FIsoMetric write SetIsoMetric;
              property DataColor: TColor
                          read RcDataCol write SetDataCol default DefDataCol;
              property PenStyle: TPenStyle
                          read RcPenStyle write SetPenStyle default DefPenStyle;
              property ChartFrameColor: TColor
                          read FChartFrameCol write SetScaleCol
                          default DefChartFrameCol;
              property FillColor: TColor
                          read RcFillCol write SetFillCol default DefFillCol;
              property ChartColor: TColor
                          read RcChartCol write SetChartCol default DefChartCol;
              property WindColor: TColor
                          read RcWindCol write SetWindCol default DefWindCol;
              property GridColor: TColor
                          read RcGridCol write SetGridCol default DefGridCol;
              property JointLayers: TJointLayers
                          read FJointLayers write SetJointLayers;
              property LineWidth: byte
                          read RcLineWid write SetLineWid default DefLineWid;
              property Caption: string read FChartCaption write SetChartCaption;
              property CaptionPosX: integer read FCaptPosX write SetCaptPosX;
              property CaptionPosY: integer read FCaptPosY write SetCaptPosY;
              property CaptionAlignment: TAlignment
                          read FCaptAlignment write SetCaptAlignment;
              property CaptionAnchorHoriz: TCaptionAnchorHoriz
                          read FCaptAnchorX write SetCaptAnchorX;
              property CaptionAnchorVert: TCaptionAnchorVert
                          read FCaptAnchorY write SetCaptAnchorY;
              property MouseTraceColor: TColor
                          read FColorMTrace write FColorMTrace;
              property MouseTraceInvert: boolean
                          read FMTraceInvert write FMTraceInvert;
              property CrossHair1: TCrossHair
                          read GetCrossHair1 write SetCrossHair1;
              property CrossHair2: TCrossHair
                          read GetCrossHair2 write SetCrossHair2;
              property CrossHair3: TCrossHair
                          read GetCrossHair3 write SetCrossHair3;
              property CrossHair4: TCrossHair
                          read GetCrossHair4 write SetCrossHair4;
              property MouseAction: TMouseActMode  
                          read RcMouseAction write RcMouseAction;
              property MouseCursorFixed: boolean
                          read FMCurFixed write FMCurFixed;
              property PanGridDx: double read FPanGridDx write FPanGridDx;
              property PanGridDy: double read FPanGridDy write FPanGridDy;
              property AvoidDuplicateMarks: boolean
                          read FAvoidDupMarks write SetAvoidDupMarks;
              property Scale1X: TScalePropsHoriz
                          read GetScalePropsX1 write SetScalePropsX1;
              property Scale1Y: TScalePropsVert
                          read GetScalePropsY1 write SetScalePropsY1;
              property Scale2X: TScalePropsHoriz
                          read GetScalePropsX2 write SetScalePropsX2;
              property Scale2Y: TScalePropsVert
                          read GetScalePropsY2 write SetScalePropsY2;
{$IFDEF PAIDVERS}
              property Scale3X: TScalePropsHoriz
                          read GetScalePropsX3 write SetScalePropsX3;
              property Scale3Y: TScalePropsVert
                          read GetScalePropsY3 write SetScalePropsY3;
              property Scale4X: TScalePropsHoriz
                          read GetScalePropsX4 write SetScalePropsX4;
              property Scale4Y: TScalePropsVert
                          read GetScalePropsY4 write SetScalePropsY4;
{$ENDIF}
              property StandardLayout: TRCLayout
                          read FStdLayout write SetStdLayout stored false;
              property ShadowWidth: integer
                          read F3DRim write SetF3DRim default DefShadowWidth;
              property ShadowStyle: TShadowStyle
                          read RcShadowStyle write SetShadowStyle;
              property ShadowColor: TColor
                          read FShadowColor write SetShadowColor;
              property ShadowBakColor: TColor
                          read RcShadowBakCol write SetShadowBakColor;
              property UseDataOf: TCustomRChart
                          read FUseDataOf write SetUseDataOf;
              property TextFontStyle: TFontStyles
                          read FTextFontStyle write SetTextFontStyle;
              property TextBkStyle: TTextBkg
                          read FTextBkStyle write SetTextBkStyle;
              property TextBkColor: TColor
                          read FTextBkColor write SetTextBkColor;
              property TextAlignment: TAlignment
                          read FTextAlignment write SetTextAlignment;
              property OnClick;
              property OnDblClick;
              property OnDragDrop;
              property OnDragOver;
              property OnEndDrag;
              property OnMouseMove;
              property OnMouseDown;
              property OnMouseUp;
              property OnMouseEnter: TNotifyEvent
                          read FOnMouseEnter write FOnMouseEnter;
              property OnMouseLeave: TNotifyEvent
                          read FOnMouseLeave write FOnMouseLeave;
              property OnKeyDown;
              property OnKeyUp;
              property OnKeyPress;
              property OnMouseMoveInChart: TMouseMoveInChartEvent
                          read FOnMMvInChart write FOnMMvInChart;
              property OnRubberBand: TSelectRectEvent
                          read FOnRubberBand write FOnRubberBand;
              property OnSelectRect: TSelectRectEvent
                          read FOnSelectRect write FOnSelectRect;
              property OnZoomPan: TZoomPanEvent
                          read FOnZoomPan write FOnZoomPan;
              property OnScaleTickDrawn: TScaleTickDrawnEvent
                          read FOnScaleTickDrawn write FOnScaleTickDrawn;
              property OnBeforeTickLabel: TBeforeTickLabelEvent
                          read FOnBeforeTickLabel write FOnBeforeTickLabel;
              property OnBeforeRenderData: TRenderEvent
                          read FOnBefRenderData write FOnBefRenderData;
              property OnBeforeCrossHairMove: TBeforeCrossHMoveEvent
                          read FOnBefCrossHMove write FOnBefCrossHMove;
              property OnDataRendered: TRenderEvent
                          read FOnDataRendered write FOnDataRendered;
              property OnScalesRendered: TRenderEvent
                          read FOnScalesRendered write FOnScalesRendered;
              property OnStartDrag;
              property OnCrossHairMove: TCrossHairMoveEvent
                          read FOnCrossHMove write FOnCrossHMove;
              property OnTextLabelMove: TTextLabelMoveEvent
                          read FOnTxtLblMove write FOnTxtLblMove;
    {$IFNDEF ISCLX}  // Kylix does not know OnCanResize
              property OnCanResize;
              property OnResize;
    {$ENDIF}
            public
              constructor Create(AOwner: TComponent); override;
              destructor Destroy; override;
              procedure SetBounds (ALeft, ATop, AWidth, AHeight: Integer); override;
            end;


  TRChart = class (TCustomRChart)
              protected
                procedure CreateWnd; override;
              public
                procedure Assign(Source: TPersistent);
                procedure M2R (Layer: integer; xin,yin: longint;
                               var xout,yout: double);
                procedure R2M (Layer: integer; xin,yin: double;
                               var xout,yout: longint);
                procedure ClearGraf;
                procedure ConfineZoomRange (xLo, yLo, xHi, yHi: double);
                procedure ShowGraf;
                procedure ShowGrafNewOnly;
                procedure SetBounds (ALeft, ATop, AWidth,
                             AHeight: Integer); override;
                function  MouseBox (var xLo, yLo, xHi, yHi: double): boolean;
                procedure MouseBoxAbort;

                property  ActiveLayer;
                function  AddTextLabel (PosX, PosY: double; TxtColor: TColor;
                             Txt: string; PropertyTemplate: integer): integer;
                procedure HideAllTextLabels;
                procedure ClearAllTextLabels;
                procedure Arc (cx, cy, HorizAxLeng, VertAxLeng, Angle1, Angle2: double);
                procedure Arrow (x1,y1, x2,y2: double; HeadSize: integer);
                procedure Bar3D (llx, lly, urx, ury: double;
                             Depth: integer; Angle: integer);
                procedure ClearMouseTrace;
                procedure ClearZoomHistory;
                procedure CopyToBitmap (ABitmap: TBitmap;
                             BlkWhite: boolean); overload;
                procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite,
                             IncludeCrossHairs: boolean); overload;
                procedure CopyToBitmapDAOnly (ABitmap: TBitmap;
                             BlkWhite: boolean); overload;
                procedure CopyToBitmapDAOnly (ABitmap: TBitmap; BlkWhite,
                             IncludeCrossHairs: boolean); overload;
                procedure CopyToBMP (FName: string; BlkWhite: boolean);
                procedure CopyToClipboard (BlkWhite: boolean); overload;
                procedure CopyToClipboard (BlkWhite,
                             IncludeCrossHairs: boolean); overload;
                procedure CopyToClipboardDAOnly (BlkWhite: boolean);overload;
                procedure CopyToClipboardDAOnly (BlkWhite,
                             IncludeCrossHairs: boolean); overload;
  {$IFNDEF ISCLX}
                procedure CopyToClipboardWMF (BlkWhite: boolean);
                procedure CopyToWMF (FName: string; BlkWhite: boolean);
                procedure CopyToOpenPrinter (var x,y: integer; ScaleF: double;
                             BlkWhite: boolean);
                procedure PrintIt (ScaleF: double; BlkWhite: boolean);
  {$ENDIF}

                property  DataContainer;
                property  CrossHairPosX;
                property  CrossHairPosY;
                procedure CrossHairSetPos (chnum: integer; x,y: double);
                procedure CrossHairSetup (ch: integer; chColor: TColor;
                             Mode: TCrossHMode; LineType: TPenStyle;
                             LineWidth: integer);
                property  DataTag;
                procedure DrawTo (x,y: double);
                procedure DrawToRelPix (dx,dy: integer);
                procedure Ellipse (cx, cy, HorizAxLeng, VertAxLeng: double);
                procedure Line (x1,y1, x2, y2: double);
                procedure LineOffset (x1,y1, x2, y2: double; dx, dy: integer);
                procedure MoveTo (x,y: double);
                procedure MoveToRelPix (dx,dy: integer);
                procedure MarkAt (x,y: double; mk: byte);
                procedure MarkErrorBar (x,y: double; dlower, dupper: double;
                            Dir: TOrientation; mk: byte);
                procedure Rectangle (x1,y1, x2, y2: double);
                procedure RectangleRelPix (centx,centy: double; dx, dy: integer);
                procedure RectFrame (x1,y1, x2, y2: double;
                             FrameStyle: TFrameStyle;
                             ShadowColor, HiLightColor: TColor);
                procedure SaveDataASC (FName: string);
  {$IFNDEF DOTNET}
                procedure SaveData (FName: string);
                procedure LoadData (FName: string; AppendIt: boolean);
  {$ENDIF}
                procedure SetRange (Layer: integer; xLo, yLo, xHi, yHi: extended);
                procedure AutoRange (Layer: integer; Margin: double); overload;
                procedure AutoRange (Layer: integer;
                             Margin, MinRange: double); overload;
                procedure AutoRangeXOnly (Layer: integer;
                             Margin: double); overload;
                procedure AutoRangeXOnly (Layer: integer;
                             Margin, MinRange: double); overload;
                procedure AutoRangeYOnly (Layer: integer;
                             Margin: double); overload;
                procedure AutoRangeYOnly (Layer: integer;
                             Margin, MinRange: double); overload;
                procedure SetEqualRange (Layers: TLayerSet);
                procedure SetEqualRangeXOnly (Layers: TLayerSet);
                procedure SetEqualRangeYOnly (Layers: TLayerSet);
                procedure Text (x,y: double; size: integer; txt: string); overload;
                procedure Text (x,y: double; size: integer; txt: string;
                             dx, dy: integer; Alignment: TAlignment); overload;

                                                          { process single item }
                procedure RemoveLastItem;
                procedure RemoveFirstItem;
                procedure RemoveItem (Index: longint);
                function  RemoveItemsByClass (ClassNumber: byte): longint;
                function  RemoveItemsByLayer (Layer: integer): longint;
                procedure FindMinMax (Layer: integer; RangeLoX, RangeLoY,
                             RangeHiX, RangeHiY: double;
                             var MinX, MinY, MaxX, MaxY: double);
                function  FindNearestItemReal (mx, my: double; ItemID: TrcItem;
                             ClassNumber: byte; var Dist: double): longint;
                function  FindNearestItemScreen (mx, my: double; ItemID: TrcItem;
                             ClassNumber: byte; var Dist: double): longint;
                function  FindNearestItemAlongAxis (pos: double; Axis: TAxis;
                             ItemID: TrcItem; ClassNumber: byte;
                             var dist: double): longint;
                function  FindUsedLayers: TLayerSet;
                function  GetItemParams (Item: longint): TrcChartItem;
                property  ItemCount;
                procedure SetItemParams (Item: longint; ItParams: TrcChartItem);
                procedure ScaleItem (Item: longint; kx, dx, ky, dy: double);
                                                             { process more items }
                function  MarkItemsInWindow (xLo, YLo, XHi, YHi: double;
                             ItemID: TrcItem; ClassNumber: byte): longint;
                procedure MarkAllItems (ItemID: TrcItem; ClassNumber: byte);
                property  MouseAffectsLayer;
                property  MousePosX;
                property  MousePosY;
                property  MouseTrace[idx: longint]: TColoredPoint
                              read GetMTracePoint;
                property  NumMTracePoints: longint read FNumMTrace;
                property  NumItems;
                property  ClassVisible;
                property  LayerVisible;
                procedure ResetComp;
                procedure ScaleAllItems (kx, dx, ky, dy: double);
                property  ScalePropsX;
                property  ScalePropsY;
                procedure ScaleSelectedItems (kx, dx, ky, dy: double;
                             ClassNumber: byte);
                procedure SetTextLabel (Idx: integer; PosX, PosY: double;
                             TxtColor: TColor; Txt: string;
                             PropertyTemplate: integer);
                property  SuppressPaint;
                property  TransparentItems;
                property  TypeOfLastItem;
                property  TypeOfFirstItem;
                procedure NewColorOfClassItems (Newcol: TColor;
                             ClassNumber: byte);
                property  TextLabels;
                property  TickPosX;
                property  TickPosY;
                property  TickNumX;
                property  TickNumY;
                property  ZoomState;
                procedure ZoomHistory (Index: integer);
                property  ZoomStack;
              published
                property Font;
                property Align;
                property AvoidDuplicateMarks;
                property Visible;
                property ShowHint;
                property PopupMenu;
                property Anchors;
                property Constraints;
  {$IFNDEF ISCLX}
                property DragKind;
                property DragCursor;
                property DragMode;
  {$ENDIF}
                property AllocSize;
                property AutoRedraw;
                property MarginLeft;
                property MarginRight;
                property MarginTop;
                property MarginBottom;
                property MinDupMarkDist;
                property LRim;
                property RRim;
                property TRim;
                property BRim;
                property BackGroundImg;
                property ClassDefault;
                property GridStyle;
                property GridDx;
                property GridDy;
                property Isometric;
                property DataColor;
                property PenStyle;
                property ChartFrameColor;
                property FillColor;
                property ChartColor;
                property WindColor;
                property GridColor;
                property JointLayers;
                property LineWidth;
                property Caption;
                property CaptionPosX;
                property CaptionPosY;
                property CaptionAlignment;
                property CaptionAnchorHoriz;
                property CaptionAnchorVert;
                property MouseTraceColor;
                property MouseTraceInvert;
                property CrossHair1;
                property CrossHair2;
                property CrossHair3;
                property CrossHair4;
                property MouseAction;
                property MouseCursorFixed;
                property PanGridDx;
                property PanGridDy;
                property Scale1X;
                property Scale1Y;
                property Scale2X;
                property Scale2Y;
  {$IFDEF PAIDVERS}
                property Scale3X;
                property Scale3Y;
                property Scale4X;
                property Scale4Y;
  {$ENDIF}
                property StandardLayout;
                property ShadowWidth;
                property ShadowStyle;
                property ShadowColor;
                property ShadowBakColor;
{$IFDEF GE_LEV17}
                property StyleElements;
{$ENDIF}
                property UseDataOf;
                property TextFontStyle;
                property TextBkStyle;
                property TextBkColor;
                property TextAlignment;
                property OnClick;
                property OnDblClick;
                property OnDragDrop;
                property OnDragOver;
                property OnEndDrag;
                property OnMouseMove;
                property OnMouseDown;
                property OnMouseUp;
                property OnKeyDown;
                property OnKeyUp;
                property OnKeyPress;
                property OnMouseMoveInChart;
                property OnMouseEnter;
                property OnMouseLeave;
                property OnMouseWheel;
                property OnMouseWheelUp;
                property OnMouseWheelDown;
                property OnRubberBand;
                property OnSelectRect;
                property OnZoomPan;
                property OnScaleTickDrawn;
                property OnBeforeCrossHairMove;
                property OnBeforeTickLabel;
                property OnBeforeRenderData;
                property OnDataRendered;
                property OnScalesRendered;
                property OnStartDrag;
                property OnCrossHairMove;
                property OnTextLabelMove;
      {$IFNDEF ISCLX}  // Kylix does not know OnCanResize
                property OnCanResize;
                property OnResize;
      {$ENDIF}
              end;

  TSmithChart = class(TCustomRChart)
        private
          FGridColLight    : TColor;
          FGridColDark     : TColor;
          FDiagramColor    : TColor;
          procedure SetGridColLight (value: TColor);
          procedure SetGridColDark (value: TColor);
          function  GetCrossHair: TCrossHair;
          function  GetCrossHairPosX: double;
          procedure SetCrossHairPosX (value: double);
          function  GetCrossHairPosY: double;
          procedure SetCrossHairPosY (value: double);
          procedure SetCrossHair (x: TCrossHair);
          procedure SetDiagramColor (value: TColor);
          function  GetRangeLowX: double;
          function  GetRangeLowY: double;
          function  GetRangeHighX: double;
          function  GetRangeHighY: double;
          procedure SetRangeLowX (value: double);
          procedure SetRangeHighX (value: double);
          procedure SetRangeLowY (value: double);
        protected
          procedure CreateWnd; override;
          procedure Paint; override;
          procedure AssignTo (Dest: TPersistent); override;
          procedure InitGraf (cv: TCanvas; PosX, PosY, Wid, Hgt: integer); override;
        public
          procedure M2R (xin,yin: longint; var ReflReal,ReflImag: double);
          procedure R2M (ReflReal,ReflImag: double; var xout,yout: longint);
          procedure Assign(Source: TPersistent); override;
          constructor Create(AOwner: TComponent); override;
          function  CalcReflectionReal (Resistance, Reactance: double): double;
          function  CalcReflectionImag (Resistance, Reactance: double): double;
          function  CalcResistance (ReflectionReal, ReflectionImag: double): double;
          function  CalcReactance (ReflectionReal, ReflectionImag: double): double;
          procedure ClearGraf;
          procedure ShowGraf;
          procedure ShowGrafNewOnly;
          procedure MarkAt (x,y: double; mk: byte);
          procedure DrawTo (x,y: double);
          procedure MoveTo (x,y: double);
          property  SuppressPaint;
          procedure SetRange (xLo, yLo, xHi, yHi: extended);
          procedure AutoRange (Margin: double); overload;
          procedure AutoRange (Margin, MinRange: double); overload;
          function  AddTextLabel (PosX, PosY: double; TxtColor: TColor;
                       Txt: string; PropertyTemplate: integer): integer;
          procedure HideAllTextLabels;
          procedure ClearAllTextLabels;
          procedure CopyToClipboard (BlkWhite: boolean); overload;
          procedure CopyToClipboard (BlkWhite, 
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToClipboardDAOnly (BlkWhite: boolean);overload;
          procedure CopyToClipboardDAOnly (BlkWhite, 
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite: boolean); overload;
          procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite, 
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToBitmapDAOnly (ABitmap: TBitmap; 
                       BlkWhite: boolean); overload;
          procedure CopyToBitmapDAOnly (ABitmap: TBitmap; BlkWhite, 
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToBMP (FName: string; BlkWhite: boolean);
          procedure CopyToOpenPrinter (var x,y: integer; ScaleF: double; 
                       BlkWhite: boolean);
          procedure PrintIt (ScaleF: double; BlkWhite: boolean);
          procedure CenterChart;
          property  DataContainer;
          property  CrossHairPosX: double
                       read GetCrossHairPosX write SetCrossHairPosX;
          property  CrossHairPosY: double
                       read GetCrossHairPosY write SetCrossHairPosY;
          procedure CrossHairSetPos (x,y: double);
          procedure CrossHairSetup (chColor: TColor;
                       Mode: TCrossHMode; LineType: TPenStyle;
                       LineWidth: integer);
          property  DataTag;
          property  NumItems;
          procedure Line (x1,y1, x2, y2: double);
          procedure Rectangle (x1,y1, x2, y2: double);
          procedure RectangleRelPix (centx,centy: double; dx, dy: integer);
          procedure Ellipse (cx, cy, HorizAxLeng, VertAxLeng: double);
          procedure Text (refreal, refimag: double;
                       size: integer; txt: string); overload;
          procedure Text (refreal, refimag: double; size: integer; txt: string;
                       dx, dy: integer; Alignment: TAlignment); overload;

{$IFNDEF DOTNET}
          procedure SaveData (FName: string);
          procedure LoadData (FName: string; AppendIt: boolean);
{$ENDIF}
          procedure RemoveLastItem;
          procedure RemoveFirstItem;
          procedure RemoveItem (Index: longint);
          function  RemoveItemsByClass (ClassNumber: byte): longint;
          function  RemoveItemsByLayer (Layer: integer): longint;
          procedure FindMinMax (RangeLoX, RangeLoY, RangeHiX, RangeHiY: double;
                       var MinX, MinY, MaxX, MaxY: double);
          property  ItemCount;
          procedure SetTextLabel (Idx: integer; PosX, PosY: double;
                       TxtColor: TColor; Txt: string;
                       PropertyTemplate: integer);
          property  TextLabels;
          function  MarkItemsInWindow (ReflRealLow, ReflImagLow, ReflRealHigh,
                       ReflImagHigh: double; ItemID: TrcItem;
                       ClassNumber: byte): longint;
          procedure MarkAllItems (ItemID: TrcItem; ClassNumber: byte);
          property  ClassVisible;
          procedure NewColorOfClassItems (Newcol: TColor; ClassNumber: byte);
          property  MousePosX: double read FMousePosX;
          property  MousePosY: double read FMousePosY;
        published
          property Font;
          property Align;
          property AvoidDuplicateMarks;
          property MinDupMarkDist;
          property Visible;
          property ShowHint;
          property PopupMenu;
          property Anchors;
          property Constraints;
          property MarginLeft;
          property MarginRight;
          property MarginTop;
          property MarginBottom;
          property AllocSize;
          property AutoRedraw;
          property ClassDefault;
          property GridColorLight: TColor read FGridColLight write SetGridColLight;
          property GridColorDark: TColor read FGridColDark write SetGridColDark;
          property DataColor;
          property PenStyle;
          property FillColor;
          property ChartColor;
          property ChartFrameColor;
          property WindColor;
          property DiagramColor: TColor read FDiagramColor write SetDiagramColor;
          property LineWidth;
          property CrossHair: TCrossHair
                          read GetCrossHair write SetCrossHair;
          property Caption;
          property CaptionPosX;
          property CaptionPosY;
          property CaptionAlignment;
          property CaptionAnchorHoriz;
          property CaptionAnchorVert;
          property RangeXLow: double read GetRangeLowX write SetRangeLowX;
          property RangeXHigh: double read GetRangeHighX write SetRangeHighX;
          property RangeYLow: double read GetRangeLowY write SetRangeLowY;
          property RangeYHigh: double read GetRangeHighY;
          property MouseAction;
          property MouseCursorFixed;
          property ShadowWidth;
          property ShadowStyle;
          property ShadowColor;
          property ShadowBakColor;
{$IFDEF GE_LEV17}
(**)          property StyleElements;
{$ENDIF}
          property TextFontStyle;
          property TextBkStyle;
          property TextBkColor;
          property TextAlignment;
          property TransparentItems;
          property OnClick;
          property OnDblClick;
          property OnMouseMove;
          property OnMouseDown;
          property OnMouseUp;
          property OnMouseMoveInChart;
          property OnKeyDown;
          property OnKeyUp;
          property OnKeyPress;
          property OnMouseEnter;
          property OnMouseLeave;
          property OnMouseWheel;
          property OnMouseWheelUp;
          property OnMouseWheelDown;
          property OnRubberBand;
          property OnSelectRect;
          property OnZoomPan;
          property OnDataRendered;
          property OnBeforeCrossHairMove;
          property OnCrossHairMove;
          property OnTextLabelMove;
    {$IFNDEF ISCLX}  // Kylix does not know OnCanResize
          property OnCanResize;
          property OnResize;
    {$ENDIF}
        end;

  TRGB32 = packed record  // needed to speed up contour plot drawing
        B : Byte;
        G : Byte;
        R : Byte;
        A : Byte;
      end;
  TRGB32Array = packed array[0..MaxInt div SizeOf(TRGB32)-1] of TRGB32;
  PRGB32Array = ^TRGB32Array;


  TContourPlot = class(TCustomRChart)
        private
          FPlotMode        : TContourPlotMode; // plotting mode (lines or areas)
          FPivotMat        : TMatrix;       // matrix containing pivot values
          FMaskMat         : TByteMatrix;   // matrix with pixel mask
          FNumPivotX       : integer;       // number of IsoQuads along x axis
          FNumPivotY       : integer;       // number of IsoQuads along y axis
          FIsoLow          : double;        // z-value lowest isohypsis
          FIsoHigh         : double;        // z-value highest isohypsis
          FIsoDist         : double;        // distance between isohypses
          FMaximum         : double;        // min. and max. of all rendered points
          FMinimum         : double;
          FEnabled         : boolean;
          FPivotPreCalc    : boolean;
          FInvalidDataBmp  : boolean;
          FOnEstimateZVal  : TEstimateZValEvent;
          FOnProgress      : TOnPercentDoneEvent;
          FExtColScale     : TColorScale;   // external color scale
          procedure SetIsoLow (value: double);
          procedure SetIsoHigh (value: double);
          procedure SetIsoDist (value: double);
          procedure SetPlotMode (pm: TContourPlotMode);
          procedure SetPivotRes (value: integer);
          procedure SetPivotResX (value: integer);
          procedure SetPivotResY (value: integer);
          procedure SetChartFrameCol (value: TColor);
          procedure SetChartColor (value: TColor);
          procedure SetShadowWidth (value: integer);
          procedure SetMarginRight (value: integer);
          procedure SetMarginLeft (value: integer);
          procedure SetMarginTop (value: integer);
          procedure SetMarginBottom (value: integer);
          function  GetPivotRes: integer;
          function  GetCrossHair: TCrossHair;
          procedure SetCrossHair (x: TCrossHair);
          function  GetPivotVal(ix, iy: integer): double;
          function  GetMaskVal(ix, iy: integer): byte;
          procedure SetMaskVal(ix, iy: integer; Value: byte);
          procedure RenderFromPivotPoints (bmp: TBitMap; PosX, PosY: integer);
          procedure RenderLabels (cv: TCanvas; PosX, PosY: integer);
          procedure ProcessZoomPan (Sender: TObject);
          procedure ProcessResize (Sender: TObject);
          procedure ResizePivotMatrix (nx, ny: integer);
          procedure ChangedIsoColorsEvent (Sender: TObject);
          procedure IsoQuadSL (GBuf: PRGB32Array; GBufLeng: longint;
                       GBufNSLines: integer;
                       PosX, PosY: integer; x1,y1,dx,dy, z1,z2,z3,z4: double;
                       ResX, ResY: word);
          procedure IsoColQuadSL (GBuf: PRGB32Array; GBufLeng: longint;
                       GBufNSLines: integer;
                       PosX, PosY: integer; x1,y1: double; dx,dy: double;
                       z1,z2,z3,z4: double; ResX, ResY: word);
        protected
          procedure AssignTo (Dest: TPersistent); override;
          procedure IsoColorsChanged;
          procedure CreateWnd; override;
          procedure ConstructDataBmp (bmp: TBitMap; PosX, PosY: integer;
                                BlkWhite: boolean; FirstItem: integer); override;
          procedure Paint; override;
          procedure CplotStyleChanged(Sender: TObject);
          procedure SetSuppressPaint (supp: boolean); override;
          procedure SetEnabled (state: boolean);
          procedure FeedbackProgress (PercentDone: integer);
          procedure IsoQuad (cv: TCanvas; PosX, PosY: integer;
                       x1,y1: double; dx,dy: double;
                       z1,z2,z3,z4: double; ResX, ResY: word);
          procedure IsoColQuad (cv: TCanvas; PosX, PosY: integer;
                       x1,y1: double; dx,dy: double;
                       z1,z2,z3,z4: double; ResX, ResY: word);
        public
          IsoColors   : TColorArray;
          MaskPalette : TColorArray;
          constructor Create(AOwner: TComponent); override;
          destructor Destroy; override;
          procedure Assign(Source: TPersistent); override;
          procedure M2R (xin,yin: longint; var xout,yout: double);
          procedure R2M (xin,yin: double; var xout,yout: longint);
          procedure SetRange (xLo, yLo, xHi, yHi: extended);
          property  SuppressPaint;
          procedure DrawPlot;
          procedure PrintIt (ScaleF: double; BlkWhite: boolean);
          procedure HideAllTextLabels;
          procedure ClearAllTextLabels;
          function  AddTextLabel (PosX, PosY: double; TxtColor: TColor;
                       Txt: string; PropertyTemplate: integer): integer;
          procedure CalculatePivotPoints (PreCalcFlag: boolean);
          procedure ClearMouseTrace;
          procedure ClearPivotPoints (PreCalcFlag: boolean);
          procedure CopyToBMP (FName: string; BlkWhite: boolean);
          procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite: boolean); overload;
          procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite,
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToBitmapDAOnly (ABitmap: TBitmap;
                       BlkWhite: boolean); overload;
          procedure CopyToBitmapDAOnly (ABitmap: TBitmap; BlkWhite,
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToClipboard (BlkWhite: boolean); overload;
          procedure CopyToClipboard (BlkWhite,
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToClipboardDAOnly (BlkWhite: boolean);overload;
          procedure CopyToClipboardDAOnly (BlkWhite,
                       IncludeCrossHairs: boolean); overload;
          procedure CopyToClipBoardWMF (BlkWhite: boolean);
          procedure CrossHairSetPos (x,y: double);
          procedure FillMask (value: byte);
          property  InvalidDataBmp: boolean read FInvalidDataBmp;
          property  MaxPivot: double read FMaximum;
          property  MinPivot: double read FMinimum;
          property  Mask[ix, iy: integer]: byte
                       read GetMaskVal write SetMaskVal;
          property  MouseTrace[idx: longint]: TColoredPoint
                       read GetMTracePoint;
          property  NumMTracePoints: longint read FNumMTrace;
          function  PercentilePivots (prob: double): double;
          property  PivotMat[ix, iy: integer]: double read GetPivotVal;
          procedure ResetComp;
          procedure SetIsoParams (iLow, iHigh, iDist: double);
          procedure SetTextLabel (Idx: integer; PosX, PosY: double;
                       TxtColor: TColor; Txt: string;
                       PropertyTemplate: integer);
          property  TextLabels;
        published
          property Align;
          property Anchors;
          property Caption;
          property ChartColor: TColor read RcChartCol write SetChartColor;
          property ChartFrameColor: TColor
                      read FChartFrameCol write SetChartFrameCol;
          property Constraints;
          property CrossHair: TCrossHair read GetCrossHair write SetCrossHair;
          property Enabled: boolean read FEnabled write SetEnabled;
          property IsoLow: double read FIsoLow write SetIsoLow;
          property IsoHigh: double read FIsoHigh write SetIsoHigh;
          property IsoDist: double read FIsoDist write SetIsoDist;
          property AttachedColorScale: TColorScale
                      read FExtColScale write FExtColScale;
          property MarginLeft: integer read RcLRim write SetMarginLeft;
          property MarginRight: integer read RcRRim write SetMarginRight;
          property MarginTop: integer read RcTRim write SetMarginTop;
          property MarginBottom: integer read RcBRim write SetMarginBottom;
          property MouseAction;
          property MouseCursorFixed;
          property MouseTraceColor;
          property MouseTraceInvert;
          property NumPivotsX: integer read FNumPivotX write SetPivotResX;
          property NumPivotsY: integer read FNumPivotY write SetPivotResY;
          property PanGridDx;
          property PanGridDy;
          property PivotResolution: integer read GetPivotRes write SetPivotRes;

          property ScaleX: TScalePropsHoriz
                      read GetScalePropsX1 write SetScalePropsX1;
          property ScaleY: TScalePropsVert
                      read GetScalePropsY1 write SetScalePropsY1;
{$IFDEF GE_LEV17}
(**)          property StyleElements;
{$ENDIF}
          property WindColor;
          property PlotMode: TContourPlotMode read FPlotMode write SetPlotMode;
          property PopupMenu;
          property ShadowWidth: integer read F3DRim write SetShadowWidth;
          property ShadowStyle;
          property ShadowColor;
          property ShadowBakColor;
          property ShowHint;
          property Visible;
          property OnEstimateZVal: TEstimateZValEvent
                      read FOnEstimateZVal write FOnEstimateZVal;
          property OnProgress: TOnPercentDoneEvent
                      read FOnProgress write FOnProgress;
          property OnDataRendered;
          property OnZoomPan;
          property OnClick;
          property OnDblClick;
          property OnMouseMove;
          property OnMouseDown;
          property OnMouseUp;
          property OnRubberBand;
          property OnSelectRect;
          property OnBeforeCrossHairMove;
          property OnCrossHairMove;
          property OnMouseMoveInChart;
          property OnTextLabelMove;
          property OnCanResize;
          property OnResize;
        end;



{$IFDEF DEVELOPVERS}
   {$I cxintf_quickchart.pas}
{$ENDIF}


function RCSpecStrf (r: double; FieldWidth, DecP: integer): string;





Last Update: 2012-Oct-20