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_PolChart

const
  defShadowWidth = 0;                                { default width of shadow }
  defPenStyle = psSolid;                                   { default pen style }
  defDataCol  = clblack;                                  { default data color }
  defScaleCol = clBlack;                                 { default scale color }
  defFillCol = clSilver;                                  { default fill color }
  defChartCol = clWhite;                      { default chart background color }
  defGridCol  = clBlack;                                  { default grid color }
  defLineWid  = 1;                                        { default line width }
  defPCHeight = 160;                                          { default height }
  defPCWidth = 240;                                            { default width }
  defDecPlcRad = 2;                             { nr. of dec. places on radius }
  defDecPlcPhi = 2;                             { nr. of dec. places for angle }
  MaxCrossH = 4;                                        { number of crosshairs }
  MaxTxtLbl = 20;                                      { number of text labels }
{$IFDEF PAIDVERS}
  SDLVersionInfo = 'polchart_r1200_full';
  IsLightEd = false;
{$ELSE}
  SDLVersionInfo = 'polchart_r1200_lighted';
  IsLightEd = true;
{$ENDIF}
  Release = 1200;

type
  ESDLPolChartError = class(ESDLError);    { exception type to indicate errors }
  TpcCrossHMode = (chOff, chOrtho, chPolar);              { kind of cross hair }
  TpcCrossHair = class (TPersistent)
               private
                 FPosRad   : double;               { crosshair radius position }
                 FPosPhi   : double;                { crosshair angle position }
                 FColor    : TColor;                      { color of crosshair }
                 FMode     : TpcCrossHMode;                { mode of crosshair }
                 FLineType : TPenStyle;               { type of crosshair line }
                 FLineWid  : integer;                { width of crosshair line }
                 FOnChange : TNotifyEvent;
                 procedure SetCrossHPosRad (value: double);
                 procedure SetCrossHPosPhi (value: double);
                 procedure SetCrossHColor (value: TColor);
                 procedure SetCrossHMode (value: TpcCrossHMode);
                 procedure SetCrossHLineType (value: TPenStyle);
                 procedure SetCrossHLineWid (value: integer);
               public
                 procedure Changed;
                 procedure SetPosition (Rad, Phi: double);
               published
                 property  Color: TColor read FColor write SetCRossHColor;
                 property  LineType: TPenStyle
                              read FLineType write SetCrossHLineType;
                 property  LineWid: integer read FLineWid write SetCrossHLineWid;
                 property  Mode: TpcCrossHMode read FMode write SetCrossHMode;
                 property  PosPhi: double read FPosPhi write SetCrossHPosPhi;
                 property  PosRad: double read FPosRad write SetCrossHPosRad;
                 property  OnChange: TNotifyEvent read FOnChange write FOnChange;
               end;

  TpcTextLabel = class (TPersistent)
               private
                 FPosRad      : double;            { crosshair radius position }
                 FPosPhi      : double;             { crosshair angle position }
                 FXShadow     : integer;                  { dx of label shadow }
                 FYShadow     : integer;                  { dy of label shadow }
                 FColorShadow : TColor;                      { color of shadow }
                 FAlignment   : TAlignment;               { alignment of label }
                 FAttachDat   : boolean;      { determines whether position is
                                                    attached to screen or data }
                 FColorBkg    : TColor;                  { color of background }
                 FColorBrd    : TColor;                 { color of border line }
                 FTransPar    : boolean;            { TRUE: box is transparent }
                 FFont        : TFont;                             { text font }
                 FCaption     : string;                        { text of label }
                 FVisible     : boolean;                 { visibility of label }
                 FMode        : TTxtLblMode;      { display mode of text label }
                 FOnChange    : TNotifyEvent;
                 procedure SetTxtLblAlignment (al: TAlignment);
                 procedure SetTxtLblPosRad (value: double);
                 function  GetTxtLblPosRad: double;
                 procedure SetTxtLblPosPhi (value: double);
                 procedure SetTxtLblColorBkg (value: TColor);
                 procedure SetTxtLblColorBrd (value: TColor);
                 procedure SetTxtLblColorShadow (value: TColor);
                 procedure SetTxtLblTranspar (value: boolean);
                 procedure SetTxtLblMode (value: TTxtLblMode);
                 procedure SetTxtLblFont (value: TFont);
                 procedure SetTxtLblCaption (value: string);
                 procedure SetTxtLblScreenPos (value : boolean);
                 procedure SetTxtLblShadowDx (value: integer);
                 procedure SetTxtLblShadowDy (value: integer);
                 procedure SetTxtLblVisible (value: boolean);
               public
                 procedure Changed;
               published
                 property PosRad: double read GetTxtLblPosRad write SetTxtLblPosRad;
                 property PosPhi: double read FPosPhi write SetTxtLblPosPhi;
                 property AttachToData: boolean
                             read FAttachDat write SetTxtLblScreenPos;
                 property ColorBkg: TColor read FColorBkg write SetTxtLblColorBkg;
                 property ColorBorder: TColor
                             read FColorBrd write SetTxtLblColorBrd;
                 property ColorShadow: TColor
                             read FColorShadow write SetTxtLblColorShadow;
                 property ShadowDx: integer read FXShadow write SetTxtLblShadowDx;
                 property ShadowDy: integer read FYShadow write SetTxtLblShadowDy;
                 property Transparent: boolean
                             read FTransPar write SetTxtLblTransPar;
                 property Alignment: TAlignment
                             read FAlignment write SetTxtLblAlignment;
                 property Font: TFont read FFont write SetTxtLblFont;
                 property Mode: TTxtLblMode read FMode write SetTxtLblMode;
                 property Visible: boolean
                              read FVisible write SetTxtLblVisible;
                 property Caption: string read FCaption write SetTxtLblCaption;
                 property OnChange: TNotifyEvent read FOnChange write FOnChange;
               end;


  TpcItem = (tkNone, tkMarkAt, tkLine, tkLineto, tkRect, tkRectFrame,
             tkText, tkMoveTo, tkPoleCircle, tkEverything,
             tkNotMoveTo, tkMoveRelPix, tkLineRelPix);
                             { Attention: if the TPCItem is changed, the array
                               FItemCount should also be adjusted }
  TpcChartItem = record
                 r,phi        : double;            { coordinates of chart item }
                 r2, phi2     : double;           { other corner of rectangles }
                 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         : byte;                             { line width }
                 ItemClass    : byte;                   { class number of item }
                 ItemKind     : TpcItem;                  { kind of chart item }
                 Transp       : boolean;                        { transparency }
                 FrameStyle   : TFrameStyle;                     { frame style }
                 Text         : string[15];                             { text }
                 Size         : integer;                   { font size of text }
                 mark         : byte;                                   { mark }
               end;

  TpcGridStyleRad = (gsRadNone, gsRadOuterDots, gsRadOuterSolid, gsRadBothDots,
                     gsRadBothSolid, gsRadBothMixed);
  TpcGridStyleAng = (gsAngNone, gsAngDots, gsAngSolid);
  TpcTextBkg = (tbClear, tbSolid);
                                        { event for mouse pos. in chart coords }
  TpcMouseMoveInChartEvent = procedure (Sender: TObject; InChart: boolean;
                                        Shift: TShiftState;
                                        rad, phi: double) of object;
  TpcScaleKind = (sckRad, sckPhi);
  TpcBeforeDrawScaleLabelEvent = procedure (Sender: TObject; Canvas: TCanvas;
                                            ScaleType: TpcScaleKind;
                                            var CurrentTickLabel: string;
                                            ChartX, ChartY: integer) of object;
  TpcRenderEvent = procedure (Sender: TObject; Canvas: TCanvas;
                              Top, Left: integer) of object;
  TpcCrossHairMoveEvent = procedure (Sender: TObject;
                                     WhichCrossHair: TpcCrossHair) of object;
  TpcTextLabelMoveEvent = procedure (Sender: TObject;
                                     WhichTextLabel: TpcTextLabel) of object;
  TpcRotationDir = (rdClockwise, rdCounterCW);
  TpcAngLabelMode = (almNone, almDegrees, almRadians, almMultiPi, almSymmDeg,
                     almSymmRad, almSymmMultiPi);
  TpcRadLabelMode = (rlmNone, rlmVertLeft, rlmVertCenter, rlmVertRight);

  TCustomPolChart = class(TCustomControl)
        private
{$IFDEF SDLDEBUG}
          StartSystime     : double;
          DebugFile        : TextFile;
{$ENDIF}
          ColBakShadow     : TColor;
          ColBakShadowBgnd : TColor;
          ColBakScale      : TColor;
          ColBakChart      : TColor;
          ColBakGrid       : TColor;
          ColBakFont       : TColor;
          LButtonWasDown   : boolean;     { global identifier to track panning
                                                          by left mouse button }
          MouseAnchorScrX  : integer;  { anchor mouse pos. on TPolChart canvas }
          MouseAnchorScrY  : integer;
          MouseAnchorCentX : integer;
          MouseAnchorCentY : integer;
          MouseAnchorMag   : double;
          MouseBoxState    : TMouseBoxState;
          FZoomState       : TZoomState;
          LastMouseX       : integer;
          LastMouseY       : integer;
          MouseBoxX1       : integer;
          MouseBoxX2       : integer;
          MouseBoxY1       : integer;
          MouseBoxY2       : integer;
          WindAnchorX      : integer;
          WindAnchorY      : integer;
          WindOldCornerX   : integer;
          WindOldCornerY   : integer;
          FItClassVisib    : array[0..255] of boolean;{ visib. of item classes }
          FOnMMvInChart    : TpcMouseMoveInChartEvent;
          FOnZoomPan       : TZoomPanEvent;
          FOnBefDrawSclLab : TpcBeforeDrawScaleLabelEvent;
          FOnDataRendered  : TpcRenderEvent;
          FOnCrossHMove    : TpcCrossHairMoveEvent;
          FOnTxtLblMove    : TpcTextLabelMoveEvent;
          FAngLabelMode    : TpcAngLabelMode;
          FRadLabelMode    : TpcRadLabelMode;
          FNumChartItems   : longint;   { no. of chart items in data container }
          FNumAllocated    : longint;    { number of allocated container cells }
          FAllocSize       : integer;     { allocation size for data container }
          FCentX           : integer;            { pixel coordinates of origin }
          FCentY           : integer;
          FAutoCenter      : boolean;  { TRUE: chart is automatically centered }
          Fxasp, Fyasp     : integer;                 { pixel widths of canvas }
          FMagnify         : double;                    { magnification factor }
          FRangeLo         : double;                           { range of axis }
          FRangeHi         : double;                           { range of axis }
          FRotMode         : integer;     { +1=clockwise, -1=counter clockwise }
          FAngleRays       : double;             { angle between rays of chart }
          FAngleOffset     : double;         { angular offset for zero degrees }
          FUseDegree       : double;     { 1=use radiants, Pi/180= use degrees }
          AuxBmp           : TBitMap;      { bitmap to hold background picture }
          AuxCHBmp         : TBitMap;           { bitmap to create cross hairs }
          GrafBmp          : TBitmap;             { off-screen graphics bitmap }
          ChartBmp         : TBitmap;                { off-screen chart bitmap }
          FDataTag         : longint;                       { user defined tag }
          FGridCol         : TColor;                           { color of grid }
          F3DRim           : integer;                        { width of shadow }
          FShadowStyle     : TShadowStyle;                   { style of shadow }
          FShadowColor     : TColor;                         { color of shadow }
          FShadowBakCol    : TColor;              { color of shadow background }
          FGridStyleRad    : TpcGridStyleRad;           { style of radial grid }
          FGridStyleAng    : TpcGridStyleAng;          { style of angular grid }
          FMouseAction     : TMouseActMode;     { type of allowed mouse action }
          FDataCol         : TColor;                           { color of data }
          FScaleCol        : TColor;                         { color of scales }
          FFillCol         : TColor;               { fill color of rect/circle }
          FChartCol        : TColor;               { color of chart background }
          FPenStyle        : TPenStyle;                 { pen style of drawing }
          FLineWid         : byte;         { line width of tkLine and tkLineTo }
          FClassDefault    : byte;        { default class number for new items }
          FDecPlaceRad     : integer;           { nr. of dec. places on x-axes }
          FDecPlacePhi     : integer;           { nr. of dec. places on y-axes }
          Cpkx, Cpdx       : extended;          { params for scaling on x-axis }
          Cpky, Cpdy       : extended;          { params for scaling on y-axis }
          FMousePosRad     : double;          { mouse x position - real coords }
          FMousePosPhi     : double;          { mouse y position - real coords }
          FCrossHair       : array[1..MaxCrossH] of TpcCrossHair; {cross hairs }
          FTextLabels      : array[1..MaxTxtLbl] of TpcTextLabel; {text labels }
          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     : TpcTextBkg;     { background style of text labels }
          FTextBkColor     : TColor;         { background color of text labels }
          FTextAlignment   : TAlignment;                   { alignment of text }
          FTranspItems     : boolean;    {TRUE: transparent circle & rectangle }
          procedure AdjustScaling; virtual;
          procedure BackupColorsAndMakeBW;
          procedure ConstructChartFrameBmp(cv: TCanvas);
          procedure ConstructDataBmp (cv: TCanvas; BlkWhite: boolean;
                       FirstItem: longint);
          procedure DrawFinish (xPos, yPos: integer; SrcBmp: TBitMap);
          function  ExtractUserText (TickText: string; ix: integer): string;
          function  GetChartItem (idx: longint): TpcChartItem;
          function  GetTypeOfFirstItem: TPCItem;
          function  GetTypeOfLastItem: TPCItem;
          function  GetClassVisib (cnum: byte): boolean;
          function  GetCHPosRad (chnum: integer): double;
          function  GetCHPosPhi (chnum: integer): double;
          function  GetCrossHair1: TpcCrossHair;
          function  GetCrossHair2: TpcCrossHair;
          function  GetCrossHair3: TpcCrossHair;
          function  GetCrossHair4: TpcCrossHair;
          function  GetItemCount (it: TPCItem): longint;
          function  GetFTextLabel (ix: integer): TpcTextLabel;
          function  GetMousePosRad: double;
          function  GetMousePosPhi: double;
          function  GetRotMode: TpcRotationDir;
          function  GetUseDeg: boolean;
          procedure PrepareDataBmp (ABitMap: TBitMap);
          procedure ReloadBackupColors;
          procedure SetAllocSize (alloc: integer);
          procedure SetAngLabelMode (alm: TpcAngLabelMode);
          procedure SetAngleRays (ang: double);
          procedure SetAngleOffset (ao: double);
          procedure SetCentX (value: integer);
          procedure SetCentY (value: integer);
          procedure SetAutoCenter (value: boolean);
          procedure SetClassVisib (cnum: byte; value: boolean);
          procedure SetCHPosRad (chnum: integer; value: double);
          procedure SetCHPosPhi (chnum: integer; value: double);
          procedure SetF3DRim (r: integer);
          procedure SetRadLabelMode (rlm: TpcRadLabelMode);
          procedure SetRotMode (rm: TpcRotationDir);
          procedure SetDataTag (tag: longint);
          procedure SetShadowStyle (ss: TShadowStyle);
          procedure SetShadowColor (c: TColor);
          procedure SetShadowBakColor (c: TColor);
          procedure SetChartitem (idx: longint; item: TpcChartItem);
          procedure SetClassDefault (DefClass: byte);
          procedure SetCrossHair1 (x: TpcCrossHair);
          procedure SetCrossHair2 (x: TpcCrossHair);
          procedure SetCrossHair3 (x: TpcCrossHair);
          procedure SetCrossHair4 (x: TpcCrossHair);
          procedure SetDecPlcRad (d: integer);
          procedure SetDecPlcPhi (d: integer);
          procedure SetGridStyleRad (gs: TpcGridStyleRad);
          procedure SetGridStyleAng (gs: TpcGridStyleAng);
          procedure SetDataCol (c: TColor);
          procedure SetScaleCol (c: TColor);
          procedure SetFillCol (c: TColor);
          procedure SetChartCol (c: TColor);
          procedure SetGridCol (c: TColor);
          procedure SetPenStyle (ps: TPenStyle);
          procedure SetMagnify (m: double);
          procedure SetLineWid (w: byte);
          procedure SetUseDeg (udeg: boolean);
          procedure SetRangeHigh (r: double);
          procedure SetRangeLow (r: double);
          procedure SetSuppressPaint (supp: boolean);
{$IFNDEF ISCLX}
          procedure WMMouseMoveInChart(var Message: TWMMouse);
                       message WM_MOUSEMOVE;
{$ENDIF}
          procedure SetTextFontStyle (tfs: TFontStyles);
          procedure SetTextBkStyle (bs: TpcTextBkg);
          procedure SetTextBkColor (bc: TColor);
          procedure SetTextAlignment (al: TAlignment);
          procedure SetFTextLabel (ix: integer; value: TpcTextLabel);
        protected
          FDataContainer: array of TpcChartItem;    { array of drawing items }
          FLastElemOnShow: longint;{ index of last entry when ShowGraf is called }
          FItemCount: array[tkNone..tkLineRelPix] of longint; { element count }
          FSuppressPaint  : boolean;      { TRUE: suppress all paint calls }
          procedure ProcessResize(Sender: TObject);
          procedure FontHasChanged (Sender: TObject);
          procedure Paint; override;
          procedure Loaded; override;
          procedure MouseMove (Shift: TShiftState; X,Y: integer); override;
          procedure MouseMoveInChart (InChart: boolean; Shift: TShiftState;
                                      RMousePosRad, RMousePosPhi: 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 DoZoomPanEvent;
          procedure DoCrossHMoveEvent (WhichCH: TpcCrossHair);
          procedure DoTxtLblMoveEvent (WhichTL: TpcTextLabel);
          procedure M2R (xin, yin: longint; var rad, phi: double);
          procedure R2M (rad, phi: double; var xout,yout: longint);
          procedure ClearGraf;
          procedure ShowGraf;
          procedure ShowGrafNewOnly;
          function  MouseBox (var RadBottomLeft, PhiBottomLeft, RadTopRight,
                              PhiTopRight: double): boolean;
          procedure MouseBoxAbort;
          procedure HideAllTextLabels;  
          procedure ClearAllTextLabels;
          function  AddTextLabel (PosRad, PosPhi: double; TxtColor: TColor;
                                  Txt: string; PropertyTemplate: integer): integer;
          procedure CenterChart;
          procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite: boolean);
          procedure CopyToBMP (FName: string; BlkWhite: boolean);
          procedure CopyToClipboard (BlkWhite: boolean);
{$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);
          property  DataContainer[idx: longint]: TpcChartItem
                      read GetChartItem write SetChartItem;
{$ENDIF}
          property  CrossHairPosRad [chnum: integer]: double
                       read GetCHPosRad write SetCHPosRad;
          property  CrossHairPosPhi [chnum: integer]: double
                       read GetCHPosPhi write SetCHPosPhi;
          procedure CrossHairSetPos (chnum: integer; rad, phi: double);
          procedure CrossHairSetup (ch: integer; chColor: TColor;
                       Mode: TpcCrossHMode; LineType: TPenStyle; LineWidth: integer);
          property  DataTag: longint read FDataTag write SetDataTag;
          procedure DrawTo (rad, phi: double);
          procedure DrawToRelPix (dx,dy: integer);
          procedure PoleCircle (rad: double);
          procedure Line (rad1, phi1, rad2, phi2: double);
          procedure MoveTo (rad, phi: double);
          procedure MoveToRelPix (dx,dy: integer);
          procedure MarkAt (rad, phi: double; mk: byte);
          property  NumItems: longint read FNumChartItems;
          procedure Rectangle (rad1, phi1, rad2, phi2: double);
          procedure RectFrame (rad1, phi1, rad2, phi2: double;
                       FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor);
          procedure SaveDataASC (FName: string);
{$IFNDEF DOTNET}
          procedure SaveData (FName: string);
          procedure LoadData (FName: string; AppendIt: boolean);
{$ENDIF}
          procedure Text (rad, phi: double; size: integer; txt: string);
          procedure RemoveLastItem;
          procedure RemoveFirstItem;
          procedure RemoveItem (Index: longint);
          function  RemoveItemsByClass (ClassNumber: byte): longint;
          procedure FindMinMax (RadLow, PhiLow, RadHigh, PhiHigh: double;
                                var MinRad, MinPhi, MaxRad, MaxPhi: double);
          function  GetItemParams (Item: longint): TpcChartItem;
          property  ItemCount[it: TPCItem]: longint read GetItemCount;
          procedure SetTextLabel (Idx: integer; PosRad, PosPhi: double;
                       TxtColor: TColor; Txt: string; PropertyTemplate: integer);
          procedure SetItemParams (Item: longint; ItParams: TpcChartItem);
          property  SuppressPaint: boolean
                       read FSuppressPaint write SetSuppressPaint;
          function  MarkItemsInWindow (RadLo, PhiLo, RadHi, PhiHi: double;
                       ItemID: TpcItem; ClassNumber: byte): longint;
          procedure MarkAllItems (ItemID: TPCItem; ClassNumber: byte);
          property  MousePosRad: double read GetMousePosRad;
          property  MousePosPhi: double read GetMousePosPhi;
          property  ClassVisible [cnum:byte]: boolean
                       read GetClassVisib write SetClassVisib;
          property  TransparentItems: boolean
                       read FTranspItems write FTranspItems;
          property  TypeOfLastItem: TPCItem read GetTypeOfLastItem;
          property  TypeOfFirstItem: TPCItem read GetTypeOfFirstItem;
          procedure NewColorOfClassItems (Newcol: TColor; ClassNumber: byte);
          property  TextLabels[ix: integer]: TpcTextLabel
                       read GetFTextLabel write SetFTextLabel;
          property Font;
          property Align;
          property Visible;
          property ShowHint;
          property PopupMenu;
          property Anchors;
          property Constraints;
          property AllocSize: integer read FAllocSize write SetAllocSize;
          property AngleOffset: double read FAngleOffset write SetAngleOffset;
          property AutoRedraw: boolean read FAutoRedraw write FAutoRedraw;
          property AutoCenter: boolean read FAutoCenter write SetAutoCenter;
          property CenterX: integer read FCentX write SetCentX;
          property CenterY: integer read FCentY write SetCentY;
          property ClassDefault: byte read FClassDefault write SetClassDefault;
          property DecPlaceRad: integer
                      read FDecPlaceRad write SetDecPlcRad default defDecPlcRad;
          property DecPlacePhi: integer
                      read FDecPlacePhi write SetDecPlcPhi default defDecPlcPhi;
          property GridColor: TColor
                      read FGridCol write SetGridCol default DefGridCol;
          property GridStyleAngular: TpcGridStyleAng
                      read FGridStyleAng write SetGridStyleAng;
          property GridStyleRadial: TpcGridStyleRad
                      read FGridStyleRad write SetGridStyleRad;
          property DataColor: TColor
                      read FDataCol write SetDataCol default DefDataCol;
          property PenStyle: TPenStyle
                      read FPenStyle write SetPenStyle default DefPenStyle;
          property ScaleColor: TColor
                      read FScaleCol write SetScaleCol default DefScaleCol;
          property FillColor: TColor
                      read FFillCol write SetFillCol default DefFillCol;
          property ChartColor: TColor
                      read FChartCol write SetChartCol default DefChartCol;
          property LineWidth: byte
                      read FLineWid write SetLineWid default DefLineWid;
          property LabelModeAngular: TpcAngLabelMode
                      read FAngLabelMode write SetAngLabelMode;
          property LabelModeRadial: TpcRadLabelMode
                      read FRadLabelMode write SetRadLabelMode;
          property CrossHair1: TpcCrossHair
                      read GetCrossHair1 write SetCrossHair1;
          property CrossHair2: TpcCrossHair
                      read GetCrossHair2 write SetCrossHair2;
          property CrossHair3: TpcCrossHair
                      read GetCrossHair3 write SetCrossHair3;
          property CrossHair4: TpcCrossHair
                      read GetCrossHair4 write SetCrossHair4;
          property RangeLow: double read FRangeLo write SetRangeLow;
          property RangeHigh: double read FRangeHi write SetRangeHigh;
          property AngleBtwRays: double read FAngleRays write SetAngleRays;
          property MagFactor: double read FMagnify write SetMagnify;
          property MouseAction: TMouseActMode
                      read FMouseAction write FMouseAction;
          property RotationDir: TpcRotationDir read GetRotMode write SetRotMode;
          property ShadowWidth: integer
                      read F3DRim write SetF3DRim default DefShadowWidth;
          property ShadowStyle: TShadowStyle
                      read FShadowStyle write SetShadowStyle;
          property ShadowColor: TColor read FShadowColor write SetShadowColor;
          property ShadowBakColor: TColor
                      read FShadowBakCol write SetShadowBakColor;
          property TextFontStyle: TFontStyles
                      read FTextFontStyle write SetTextFontStyle;
          property TextBkStyle: TpcTextBkg
                      read FTextBkStyle write SetTextBkStyle;
          property TextBkColor: TColor read FTextBkColor write SetTextBkColor;
          property TextAlignment: TAlignment
                      read FTextAlignment write SetTextAlignment;
          property UseDegrees: boolean read GetUseDeg write SetUseDeg;
          property OnClick;
          property OnDblClick;
          property OnMouseMove;
          property OnMouseDown;
          property OnMouseUp;
          property OnMouseMoveInChart: TpcMouseMoveInChartEvent
                      read FOnMMvInChart write FOnMMvInChart;
          property OnZoomPan: TZoomPanEvent read FOnZoomPan write FOnZoomPan;
          property OnBeforeDrawScaleLabel: TPCBeforeDrawScaleLabelEvent
                      read FOnBefDrawSclLab write FOnBefDrawSclLab;
          property OnDataRendered: TpcRenderEvent
                      read FOnDataRendered write FOnDataRendered;
          property OnCrossHairMove: TpcCrossHairMoveEvent
                      read FOnCrossHMove write FOnCrossHMove;
          property OnTextLabelMove: TpcTextLabelMoveEvent
                      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;
        end;


  TPolChart = class(TCustomPolChart)
        protected
          procedure CreateWnd; override;
        public
          procedure M2R (xin, yin: longint; var rad, phi: double);
          procedure R2M (rad, phi: double; var xout,yout: longint);
          procedure ClearGraf;
          procedure ShowGraf;
          procedure ShowGrafNewOnly;
          function  MouseBox (var RadBottomLeft, PhiBottomLeft, RadTopRight,
                              PhiTopRight: double): boolean;
          procedure MouseBoxAbort;
          procedure HideAllTextLabels;  
          procedure ClearAllTextLabels;
          function  AddTextLabel (PosRad, PosPhi: double; TxtColor: TColor;
                                  Txt: string; PropertyTemplate: integer): integer;
          procedure CenterChart;
          procedure CopyToBitmap (ABitmap: TBitmap; BlkWhite: boolean);
          procedure CopyToBMP (FName: string; BlkWhite: boolean);
          procedure CopyToClipboard (BlkWhite: boolean);
{$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);
          property  DataContainer;
{$ENDIF}
          property  CrossHairPosRad;
          property  CrossHairPosPhi;
          procedure CrossHairSetPos (chnum: integer; rad, phi: double);
          procedure CrossHairSetup (ch: integer; chColor: TColor;
                       Mode: TpcCrossHMode; LineType: TPenStyle; LineWidth: integer);
          property  DataTag;
          procedure DrawTo (rad, phi: double);
          procedure DrawToRelPix (dx,dy: integer);
          procedure PoleCircle (rad: double);
          procedure Line (rad1, phi1, rad2, phi2: double);
          procedure MoveTo (rad, phi: double);
          procedure MoveToRelPix (dx,dy: integer);
          procedure MarkAt (rad, phi: double; mk: byte);
          property  NumItems;
          procedure Rectangle (rad1, phi1, rad2, phi2: double);
          procedure RectFrame (rad1, phi1, rad2, phi2: double;
                       FrameStyle: TFrameStyle; ShadowColor, HiLightColor: TColor);
          procedure SaveDataASC (FName: string);
{$IFNDEF DOTNET}
          procedure SaveData (FName: string);
          procedure LoadData (FName: string; AppendIt: boolean);
{$ENDIF}
          procedure Text (rad, phi: double; size: integer; txt: string);
          procedure RemoveLastItem;
          procedure RemoveFirstItem;
          procedure RemoveItem (Index: longint);
          function  RemoveItemsByClass (ClassNumber: byte): longint;
          procedure FindMinMax (RadLow, PhiLow, RadHigh, PhiHigh: double;
                                var MinRad, MinPhi, MaxRad, MaxPhi: double);
          function  GetItemParams (Item: longint): TpcChartItem;
          property  ItemCount;
          procedure SetTextLabel (Idx: integer; PosRad, PosPhi: double;
                       TxtColor: TColor; Txt: string; PropertyTemplate: integer);
          procedure SetItemParams (Item: longint; ItParams: TpcChartItem);
          property  SuppressPaint;
          function  MarkItemsInWindow (RadLo, PhiLo, RadHi, PhiHi: double;
                       ItemID: TpcItem; ClassNumber: byte): longint;
          procedure MarkAllItems (ItemID: TPCItem; ClassNumber: byte);
          property  MousePosRad;
          property  MousePosPhi;
          property  ClassVisible;
          property  TransparentItems;
          property  TypeOfLastItem;
          property  TypeOfFirstItem;
          procedure NewColorOfClassItems (Newcol: TColor; ClassNumber: byte);
          property  TextLabels;
        published
          property Font;
          property Align;
          property Visible;
          property ShowHint;
          property PopupMenu;
          property Anchors;
          property Constraints;
          property AllocSize;
          property AngleOffset;
          property AutoRedraw;
          property AutoCenter;
          property CenterX;
          property CenterY;
          property ClassDefault;
          property DecPlaceRad;
          property DecPlacePhi;
          property GridColor;
          property GridStyleAngular;
          property GridStyleRadial;
          property DataColor;
          property PenStyle;
          property ScaleColor;
          property FillColor;
          property ChartColor;
          property LineWidth;
          property LabelModeAngular;
          property LabelModeRadial;
          property CrossHair1;
          property CrossHair2;
          property CrossHair3;
          property CrossHair4;
          property RangeLow;
          property RangeHigh;
          property AngleBtwRays;
          property MagFactor;
          property MouseAction;
          property RotationDir;
          property ShadowWidth;
          property ShadowStyle;
          property ShadowColor;
          property ShadowBakColor;
{$IFDEF GE_LEV17}
(**)              property StyleElements;
{$ENDIF}
          property TextFontStyle;
          property TextBkStyle;
          property TextBkColor;
          property TextAlignment;
          property UseDegrees;
          property OnClick;
          property OnDblClick;
          property OnMouseMove;
          property OnMouseDown;
          property OnMouseUp;
          property OnMouseMoveInChart;
          property OnZoomPan;
          property OnBeforeDrawScaleLabel;
          property OnDataRendered;
          property OnCrossHairMove;
          property OnTextLabelMove;
    {$IFNDEF ISCLX}  // Kylix does not know OnCanResize
          property OnCanResize;
          property OnResize;
    {$ENDIF}
        end;






Last Update: 2023-Feb-06