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.... |
Home ![]() ![]() ![]() |
|
See also: Methods, Properties and Declarations of RChart | |
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 = 50; // number of text labels MaxDataUsers = 4; // maximum number of data shares MAXPPA = 200; // size of polyline array MAXLONGTEXTS = 50; // maximum number of supported long texts MAXSHORTTXTLENG = 15; // max. length of short texts ITP_ELEMTYPE = $00000001; // constants to select which parameters are to be ITP_COORDS = $00000002; // returned by the function ItemDescription ITP_COLORS = $00000004; ITP_TAGS = $00000008; ITP_CLASSES = $00000010; ITP_fULL = $ffffffff; {$IFDEF PAIDVERS} SDLVersionInfo = 'rchart_r1200_full'; { version info } IsLightEd = false; {$ELSE} SDLVersionInfo = 'rchart_r1200_lighted'; IsLightEd = true; {$ENDIF} Release = 1200; 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, cpmColorSurfNoIpTransp); 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 } FMouseAction : TMouseActMode; 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 MouseAction: TMouseActMode read FMouseAction write FMouseAction; 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; TCoordMode = (cmAllWorld, cmAllScreen, cmWorldMainScreenSec, cmScreenMainWorldSec, cmXScreenYWorld, cmXWorldYScreen); TrcItem = (tkNone, tkMarkAt, tkLine, tkLineto, tkRect, tkRectFrame, tk3DBar, tkText, tkMoveTo, tkEllipse, tkEverything, tkNotMoveTo, tkMoveRelPix, tkLineRelPix, tkArrow, tkDoubleArrow, tkTextOfs, tkRectRelPix, tkMarkEBar, tkLineOffs, tkArc, tkLineRelPixOrig, tkCursorVert, tkCursorHoriz, tkCross); { 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 or half lengths for crosses } 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[MAXSHORTTXTLENG]; { text } Param1 : integer; { general parameter, used by: tkLineOffs (x offset) tkText (font size) tkTextOfs (font size) tkArc (first angle) tk3Dbar (angle) tkArrow (size of head) tkDoubleArrow (size of heads) tkMarkAt (font size of characters) tkMarkEBar (font size of characters) } Param2 : integer; { general parameter, used by: tkText (background style) tkTextOfs (background style) tkLineOffs (y offset) tkArc (second angle) tk3Dbar (depth) } Param3 : integer; { general parameter, used by: tkText (alignment) tkTextOfs (alignment) tkMarkAt (mark type) tkMarkEBar (mark type) } CoordMode : TCoordMode;{ mode of coordinate interpretation } end; TRcItemContainer = array of TrcChartItem; // container of graphic elements TLongTextArray = array[1..MAXLONGTEXTS] of string; 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; TBeforeRenderTextEvent = procedure (Sender: TObject; var Text: string; Index: integer; IsAnnotation: boolean) 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; TBeforeRenderCItemEvent = procedure (Sender: TObject; var ChartItem: TRcChartItem; Index: integer; IsAnnotation: boolean) of object; TCustomRChart = class (TCustomControl) private {$IFDEF SDLDEBUG} StartSystime : double; {$ENDIF} { the following variables are used for drawing speed optimization by avoiding unnecessary changes of colors } FLastPenCol : TColor; FLastPenStyle : TPenStyle; FLastBrushCol : TColor; FLastFontCol : TColor; FLastLWidth : integer; FInvalidDataBmp : boolean; FPPa : array[1..MaxPPa] of TPoint; FNumPPa : longint; // number of polyline segments FLastMoveToX : longint; FLastMoveToY : longint; FPixMap : array of array of integer; { used to detect points lying on top of each other } FNumChartItems : longint;{no. of chart items in data container } FNumAllocData : longint;{ number of allocated container cells } FAllocSize : integer; { allocation size for data container } FNumAnnoItems : longint;{no. of chart items in data container } FNumAllocAnno : longint;{ number of allocated container cells } FAnnoBelowChart : boolean; { TRUE: annotations below chart } FAnnoTextOnTop : boolean; { TRUE: annotation texts are on top } FAnnosVisible : boolean; { TRUE: annotation are displayed } 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; FNumLongTextsAnno: integer; FLongTextsAnno : TLongTextArray; FNumLongTextsData: integer; FLongTextsData : TLongTextArray; FAnnoMode : boolean; // TRUE: annotation mode is on 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; FPanGridOffsX : double; FPanGridOffsY : 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; FAnnoClassVisib : array[0..255] of boolean; { visibility of annotation classes } 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; FOnBefRenderCItem: TBeforeRenderCItemEvent; FOnScalesRendered: TRenderEvent; FOnCrossHMove : TCrossHairMoveEvent; FOnTxtLblMove : TTextLabelMoveEvent; FOnMouseLeave : TNotifyEvent; FOnMouseEnter : TNotifyEvent; FOnBefRenderText : TBeforeRenderTextEvent; 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; FCaptTrim : integer; { max. allowed caption length } 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 } FTextFont : TFont; { font of text labels } FTextBkStyle : TTextBkg; { background style 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; procedure ClearChartItem (var Item: TRcChartItem); procedure ArrowIntern (x1,y1, x2,y2: double; HeadSize: integer; CoordMode: TCoordMode); procedure CrossIntern (cx,cy, dx,dy: double; CoordMode: TCoordMode); procedure DoubleArrowIntern (x1,y1, x2,y2: double; HeadSize: integer; CoordMode: TCoordMode); procedure DrawToIntern (x,y: double; CoordMode: TCoordMode); procedure MoveToIntern (x,y: double; CoordMode: TCoordMode); procedure LineIntern (x1, y1, x2, y2: double; CoordMode: TCoordMode); procedure RectangleIntern (x1, y1, x2, y2: double; CoordMode: TCoordMode); procedure CursorVertIntern (x: double; CoordMode: TCoordMode); procedure CursorHorizIntern (y: double; CoordMode: TCoordMode); procedure RectFrameIntern (x1,y1, x2, y2: double; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor; CoordMode: TCoordMode); procedure TextIntern (x,y: double; size: integer; txt: string; dx, dy: integer; Alignment: TAlignment; CoordMode: TCoordMode); {$IFDEF SDLDEBUG} function CompStateAsText: string; {$ENDIF} procedure EnterPolyline (x,y: longint; cv: TCanvas); function ExtractUserText (TickText: string; ix: integer): string; procedure FinishPolyLine (cv: TCanvas); 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 GetAnnoClassVisib (cnum: byte): boolean; function GetAnnoItem (idx: longint): TrcChartItem; function GetAnnoLongText (idx: longint): string; function GetClassVisib (cnum: byte): boolean; function GetChartItem (idx: longint): TrcChartItem; function GetDataLongText (idx: longint): string; 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; function GetTextFontStyle: TFontStyles; {$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 SetActiveLayer (lay: integer); procedure SetAllocSize (alloc: integer); procedure SetAnnoClassVisib (cnum: byte; value: boolean); procedure SetAnnoBelow (AnnoBelow: boolean); procedure SetAnnoTextOnTop (AnnoTextOnTop: boolean); procedure SetAnnosVisible (AnnosVisible: boolean); procedure SetAnnoMode (AnnoMd: boolean); procedure SetAnnoItem (idx: longint; item: TrcChartItem); procedure SetAnnoLongText (idx: longint; txt: string); 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 SetDataLongText (idx: longint; txt: string); 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 SetTextFontStyle (fs: TFontStyles); 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 SetCaptTrim (value: integer); 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 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 : TRcItemContainer; // array of drawing items FAnnoContainer : TRcItemContainer; // array annotation 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; function CalcTextExtents (InString: string; cv: TCanvas; var txtwid, txthgt, lnhgt: integer): integer; procedure DblClick; override; procedure InitGraf (cv: TCanvas; PosX, PosY, Wid, Hgt: integer); virtual; function ClearAnnotations (Layer: integer): integer; procedure ConvertToScreenCoords (ChartItem: TRcChartItem; var txscr, tyscr, tx2scr, ty2scr: integer); 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; function CountAnnoByClass (ClList: array of byte): integer; function CountAnnos (Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; function DetectScale (CoordX, CoordY: integer): integer; 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 ScaleZoomPan (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); procedure DoOnBeforeRenderChartItem (Sender: TObject; var ChartItem: TRcChartItem; Index: integer; IsAnnotation: boolean); procedure DrawContainerItemOnCanvas (cv: TCanvas; ChartItem: TRcChartItem; ContainerIdx: integer; IsAnnotation: boolean; LongTexts: TLongTextArray; BlkWhite: boolean; PosX, PosY: integer); // properties and methods 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; property AnnoContainer [idx: longint]: TrcChartItem read GetAnnoItem write SetAnnoItem; property AnnoMode: boolean read FAnnoMode write SetAnnoMode; property AnnoBelowChart: boolean read FAnnoBelowChart write SetAnnoBelow; property AnnoLongText[idx: integer]: string read GetAnnoLongText write SetAnnoLongText; property AnnoTextOnTop: boolean read FAnnoTextOnTop write SetAnnoTextOnTop; property AnnosVisible: boolean read FAnnosVisible write SetAnnosVisible; 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); overload; procedure Arrow (x1,y1: integer; x2,y2: double; HeadSize: integer); overload; procedure Arrow (x1,y1: double; x2,y2: integer; HeadSize: integer); overload; procedure Arrow (x1,y1, x2,y2: integer; HeadSize: integer); overload; procedure Arrow (x1: integer; y1: double; x2: integer; y2: double; HeadSize: integer); overload; procedure Arrow (x1: double; y1: integer; x2: double; y2: integer; HeadSize: integer); overload; 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} procedure Cross (cx, cy, dx, dy: double); overload; procedure Cross (cx, cy: double; dx, dy: integer); overload; procedure Cross (cx, cy, dx, dy: integer); overload; property DataContainer[idx: longint]: TrcChartItem read GetChartItem write SetChartItem; property DataLongText[idx: integer]: string read GetDataLongText write SetDataLongText; procedure DoubleArrow (x1,y1, x2,y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1,y1: integer; x2,y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1,y1: double; x2,y2: integer; HeadSize: integer); overload; procedure DoubleArrow (x1,y1, x2,y2: integer; HeadSize: integer); overload; procedure DoubleArrow (x1: integer; y1: double; x2: integer; y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1: double; y1: integer; x2: double; y2: integer; HeadSize: integer); overload; 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 CursorHoriz (y: double); overload; procedure CursorHoriz (y: integer); overload; procedure CursorVert (x: double); overload; procedure CursorVert (x: integer); overload; procedure DrawTo (x,y: double); overload; procedure DrawTo (x,y: integer); overload; procedure DrawTo (x: integer; y: double); overload; procedure DrawTo (x: double; y: integer); overload; procedure DrawToRelPix (dx,dy: integer); overload; procedure DrawToRelPix (x,y: double; dx,dy: integer); overload; procedure Ellipse (cx, cy, HorizAxLeng, VertAxLeng: double); function FindEncircledData (pg: TPDblArray; var ItemList: TIntArray): integer; procedure HideAllTextLabels; procedure Line (x1,y1, x2, y2: double); overload; procedure Line (x1,y1, x2, y2: integer); overload; procedure Line (x1,y1: double; x2, y2: integer); overload; procedure Line (x1,y1: integer; x2, y2: double); overload; procedure LineOffset (x1,y1, x2, y2: double; dx, dy: integer); procedure MoveTo (x,y: double); overload; procedure MoveTo (x,y: integer); overload; procedure MoveTo (x: integer; y: double); overload; procedure MoveTo (x: double; y: integer); overload; procedure MoveToRelPix (dx,dy: integer); procedure MarkAt (x,y: double; mk: byte); overload; procedure MarkAt (x,y: integer; mk: byte); overload; procedure MarkErrorBar (x,y: double; dlower, dupper: double; Dir: TOrientation; mk: byte); procedure Rectangle (x1,y1, x2, y2: double); overload; procedure Rectangle (x1,y1, x2, y2: integer); overload; procedure Rectangle (x1,y1: integer; x2, y2: double); overload; procedure Rectangle (x1,y1: double; x2, y2: integer); overload; procedure RectangleRelPix (centx,centy: double; dx, dy: integer); procedure RectFrame (x1,y1, x2, y2: double; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1, x2, y2: integer; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1: integer; x2, y2: double; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1: double; x2, y2: integer; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure Text (x,y: double; size: integer; txt: string); overload; procedure Text (x,y: integer; size: integer; txt: string); overload; procedure Text (x,y: double; size: integer; txt: string; dx, dy: integer; Alignment: TAlignment); overload; procedure Text (x: integer; y: double; size: integer; txt: string); overload; procedure Text (x: double; y: integer; size: integer; txt: string); overload; procedure SaveDataASC (FName: string); {$IFNDEF DOTNET} procedure SaveData (FName: string); function LoadData (FName: string; AppendIt: boolean): integer; procedure SaveAnno (FName: string); function LoadAnno (FName: string; AppendIt: boolean): integer; {$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 CopyAnnoFrom (SrcChart: TCustomRChart; ClassFilter: array of byte; AppendIt: boolean); procedure SetEqualRange (Layers: TLayerSet); procedure SetEqualRangeXOnly (Layers: TLayerSet); procedure SetEqualRangeYOnly (Layers: TLayerSet); { process single item } procedure RemoveAnnoItem (Index: longint); 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 FindNearestAnnoElem (mx, my: double; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var Dist: double): longint; function FindNearestItemReal (mx, my: double; ItemID: TrcItem; ClassNumber: byte; var Dist: double): longint; overload; function FindNearestItemReal (mx, my: double; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var Dist: double): longint; overload; function FindNearestItemScreen (mx, my: double; ItemID: TrcItem; ClassNumber: byte; var Dist: double): longint; overload; function FindNearestItemScreen (mx, my: double; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var Dist: double): longint; overload; function FindNearestItemAlongAxis (pos: double; Axis: TAxis; ItemID: TrcItem; ClassNumber: byte; var dist: double): longint; overload; function FindNearestItemAlongAxis (pos: double; Axis: TAxis; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var dist: double): longint; overload; function FindUsedLayers: TLayerSet; function GetItemParams (Item: longint): TrcChartItem; procedure GetTransformParams (Layer: integer; var kx, dx, ky, dy: double); 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 NumAnnos: longint read FNumAnnoItems; property AnnoClassVisible [cnum:byte]: boolean read GetAnnoClassVisib write SetAnnoClassVisib; 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); function SearchAnnoItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; function SearchDataItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; 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 CaptionTrim: integer read FCaptTrim write SetCaptTrim; 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 PanGridOffsX: double read FPanGridOffsX write FPanGridOffsX; property PanGridOffsY: double read FPanGridOffsY write FPanGridOffsY; 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 GetTextFontStyle write SetTextFontStyle; property TextFont: TFont read FTextFont write FTextFont; property TextBkStyle: TTextBkg read FTextBkStyle write FTextBkStyle; property TextBkColor: TColor read RcFillCol write SetFillCol default DefFillCol; 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 OnBeforeRenderChartItem: TBeforeRenderCItemEvent read FOnBefRenderCItem write FOnBefRenderCItem; property OnBeforeRenderText: TBeforeRenderTextEvent read FOnBefRenderText write FOnBefRenderText; 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 ClearAnnotations; overload; function ClearAnnotations (Layer: integer): integer; overload; procedure ConfineZoomRange (xLo, yLo, xHi, yHi: double); function CountAnnoByClass (ClList: array of byte): integer; function CountAnnos (Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; 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; property AnnoBelowChart; property AnnoTextOnTop; property AnnosVisible; property AnnoMode; 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); overload; procedure Arrow (x1,y1: integer; x2,y2: double; HeadSize: integer); overload; procedure Arrow (x1,y1: double; x2,y2: integer; HeadSize: integer); overload; procedure Arrow (x1,y1, x2,y2: integer; HeadSize: integer); overload; procedure Arrow (x1: integer; y1: double; x2: integer; y2: double; HeadSize: integer); overload; procedure Arrow (x1: double; y1: integer; x2: double; y2: integer; HeadSize: integer); overload; 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 AnnoContainer; property AnnoLongText; procedure Cross (cx, cy, dx, dy: double); overload; procedure Cross (cx, cy: double; dx, dy: integer); overload; procedure Cross (cx, cy, dx, dy: integer); overload; 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; property DataLongText; procedure CursorHoriz (y: double); overload; procedure CursorHoriz (y: integer); overload; procedure CursorVert (x: double); overload; procedure CursorVert (x: integer); overload; procedure DrawTo (x,y: double); overload; procedure DrawTo (x,y: integer); overload; procedure DrawTo (x: integer; y: double); overload; procedure DrawTo (x: double; y: integer); overload; procedure DrawToRelPix (dx,dy: integer); overload; procedure DrawToRelPix (x,y: double; dx,dy: integer); overload; procedure DoubleArrow (x1,y1, x2,y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1,y1: integer; x2,y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1,y1: double; x2,y2: integer; HeadSize: integer); overload; procedure DoubleArrow (x1,y1, x2,y2: integer; HeadSize: integer); overload; procedure DoubleArrow (x1: integer; y1: double; x2: integer; y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1: double; y1: integer; x2: double; y2: integer; HeadSize: integer); overload; procedure Ellipse (cx, cy, HorizAxLeng, VertAxLeng: double); function FindEncircledData (pg: TPDblArray; var ItemList: TIntArray): integer; procedure Line (x1,y1, x2, y2: double); overload; procedure Line (x1,y1, x2, y2: integer); overload; procedure Line (x1,y1: double; x2, y2: integer); overload; procedure Line (x1,y1: integer; x2, y2: double); overload; procedure LineOffset (x1,y1, x2, y2: double; dx, dy: integer); procedure MoveTo (x,y: double); overload; procedure MoveTo (x,y: integer); overload; procedure MoveTo (x: integer; y: double); overload; procedure MoveTo (x: double; y: integer); overload; procedure MoveToRelPix (dx,dy: integer); procedure MarkAt (x,y: double; mk: byte); overload; procedure MarkAt (x,y: integer; mk: byte); overload; procedure MarkErrorBar (x,y: double; dlower, dupper: double; Dir: TOrientation; mk: byte); procedure Rectangle (x1,y1, x2, y2: double); overload; procedure Rectangle (x1,y1, x2, y2: integer); overload; procedure Rectangle (x1,y1: integer; x2, y2: double); overload; procedure Rectangle (x1,y1: double; x2, y2: integer); overload; procedure RectangleRelPix (centx,centy: double; dx, dy: integer); procedure RectFrame (x1,y1, x2, y2: double; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1, x2, y2: integer; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1: integer; x2, y2: double; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1: double; x2, y2: integer; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure SaveDataASC (FName: string); {$IFNDEF DOTNET} procedure SaveData (FName: string); function LoadData (FName: string; AppendIt: boolean): integer; procedure SaveAnno (FName: string); function LoadAnno (FName: string; AppendIt: boolean): integer; {$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 CopyAnnoFrom (SrcChart: TCustomRChart; ClassFilter: array of byte; AppendIt: boolean); function DetectScale (CoordX, CoordY: integer): integer; 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: integer; size: integer; txt: string); overload; procedure Text (x,y: double; size: integer; txt: string; dx, dy: integer; Alignment: TAlignment); overload; procedure Text (x: integer; y: double; size: integer; txt: string); overload; procedure Text (x: double; y: integer; size: integer; txt: string); overload; { process single item } procedure RemoveAnnoItem (Index: longint); 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 FindNearestAnnoElem (mx, my: double; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var Dist: double): longint; function FindNearestItemReal (mx, my: double; ItemID: TrcItem; ClassNumber: byte; var Dist: double): longint; overload; function FindNearestItemReal (mx, my: double; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var Dist: double): longint; overload; function FindNearestItemScreen (mx, my: double; ItemID: TrcItem; ClassNumber: byte; var Dist: double): longint; overload; function FindNearestItemScreen (mx, my: double; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var Dist: double): longint; overload; function FindNearestItemAlongAxis (pos: double; Axis: TAxis; ItemID: TrcItem; ClassNumber: byte; var dist: double): longint; overload; function FindNearestItemAlongAxis (pos: double; Axis: TAxis; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var dist: double): longint; overload; function FindUsedLayers: TLayerSet; function GetItemParams (Item: longint): TrcChartItem; procedure GetTransformParams (Layer: integer; var kx, dx, ky, dy: double); 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 NumAnnos; property NumItems; property AnnoClassVisible; 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); function SearchAnnoItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; function SearchDataItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; 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 CaptionTrim; property MouseTraceColor; property MouseTraceInvert; property CrossHair1; property CrossHair2; property CrossHair3; property CrossHair4; property MouseAction; property MouseCursorFixed; property PanGridDx; property PanGridDy; property PanGridOffsX; property PanGridOffsY; 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 TextFont; 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 OnBeforeRenderChartItem; property OnBeforeRenderText; 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 ClearAnnotations; overload; function ClearAnnotations (Layer: integer): integer; overload; procedure CopyAnnoFrom (SrcChart: TCustomRChart; ClassFilter: array of byte; AppendIt: boolean); function CountAnnoByClass (ClList: array of byte): integer; function CountAnnos (Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; procedure ShowGraf; procedure ShowGrafNewOnly; procedure MarkAt (x,y: double; mk: byte); overload; procedure MarkAt (x,y: integer; mk: byte); overload; procedure DrawTo (x,y: double); overload; procedure DrawTo (x,y: integer); overload; procedure DrawTo (x: integer; y: double); overload; procedure DrawTo (x: double; y: integer); overload; procedure MoveTo (x,y: double); overload; procedure MoveTo (x,y: integer); overload; procedure MoveTo (x: integer; y: double); overload; procedure MoveTo (x: double; y: integer); overload; property SuppressPaint; procedure SetRange (xLo, yLo, xHi, yHi: extended); property AnnoClassVisible; property AnnoBelowChart; property AnnoTextOnTop; property AnnosVisible; property AnnoMode; 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 AnnoContainer; property AnnoLongText; property DataContainer; property DataLongText; 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 NumAnnos; property NumItems; procedure Line (x1,y1, x2, y2: double); overload; procedure Line (x1,y1, x2, y2: integer); overload; procedure Line (x1,y1: double; x2, y2: integer); overload; procedure Line (x1,y1: integer; x2, y2: double); overload; procedure Rectangle (x1,y1, x2, y2: double); overload; procedure Rectangle (x1,y1, x2, y2: integer); overload; procedure Rectangle (x1,y1: integer; x2, y2: double); overload; procedure Rectangle (x1,y1: double; x2, y2: integer); overload; procedure RectangleRelPix (centx,centy: double; dx, dy: integer); procedure Ellipse (cx, cy, HorizAxLeng, VertAxLeng: double); procedure GetTransformParams (var kx, dx, ky, dy: double); procedure Text (refreal, refimag: double; size: integer; txt: string); overload; procedure Text (x,y: integer; size: integer; txt: string); overload; procedure Text (refreal, refimag: double; size: integer; txt: string; dx, dy: integer; Alignment: TAlignment); overload; procedure Text (x: integer; refimag: double; size: integer; txt: string); overload; procedure Text (refreal: double; y: integer; size: integer; txt: string); overload; {$IFNDEF DOTNET} procedure SaveData (FName: string); function LoadData (FName: string; AppendIt: boolean): integer; procedure SaveAnno (FName: string); function LoadAnno (FName: string; AppendIt: boolean): integer; {$ENDIF} procedure RemoveAnnoItem (Index: longint); 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; function SearchAnnoItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; function SearchDataItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; 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 CaptionTrim; 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 TextFont; property TextFontStyle; property TextBkStyle; property TextBkColor; property TextAlignment; property TransparentItems; property OnBeforeCrossHairMove; property OnBeforeRenderChartItem; property OnBeforeRenderText; property OnBeforeRenderData; 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 OnScalesRendered; property OnSelectRect; property OnZoomPan; property OnDataRendered; 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; FOnEstimateZVal : TEstimateZValEvent; FOnProgress : TOnPercentDoneEvent; FExtColScale : TColorScale; // external color scale procedure SetAnnoClassVisib (cnum: byte; value: boolean); procedure SetClassVisib (cnum: byte; value: boolean); 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; property AnnoContainer; property AnnoLongText; property DataContainer; property DataLongText; procedure DrawPlot; property LineWidth; procedure PrintIt (ScaleF: double; BlkWhite: boolean); procedure HideAllTextLabels; procedure ClearAnnotations; procedure ClearAllTextLabels; procedure CopyAnnoFrom (SrcChart: TCustomRChart; ClassFilter: array of byte; AppendIt: boolean); function CountAnnoByClass (ClList: array of byte): integer; function CountAnnos (Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; property AnnoBelowChart; property AnnoTextOnTop; property AnnosVisible; property AnnoMode; property AnnoClassVisible [cnum:byte]: boolean read GetAnnoClassVisib write SetAnnoClassVisib; function FindNearestAnnoElem (mx, my: double; ItemID: TrcItem; ClassNumber: byte; VisLayersOnly: boolean; var Dist: double): longint; function AddTextLabel (PosX, PosY: double; TxtColor: TColor; Txt: string; PropertyTemplate: integer): integer; procedure CalculatePivotPoints (PreCalcFlag: boolean); property ClassVisible [cnum:byte]: boolean read GetClassVisib write SetClassVisib; procedure ClearMouseTrace; procedure ClearPivotPoints (PreCalcFlag: boolean); procedure ConfineZoomRange (xLo, yLo, xHi, yHi: double); 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); property DataColor; property DataTag; property FillColor; property PenStyle; procedure Arc (cx,cy,HorizAxLeng,VertAxLeng,Angle1,Angle2: double); procedure Arrow (x1,y1, x2,y2: double; HeadSize: integer); overload; procedure Arrow (x1,y1: integer; x2,y2: double; HeadSize: integer); overload; procedure Arrow (x1,y1: double; x2,y2: integer; HeadSize: integer); overload; procedure Arrow (x1,y1, x2,y2: integer; HeadSize: integer); overload; procedure Arrow (x1: integer; y1: double; x2: integer; y2: double; HeadSize: integer); overload; procedure Arrow (x1: double; y1: integer; x2: double; y2: integer; HeadSize: integer); overload; procedure Bar3D (llx, lly, urx, ury: double; Depth: integer; Angle: integer); procedure Cross (cx, cy, dx, dy: double); overload; procedure Cross (cx, cy: double; dx, dy: integer); overload; procedure Cross (cx, cy, dx, dy: integer); overload; procedure CursorHoriz (y: double); overload; procedure CursorHoriz (y: integer); overload; procedure CursorVert (x: double); overload; procedure CursorVert (x: integer); overload; procedure DoubleArrow (x1,y1, x2,y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1,y1: integer; x2,y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1,y1: double; x2,y2: integer; HeadSize: integer); overload; procedure DoubleArrow (x1,y1, x2,y2: integer; HeadSize: integer); overload; procedure DoubleArrow (x1: integer; y1: double; x2: integer; y2: double; HeadSize: integer); overload; procedure DoubleArrow (x1: double; y1: integer; x2: double; y2: integer; HeadSize: integer); overload; procedure DrawTo (x,y: double); overload; procedure DrawTo (x,y: integer); overload; procedure DrawTo (x: integer; y: double); overload; procedure DrawTo (x: double; y: integer); overload; procedure DrawToRelPix (dx,dy: integer); overload; procedure DrawToRelPix (x,y: double; dx,dy: integer); overload; procedure Ellipse (cx, cy, HorizAxLeng, VertAxLeng: double); procedure Line (x1,y1, x2, y2: double); overload; procedure Line (x1,y1, x2, y2: integer); overload; procedure Line (x1,y1: double; x2, y2: integer); overload; procedure Line (x1,y1: integer; x2, y2: double); overload; procedure LineOffset (x1,y1, x2, y2: double; dx, dy: integer); function MarkItemsInWindow (xLo, YLo, XHi, YHi: double; ItemID: TrcItem; ClassNumber: byte): longint; procedure MarkAllItems (ItemID: TrcItem; ClassNumber: byte); procedure MoveTo (x,y: double); overload; procedure MoveTo (x,y: integer); overload; procedure MoveTo (x: integer; y: double); overload; procedure MoveTo (x: double; y: integer); overload; procedure MoveToRelPix (dx,dy: integer); procedure MarkAt (x,y: double; mk: byte); overload; procedure MarkAt (x,y: integer; mk: byte); overload; procedure MarkErrorBar (x,y: double; dlower, dupper: double; Dir: TOrientation; mk: byte); procedure Rectangle (x1,y1, x2, y2: double); overload; procedure Rectangle (x1,y1, x2, y2: integer); overload; procedure Rectangle (x1,y1: integer; x2, y2: double); overload; procedure Rectangle (x1,y1: double; x2, y2: integer); overload; procedure RectangleRelPix (centx, centy: double; dx, dy: integer); procedure RectFrame (x1,y1, x2, y2: double; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1, x2, y2: integer; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1: integer; x2, y2: double; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RectFrame (x1,y1: double; x2, y2: integer; FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor); overload; procedure RemoveAnnoItem (Index: longint); property TransparentItems; function DetectScale (CoordX, CoordY: integer): integer; procedure FillMask (value: byte); procedure GetTransformParams (var kx, dx, ky, dy: double); 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; property NumAnnos; property NumItems; function PercentilePivots (prob: double): double; overload; function PercentilePivots (prob: double; UseMask: boolean): double; overload; property PivotMat[ix, iy: integer]: double read GetPivotVal; procedure ResetComp; {$IFNDEF DOTNET} procedure SaveData (FName: string); function LoadData (FName: string; AppendIt: boolean): integer; procedure SaveAnno (FName: string); function LoadAnno (FName: string; AppendIt: boolean): integer; {$ENDIF} function SearchAnnoItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; function SearchDataItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TRcItem): integer; procedure SetIsoParams (iLow, iHigh, iDist: double); procedure SetTextLabel (Idx: integer; PosX, PosY: double; TxtColor: TColor; Txt: string; PropertyTemplate: integer); procedure Text (x,y: double; size: integer; txt: string); overload; procedure Text (x,y: integer; size: integer; txt: string); overload; procedure Text (x,y: double; size: integer; txt: string; dx, dy: integer; Alignment: TAlignment); overload; procedure Text (x: integer; y: double; size: integer; txt: string); overload; procedure Text (x: double; y: integer; size: integer; txt: string); overload; property TextLabels; published property Align; property Anchors; property Caption; property CaptionPosX; property CaptionPosY; property CaptionAlignment; property CaptionAnchorHoriz; property CaptionAnchorVert; property CaptionTrim; property ChartColor: TColor read RcChartCol write SetChartColor; property ChartFrameColor: TColor read FChartFrameCol write SetChartFrameCol; property ClassDefault; property Constraints; property CrossHair: TCrossHair read GetCrossHair write SetCrossHair; property Enabled: boolean read FEnabled write SetEnabled; property Font; property IsoLow: double read FIsoLow write SetIsoLow; property IsoHigh: double read FIsoHigh write SetIsoHigh; property IsoDist: double read FIsoDist write SetIsoDist; property Isometric; 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 PanGridOffsX; property PanGridOffsY; 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 PlotMode: TContourPlotMode read FPlotMode write SetPlotMode; property PopupMenu; property ShadowWidth: integer read F3DRim write SetShadowWidth; property ShadowStyle; property ShadowColor; property ShadowBakColor; property ShowHint; property TextFont; property TextFontStyle; property TextBkStyle; property TextBkColor; property TextAlignment; property Visible; property WindColor; property OnEstimateZVal: TEstimateZValEvent read FOnEstimateZVal write FOnEstimateZVal; property OnProgress: TOnPercentDoneEvent read FOnProgress write FOnProgress; property OnBeforeRenderData; property OnBeforeRenderChartItem; property OnBeforeRenderText; property OnDataRendered; property OnScalesRendered; property OnZoomPan; property OnClick; property OnDblClick; property OnMouseMove; property OnMouseDown; property OnMouseUp; property OnRubberBand; property OnScaleTickDrawn; property OnSelectRect; property OnBeforeCrossHairMove; property OnCrossHairMove; property OnMouseMoveInChart; property OnTextLabelMove; property OnCanResize; property OnResize; end; {$IFDEF DEVELOPVERS} {$I cxintf_quickchart.pas} {$ENDIF} function ItemDescription (ChartItem: TRcChartItem; Mode: integer): string;
|