~ubuntu-branches/ubuntu/saucy/lazarus/saucy

« back to all changes in this revision

Viewing changes to components/tachart/tadrawutils.pas

  • Committer: Package Import Robot
  • Author(s): Paul Gevers, Abou Al Montacir, Bart Martens, Paul Gevers
  • Date: 2013-06-08 14:12:17 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20130608141217-7k0cy9id8ifcnutc
Tags: 1.0.8+dfsg-1
[ Abou Al Montacir ]
* New upstream major release and multiple maintenace release offering many
  fixes and new features marking a new milestone for the Lazarus development
  and its stability level.
  - The detailed list of changes can be found here:
    http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes
    http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch
* LCL changes:
  - LCL is now a normal package.
      + Platform independent parts of the LCL are now in the package LCLBase
      + LCL is automatically recompiled when switching the target platform,
        unless pre-compiled binaries for this target are already installed.
      + No impact on existing projects.
      + Linker options needed by LCL are no more added to projects that do
        not use the LCL package.
  - Minor changes in LCL basic classes behaviour
      + TCustomForm.Create raises an exception if a form resource is not
        found.
      + TNotebook and TPage: a new implementation of these classes was added.
      + TDBNavigator: It is now possible to have focusable buttons by setting
        Options = [navFocusableButtons] and TabStop = True, useful for
        accessibility and for devices with neither mouse nor touch screen.
      + Names of TControlBorderSpacing.GetSideSpace and GetSpace were swapped
        and are now consistent. GetSideSpace = Around + GetSpace.
      + TForm.WindowState=wsFullscreen was added
      + TCanvas.TextFitInfo was added to calculate how many characters will
        fit into a specified Width. Useful for word-wrapping calculations.
      + TControl.GetColorResolvingParent and
        TControl.GetRGBColorResolvingParent were added, simplifying the work
        to obtain the final color of the control while resolving clDefault
        and the ParentColor.
      + LCLIntf.GetTextExtentExPoint now has a good default implementation
        which works in any platform not providing a specific implementation.
        However, Widgetset specific implementation is better, when available.
      + TTabControl was reorganized. Now it has the correct class hierarchy
        and inherits from TCustomTabControl as it should.
  - New unit in the LCL:
      + lazdialogs.pas: adds non-native versions of various native dialogs,
        for example TLazOpenDialog, TLazSaveDialog, TLazSelectDirectoryDialog.
        It is used by widgetsets which either do not have a native dialog, or
        do not wish to use it because it is limited. These dialogs can also be
        used by user applications directly.
      + lazdeviceapis.pas: offers an interface to more hardware devices such
        as the accelerometer, GPS, etc. See LazDeviceAPIs
      + lazcanvas.pas: provides a TFPImageCanvas descendent implementing
        drawing in a LCL-compatible way, but 100% in Pascal.
      + lazregions.pas. LazRegions is a wholly Pascal implementation of
        regions for canvas clipping, event clipping, finding in which control
        of a region tree one an event should reach, for drawing polygons, etc.
      + customdrawncontrols.pas, customdrawndrawers.pas,
        customdrawn_common.pas, customdrawn_android.pas and
        customdrawn_winxp.pas: are the Lazarus Custom Drawn Controls -controls
        which imitate the standard LCL ones, but with the difference that they
        are non-native and support skinning.
  - New APIs added to the LCL to improve support of accessibility software
    such as screen readers.
* IDE changes:
  - Many improvments.
  - The detailed list of changes can be found here:
    http://wiki.lazarus.freepascal.org/New_IDE_features_since#v1.0_.282012-08-29.29
    http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes#IDE_Changes
* Debugger / Editor changes:
  - Added pascal sources and breakpoints to the disassembler
  - Added threads dialog.
* Components changes:
  - TAChart: many fixes and new features
  - CodeTool: support Delphi style generics and new syntax extensions.
  - AggPas: removed to honor free licencing. (Closes: Bug#708695)
[Bart Martens]
* New debian/watch file fixing issues with upstream RC release.
[Abou Al Montacir]
* Avoid changing files in .pc hidden directory, these are used by quilt for
  internal purpose and could lead to surprises during build.
[Paul Gevers]
* Updated get-orig-source target and it compinion script orig-tar.sh so that they
  repack the source file, allowing bug 708695 to be fixed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
unit TADrawUtils;
18
18
 
19
 
{$mode objfpc}{$H+}
 
19
{$H+}
20
20
 
21
21
interface
22
22
 
23
23
uses
24
 
  Classes, Graphics, SysUtils;
25
 
 
26
 
const
27
 
  Colors: array [1..15] of TColor = (
28
 
    clRed, clGreen, clYellow, clBlue, clWhite, clGray, clFuchsia,
29
 
    clTeal, clNavy, clMaroon, clLime, clOlive, clPurple, clSilver, clAqua);
30
 
 
31
 
type
32
 
  TPenBrushFont = set of (pbfPen, pbfBrush, pbfFont);
33
 
 
34
 
  { TPenBrushFontRecall }
35
 
 
36
 
  TPenBrushFontRecall = class
37
 
  private
38
 
    FBrush: TBrush;
39
 
    FCanvas: TCanvas;
40
 
    FFont: TFont;
41
 
    FPen: TPen;
42
 
  public
43
 
    constructor Create(ACanvas: TCanvas; AParams: TPenBrushFont);
44
 
    destructor Destroy; override;
45
 
    procedure Recall;
46
 
  end;
47
 
 
48
 
procedure DrawLineDepth(ACanvas: TCanvas; AX1, AY1, AX2, AY2, ADepth: Integer);
49
 
procedure DrawLineDepth(ACanvas: TCanvas; const AP1, AP2: TPoint; ADepth: Integer);
50
 
 
51
 
procedure PrepareSimplePen(ACanvas: TCanvas; AColor: TColor);
52
 
procedure PrepareXorPen(ACanvas: TCanvas);
53
 
 
54
 
function TypicalTextHeight(ACanvas: TCanvas): Integer;
 
24
  Classes, FPCanvas, FPImage, Types, TAChartUtils;
 
25
 
 
26
type
 
27
  // Same types as in Graphics unit, but without dependency.
 
28
  TChartAntialiasingMode = (amDontCare, amOn, amOff);
 
29
 
 
30
type
 
31
 
 
32
  ISimpleTextOut = interface
 
33
    procedure SimpleTextOut(AX, AY: Integer; const AText: String);
 
34
    function SimpleTextExtent(const AText: String): TPoint;
 
35
    function GetFontAngle: Double;
 
36
  end;
 
37
 
 
38
  { TChartTextOut }
 
39
 
 
40
  TChartTextOut = class
 
41
  strict private
 
42
    FAlignment: TAlignment;
 
43
    FPos: TPoint;
 
44
    FSimpleTextOut: ISimpleTextOut;
 
45
    FText1: String;
 
46
    FText2: TStrings;
 
47
    FWidth: Integer;
 
48
 
 
49
    procedure DoTextOutList;
 
50
    procedure DoTextOutString;
 
51
  public
 
52
    constructor Create(ASimpleTextOut: ISimpleTextOut);
 
53
  public
 
54
    function Alignment(AAlignment: TAlignment): TChartTextOut;
 
55
    procedure Done;
 
56
    function Pos(AX, AY: Integer): TChartTextOut;
 
57
    function Pos(const APos: TPoint): TChartTextOut;
 
58
    function Text(const AText: String): TChartTextOut;
 
59
    function Text(AText: TStrings): TChartTextOut;
 
60
    function Width(AWidth: Integer): TChartTextOut;
 
61
  end;
 
62
 
 
63
  TChartColorToFPColorFunc = function (AColor: TChartColor): TFPColor;
 
64
  TGetFontOrientationFunc = function (AFont: TFPCustomFont): Integer;
 
65
 
 
66
  { IChartDrawer }
 
67
 
 
68
  IChartDrawer = interface
 
69
    procedure AddToFontOrientation(ADelta: Integer);
 
70
    procedure ClippingStart(const AClipRect: TRect);
 
71
    procedure ClippingStart;
 
72
    procedure ClippingStop;
 
73
    procedure DrawingBegin(const ABoundingBox: TRect);
 
74
    procedure DrawingEnd;
 
75
    procedure DrawLineDepth(AX1, AY1, AX2, AY2, ADepth: Integer);
 
76
    procedure DrawLineDepth(const AP1, AP2: TPoint; ADepth: Integer);
 
77
    procedure Ellipse(AX1, AY1, AX2, AY2: Integer);
 
78
    procedure FillRect(AX1, AY1, AX2, AY2: Integer);
 
79
    function GetBrushColor: TChartColor;
 
80
    procedure SetDoChartColorToFPColorFunc(AValue: TChartColorToFPColorFunc);
 
81
    procedure Line(AX1, AY1, AX2, AY2: Integer);
 
82
    procedure Line(const AP1, AP2: TPoint);
 
83
    procedure LineTo(AX, AY: Integer);
 
84
    procedure LineTo(const AP: TPoint);
 
85
    procedure MoveTo(AX, AY: Integer);
 
86
    procedure MoveTo(const AP: TPoint);
 
87
    procedure Polygon(
 
88
      const APoints: array of TPoint; AStartIndex, ANumPts: Integer);
 
89
    procedure Polyline(
 
90
      const APoints: array of TPoint; AStartIndex, ANumPts: Integer);
 
91
    procedure PrepareSimplePen(AColor: TChartColor);
 
92
    procedure RadialPie(
 
93
      AX1, AY1, AX2, AY2: Integer;
 
94
      AStartAngle16Deg, AAngleLength16Deg: Integer);
 
95
    procedure Rectangle(const ARect: TRect);
 
96
    procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
 
97
    function Scale(ADistance: Integer): Integer;
 
98
    procedure SetAntialiasingMode(AValue: TChartAntialiasingMode);
 
99
    procedure SetBrushColor(AColor: TChartColor);
 
100
    procedure SetBrush(ABrush: TFPCustomBrush);
 
101
    procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
 
102
    procedure SetFont(AValue: TFPCustomFont);
 
103
    procedure SetGetFontOrientationFunc(AValue: TGetFontOrientationFunc);
 
104
    procedure SetPen(APen: TFPCustomPen);
 
105
    procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
 
106
    function TextExtent(const AText: String): TPoint;
 
107
    function TextExtent(AText: TStrings): TPoint;
 
108
    function TextOut: TChartTextOut;
 
109
 
 
110
    property Brush: TFPCustomBrush write SetBrush;
 
111
    property BrushColor: TChartColor read GetBrushColor write SetBrushColor;
 
112
    property Font: TFPCustomFont write SetFont;
 
113
    property Pen: TFPCustomPen write SetPen;
 
114
    property DoChartColorToFPColor: TChartColorToFPColorFunc
 
115
      write SetDoChartColorToFPColorFunc;
 
116
    property DoGetFontOrientation: TGetFontOrientationFunc
 
117
      write SetGetFontOrientationFunc;
 
118
  end;
 
119
 
 
120
  { TBasicDrawer }
 
121
 
 
122
  TBasicDrawer = class(TInterfacedObject, ISimpleTextOut)
 
123
  strict protected
 
124
    FChartColorToFPColorFunc: TChartColorToFPColorFunc;
 
125
    FGetFontOrientationFunc: TGetFontOrientationFunc;
 
126
    function GetFontAngle: Double; virtual; abstract;
 
127
    function SimpleTextExtent(const AText: String): TPoint; virtual; abstract;
 
128
    procedure SimpleTextOut(AX, AY: Integer; const AText: String); virtual; abstract;
 
129
  public
 
130
    constructor Create;
 
131
    procedure DrawingBegin(const ABoundingBox: TRect); virtual;
 
132
    procedure DrawingEnd; virtual;
 
133
    procedure DrawLineDepth(AX1, AY1, AX2, AY2, ADepth: Integer);
 
134
    procedure DrawLineDepth(const AP1, AP2: TPoint; ADepth: Integer);
 
135
    procedure LineTo(AX, AY: Integer); virtual; abstract;
 
136
    procedure LineTo(const AP: TPoint);
 
137
    procedure MoveTo(AX, AY: Integer); virtual; abstract;
 
138
    procedure MoveTo(const AP: TPoint);
 
139
    procedure Polygon(
 
140
      const APoints: array of TPoint; AStartIndex, ANumPts: Integer); virtual; abstract;
 
141
    function Scale(ADistance: Integer): Integer; virtual;
 
142
    procedure SetAntialiasingMode(AValue: TChartAntialiasingMode);
 
143
    procedure SetDoChartColorToFPColorFunc(AValue: TChartColorToFPColorFunc);
 
144
    procedure SetGetFontOrientationFunc(AValue: TGetFontOrientationFunc);
 
145
    function TextExtent(const AText: String): TPoint;
 
146
    function TextExtent(AText: TStrings): TPoint;
 
147
    function TextOut: TChartTextOut;
 
148
  end;
 
149
 
 
150
  function ChartColorToFPColor(AChartColor: TChartColor): TFPColor;
 
151
  function FPColorToChartColor(AFPColor: TFPColor): TChartColor;
 
152
  function ColorDef(AColor, ADefaultColor: TChartColor): TChartColor; inline;
55
153
 
56
154
implementation
57
155
 
58
156
uses
59
 
  Types, TAChartUtils;
60
 
 
61
 
procedure DrawLineDepth(ACanvas: TCanvas; AX1, AY1, AX2, AY2, ADepth: Integer);
62
 
begin
63
 
  DrawLineDepth(ACanvas, Point(AX1, AY1), Point(AX2, AY2), ADepth);
64
 
end;
65
 
 
66
 
procedure DrawLineDepth(
67
 
  ACanvas: TCanvas; const AP1, AP2: TPoint; ADepth: Integer);
68
 
var
69
 
  d: TSize;
70
 
begin
71
 
  d := Size(ADepth, -ADepth);
72
 
  ACanvas.Polygon([AP1, AP1 + d, AP2 + d, AP2]);
73
 
end;
74
 
 
75
 
procedure PrepareSimplePen(ACanvas: TCanvas; AColor: TColor);
76
 
begin
77
 
  with ACanvas.Pen do begin
78
 
    Color := AColor;
79
 
    Style := psSolid;
80
 
    Mode := pmCopy;
81
 
    Width := 1;
82
 
  end;
83
 
end;
84
 
 
85
 
procedure PrepareXorPen(ACanvas: TCanvas);
86
 
begin
87
 
  with ACanvas do begin
88
 
    Brush.Style := bsClear;
89
 
    Pen.Style := psSolid;
90
 
    Pen.Mode := pmXor;
91
 
    Pen.Color := clWhite;
92
 
    Pen.Width := 1;
93
 
  end;
94
 
end;
95
 
 
96
 
function TypicalTextHeight(ACanvas: TCanvas): Integer;
 
157
  Math, TAGeometry;
 
158
 
97
159
const
98
 
  TYPICAL_TEXT = 'Iy';
99
 
begin
100
 
  Result := ACanvas.TextHeight(TYPICAL_TEXT);
101
 
end;
102
 
 
103
 
{ TPenBrushFontRecall }
104
 
 
105
 
constructor TPenBrushFontRecall.Create(ACanvas: TCanvas; AParams: TPenBrushFont);
106
 
begin
107
 
  inherited Create;
108
 
  FCanvas := ACanvas;
109
 
  if pbfPen in AParams then begin
110
 
    FPen := TPen.Create;
111
 
    FPen.Assign(FCanvas.Pen);
112
 
  end;
113
 
  if pbfBrush in AParams then begin
114
 
    FBrush := TBrush.Create;
115
 
    FBrush.Assign(FCanvas.Brush);
116
 
  end;
117
 
  if pbfFont in AParams then begin
118
 
    FFont := TFont.Create;
119
 
    FFont.Assign(FCanvas.Font);
120
 
  end;
121
 
end;
122
 
 
123
 
destructor TPenBrushFontRecall.Destroy;
124
 
begin
125
 
  Recall;
126
 
  inherited;
127
 
end;
128
 
 
129
 
procedure TPenBrushFontRecall.Recall;
130
 
begin
131
 
  if FPen <> nil then begin
132
 
    FCanvas.Pen.Assign(FPen);
133
 
    FreeAndNil(FPen);
134
 
  end;
135
 
  if FBrush <> nil then begin
136
 
    FCanvas.Brush.Assign(FBrush);
137
 
    FreeAndNil(FBrush);
138
 
  end;
139
 
  if FFont <> nil then begin
140
 
    FCanvas.Font.Assign(FFont);
141
 
    FreeAndNil(FFont);
142
 
  end;
 
160
  LINE_INTERVAL = 2;
 
161
 
 
162
function ChartColorToFPColor(AChartColor: TChartColor): TFPColor;
 
163
begin
 
164
  with Result do begin
 
165
    red := AChartColor and $FF;
 
166
    red += red shl 8;
 
167
    green := (AChartColor and $FF00);
 
168
    green += green shr 8;
 
169
    blue := (AChartColor and $FF0000) shr 8;
 
170
    blue += blue shr 8;
 
171
    alpha := alphaOpaque;
 
172
  end;
 
173
end;
 
174
 
 
175
function DummyGetFontOrientationFunc(AFont: TFPCustomFont): Integer;
 
176
begin
 
177
  Unused(AFont);
 
178
  Result := 0;
 
179
end;
 
180
 
 
181
function FPColorToChartColor(AFPColor: TFPColor): TChartColor;
 
182
begin
 
183
  Result :=
 
184
    ((AFPColor.red shr 8) and $FF) or
 
185
    (AFPColor.green and $FF00) or
 
186
    ((AFPColor.blue shl 8) and $FF0000);
 
187
end;
 
188
 
 
189
function ColorDef(AColor, ADefaultColor: TChartColor): TChartColor;
 
190
begin
 
191
  Result := IfThen(AColor = clTAColor, ADefaultColor, AColor);
 
192
end;
 
193
 
 
194
{ TChartTextOut }
 
195
 
 
196
function TChartTextOut.Alignment(AAlignment: TAlignment): TChartTextOut;
 
197
begin
 
198
  FAlignment := AAlignment;
 
199
  Result := Self;
 
200
end;
 
201
 
 
202
constructor TChartTextOut.Create(ASimpleTextOut: ISimpleTextOut);
 
203
begin
 
204
  FSimpleTextOut := ASimpleTextOut;
 
205
  FAlignment := taLeftJustify;
 
206
end;
 
207
 
 
208
procedure TChartTextOut.Done;
 
209
begin
 
210
  if FText2 = nil then
 
211
    DoTextOutString
 
212
  else
 
213
    DoTextOutList;
 
214
  Free;
 
215
end;
 
216
 
 
217
procedure TChartTextOut.DoTextOutList;
 
218
var
 
219
  i: Integer;
 
220
  a: Double;
 
221
  lineExtent, p: TPoint;
 
222
begin
 
223
  a := -FSimpleTextOut.GetFontAngle;
 
224
  for i := 0 to FText2.Count - 1 do begin
 
225
    lineExtent := FSimpleTextOut.SimpleTextExtent(FText2[i]);
 
226
    p := FPos;
 
227
    case FAlignment of
 
228
      taCenter: p += RotatePointX((FWidth - lineExtent.X) div 2, a);
 
229
      taRightJustify: p += RotatePointX(FWidth - lineExtent.X, a);
 
230
    end;
 
231
    FSimpleTextOut.SimpleTextOut(p.X, p.Y, FText2[i]);
 
232
    FPos += RotatePoint(Point(0, lineExtent.Y + LINE_INTERVAL), a);
 
233
  end;
 
234
end;
 
235
 
 
236
procedure TChartTextOut.DoTextOutString;
 
237
begin
 
238
  if System.Pos(LineEnding, FText1) = 0 then begin
 
239
    FSimpleTextOut.SimpleTextOut(FPos.X, FPos.Y, FText1);
 
240
    exit;
 
241
  end;
 
242
  FText2 := TStringList.Create;
 
243
  try
 
244
    FText2.Text := FText1;
 
245
    DoTextOutList;
 
246
  finally
 
247
    FText2.Free;
 
248
  end;
 
249
end;
 
250
 
 
251
function TChartTextOut.Pos(AX, AY: Integer): TChartTextOut;
 
252
begin
 
253
  FPos := Point(AX, AY);
 
254
  Result := Self;
 
255
end;
 
256
 
 
257
function TChartTextOut.Pos(const APos: TPoint): TChartTextOut;
 
258
begin
 
259
  FPos := APos;
 
260
  Result := Self;
 
261
end;
 
262
 
 
263
function TChartTextOut.Text(const AText: String): TChartTextOut;
 
264
begin
 
265
  FText1 := AText;
 
266
  Result := Self;
 
267
end;
 
268
 
 
269
function TChartTextOut.Text(AText: TStrings): TChartTextOut;
 
270
begin
 
271
  FText2 := AText;
 
272
  Result := Self;
 
273
end;
 
274
 
 
275
function TChartTextOut.Width(AWidth: Integer): TChartTextOut;
 
276
begin
 
277
  FWidth := AWidth;
 
278
  Result := Self;
 
279
end;
 
280
 
 
281
{ TBasicDrawer }
 
282
 
 
283
constructor TBasicDrawer.Create;
 
284
begin
 
285
  FChartColorToFPColorFunc := @ChartColorToFPColor;
 
286
  FGetFontOrientationFunc := @DummyGetFontOrientationFunc;
 
287
end;
 
288
 
 
289
procedure TBasicDrawer.DrawingBegin(const ABoundingBox: TRect);
 
290
begin
 
291
  Unused(ABoundingBox);
 
292
end;
 
293
 
 
294
procedure TBasicDrawer.DrawingEnd;
 
295
begin
 
296
  // Empty
 
297
end;
 
298
 
 
299
procedure TBasicDrawer.DrawLineDepth(AX1, AY1, AX2, AY2, ADepth: Integer);
 
300
begin
 
301
  DrawLineDepth(Point(AX1, AY1), Point(AX2, AY2), ADepth);
 
302
end;
 
303
 
 
304
procedure TBasicDrawer.DrawLineDepth(const AP1, AP2: TPoint; ADepth: Integer);
 
305
var
 
306
  d: TPoint;
 
307
begin
 
308
  d := Point(ADepth, -ADepth);
 
309
  Polygon([AP1, AP1 + d, AP2 + d, AP2], 0, 4);
 
310
end;
 
311
 
 
312
procedure TBasicDrawer.LineTo(const AP: TPoint);
 
313
begin
 
314
  LineTo(AP.X, AP.Y)
 
315
end;
 
316
 
 
317
procedure TBasicDrawer.MoveTo(const AP: TPoint);
 
318
begin
 
319
  MoveTo(AP.X, AP.Y)
 
320
end;
 
321
 
 
322
function TBasicDrawer.Scale(ADistance: Integer): Integer;
 
323
begin
 
324
  Result := ADistance;
 
325
end;
 
326
 
 
327
procedure TBasicDrawer.SetAntialiasingMode(AValue: TChartAntialiasingMode);
 
328
begin
 
329
  Unused(AValue);
 
330
end;
 
331
 
 
332
procedure TBasicDrawer.SetDoChartColorToFPColorFunc(
 
333
  AValue: TChartColorToFPColorFunc);
 
334
begin
 
335
  FChartColorToFPColorFunc := AValue;
 
336
end;
 
337
 
 
338
procedure TBasicDrawer.SetGetFontOrientationFunc(
 
339
  AValue: TGetFontOrientationFunc);
 
340
begin
 
341
  FGetFontOrientationFunc := AValue;
 
342
end;
 
343
 
 
344
function TBasicDrawer.TextExtent(const AText: String): TPoint;
 
345
var
 
346
  sl: TStrings;
 
347
begin
 
348
  if Pos(LineEnding, AText) = 0 then
 
349
    exit(SimpleTextExtent(AText));
 
350
  sl := TStringList.Create;
 
351
  try
 
352
    sl.Text := AText;
 
353
    Result := TextExtent(sl);
 
354
  finally
 
355
    sl.Free;
 
356
  end;
 
357
end;
 
358
 
 
359
function TBasicDrawer.TextExtent(AText: TStrings): TPoint;
 
360
var
 
361
  i: Integer;
 
362
begin
 
363
  Result := Size(0, -LINE_INTERVAL);
 
364
  for i := 0 to AText.Count - 1 do
 
365
    with SimpleTextExtent(AText[i]) do begin
 
366
      Result.X := Max(Result.X, X);
 
367
      Result.Y += Y + LINE_INTERVAL;
 
368
    end;
 
369
end;
 
370
 
 
371
function TBasicDrawer.TextOut: TChartTextOut;
 
372
begin
 
373
  Result := TChartTextOut.Create(Self);
143
374
end;
144
375
 
145
376
end.