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

« back to all changes in this revision

Viewing changes to components/aggpas/src/agg_renderer_outline_aa.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:
1
 
//----------------------------------------------------------------------------
2
 
// Anti-Grain Geometry - Version 2.4 (Public License)
3
 
// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
4
 
//
5
 
// Anti-Grain Geometry - Version 2.4 Release Milano 3 (AggPas 2.4 RM3)
6
 
// Pascal Port By: Milan Marusinec alias Milano
7
 
//                 milan@marusinec.sk
8
 
//                 http://www.aggpas.org
9
 
// Copyright (c) 2005-2006
10
 
//
11
 
// Permission to copy, use, modify, sell and distribute this software
12
 
// is granted provided this copyright notice appears in all copies.
13
 
// This software is provided "as is" without express or implied
14
 
// warranty, and with no claim as to its suitability for any purpose.
15
 
//
16
 
//----------------------------------------------------------------------------
17
 
// Contact: mcseem@antigrain.com
18
 
//          mcseemagg@yahoo.com
19
 
//          http://www.antigrain.com
20
 
//
21
 
// [Pascal Port History] -----------------------------------------------------
22
 
//
23
 
// 23.06.2006-Milano: ptrcomp adjustments
24
 
// 01.02.2006-Milano: Complete unit port
25
 
// 31.01.2006-Milano: Unit port establishment
26
 
//
27
 
{ agg_renderer_outline_aa.pas }
28
 
unit
29
 
 agg_renderer_outline_aa ;
30
 
 
31
 
INTERFACE
32
 
 
33
 
{$I agg_mode.inc }
34
 
{$Q- }
35
 
{$R- }
36
 
uses
37
 
 agg_basics ,
38
 
 agg_color ,
39
 
 agg_math ,
40
 
 agg_line_aa_basics ,
41
 
 agg_dda_line ,
42
 
 agg_ellipse_bresenham ,
43
 
 agg_renderer_base ,
44
 
 agg_gamma_functions ,
45
 
 agg_vertex_source ;
46
 
 
47
 
{ TYPES DEFINITION }
48
 
const
49
 
 max_half_width = 64;
50
 
 
51
 
 subpixel_shift = line_subpixel_shift;
52
 
 subpixel_size  = 1 shl subpixel_shift;
53
 
 subpixel_mask  = subpixel_size - 1;
54
 
 
55
 
 aa_shift = 8;
56
 
 aa_num   = 1 shl aa_shift;
57
 
 aa_mask  = aa_num - 1;
58
 
 
59
 
type
60
 
 distance_interpolator_ptr = ^distance_interpolator;
61
 
 distance_interpolator = object
62
 
   procedure inc_x_; virtual; abstract;
63
 
   procedure dec_x_; virtual; abstract;
64
 
   procedure inc_y_; virtual; abstract;
65
 
   procedure dec_y_; virtual; abstract;
66
 
 
67
 
   procedure inc_x(dy_ : int ); virtual; abstract;
68
 
   procedure dec_x(dy_ : int ); virtual; abstract;
69
 
   procedure inc_y(dx_ : int ); virtual; abstract;
70
 
   procedure dec_y(dx_ : int ); virtual; abstract;
71
 
 
72
 
   function  dist : int; virtual; abstract;
73
 
   function  dist_start : int; virtual; abstract;
74
 
   function  dist_end : int; virtual; abstract;
75
 
 
76
 
   function  dx : int; virtual; abstract;
77
 
   function  dy : int; virtual; abstract;
78
 
   function  dx_start : int; virtual; abstract;
79
 
   function  dy_start : int; virtual; abstract;
80
 
   function  dx_end : int; virtual; abstract;
81
 
   function  dy_end : int; virtual; abstract;
82
 
 
83
 
  end;
84
 
 
85
 
 distance_interpolator0 = object(distance_interpolator )
86
 
   m_dx   ,
87
 
   m_dy   ,
88
 
   m_dist : int;
89
 
 
90
 
   constructor Construct; overload;
91
 
   constructor Construct(x1 ,y1 ,x2 ,y2 ,x ,y : int ); overload;
92
 
 
93
 
   procedure inc_x_; virtual;
94
 
   procedure dec_x_; virtual;
95
 
   procedure inc_y_; virtual;
96
 
   procedure dec_y_; virtual;
97
 
 
98
 
   procedure inc_x(dy_ : int ); virtual;
99
 
   procedure dec_x(dy_ : int ); virtual;
100
 
   procedure inc_y(dx_ : int ); virtual;
101
 
   procedure dec_y(dx_ : int ); virtual;
102
 
 
103
 
   function  dist : int; virtual;
104
 
   function  dx : int; virtual;
105
 
   function  dy : int; virtual;
106
 
 
107
 
  end;
108
 
 
109
 
 distance_interpolator1 = object(distance_interpolator )
110
 
   m_dx   ,
111
 
   m_dy   ,
112
 
   m_dist : int;
113
 
 
114
 
   constructor Construct; overload;
115
 
   constructor Construct(x1 ,y1 ,x2 ,y2 ,x ,y : int ); overload;
116
 
 
117
 
   procedure inc_x_; virtual;
118
 
   procedure dec_x_; virtual;
119
 
   procedure inc_y_; virtual;
120
 
   procedure dec_y_; virtual;
121
 
 
122
 
   procedure inc_x(dy_ : int ); virtual;
123
 
   procedure dec_x(dy_ : int ); virtual;
124
 
   procedure inc_y(dx_ : int ); virtual;
125
 
   procedure dec_y(dx_ : int ); virtual;
126
 
 
127
 
   function  dist : int; virtual;
128
 
   function  dx : int; virtual;
129
 
   function  dy : int; virtual;
130
 
 
131
 
  end;
132
 
 
133
 
 distance_interpolator2 = object(distance_interpolator )
134
 
   m_dx ,
135
 
   m_dy ,
136
 
 
137
 
   m_dx_start ,
138
 
   m_dy_start ,
139
 
 
140
 
   m_dist ,m_dist_start : int;
141
 
 
142
 
   constructor Construct; overload;
143
 
   constructor Construct(x1 ,y1 ,x2 ,y2 ,sx ,sy ,x ,y : int ); overload;
144
 
   constructor Construct(x1 ,y1 ,x2 ,y2 ,ex ,ey ,x ,y ,z : int ); overload;
145
 
 
146
 
   procedure inc_x_; virtual;
147
 
   procedure dec_x_; virtual;
148
 
   procedure inc_y_; virtual;
149
 
   procedure dec_y_; virtual;
150
 
 
151
 
   procedure inc_x(dy_ : int ); virtual;
152
 
   procedure dec_x(dy_ : int ); virtual;
153
 
   procedure inc_y(dx_ : int ); virtual;
154
 
   procedure dec_y(dx_ : int ); virtual;
155
 
 
156
 
   function  dist : int; virtual;
157
 
   function  dist_start : int; virtual;
158
 
   function  dist_end : int; virtual;
159
 
 
160
 
   function  dx : int; virtual;
161
 
   function  dy : int; virtual;
162
 
   function  dx_start : int; virtual;
163
 
   function  dy_start : int; virtual;
164
 
   function  dx_end : int; virtual;
165
 
   function  dy_end : int; virtual;
166
 
 
167
 
  end;
168
 
 
169
 
 distance_interpolator3 = object(distance_interpolator )
170
 
   m_dx ,
171
 
   m_dy ,
172
 
 
173
 
   m_dx_start ,
174
 
   m_dy_start ,
175
 
 
176
 
   m_dx_end ,
177
 
   m_dy_end ,
178
 
 
179
 
   m_dist ,m_dist_start ,m_dist_end : int;
180
 
 
181
 
   constructor Construct; overload;
182
 
   constructor Construct(x1 ,y1 ,x2 ,y2 ,sx ,sy ,ex ,ey ,x ,y : int ); overload;
183
 
 
184
 
   procedure inc_x_; virtual;
185
 
   procedure dec_x_; virtual;
186
 
   procedure inc_y_; virtual;
187
 
   procedure dec_y_; virtual;
188
 
 
189
 
   procedure inc_x(dy_ : int ); virtual;
190
 
   procedure dec_x(dy_ : int ); virtual;
191
 
   procedure inc_y(dx_ : int ); virtual;
192
 
   procedure dec_y(dx_ : int ); virtual;
193
 
 
194
 
   function  dist : int; virtual;
195
 
   function  dist_start : int; virtual;
196
 
   function  dist_end : int; virtual;
197
 
 
198
 
   function  dx : int; virtual;
199
 
   function  dy : int; virtual;
200
 
   function  dx_start : int; virtual;
201
 
   function  dy_start : int; virtual;
202
 
   function  dx_end : int; virtual;
203
 
   function  dy_end : int; virtual;
204
 
 
205
 
  end;
206
 
 
207
 
 renderer_outline_aa_ptr = ^renderer_outline_aa;
208
 
 
209
 
 line_interpolator = object
210
 
   function  step_hor : boolean; virtual; abstract;
211
 
   function  step_ver : boolean; virtual; abstract;
212
 
 
213
 
   function  width : int; virtual; abstract;
214
 
   function  count : int; virtual; abstract;
215
 
 
216
 
  end;
217
 
 
218
 
 line_interpolator_aa_base = object //(line_interpolator )
219
 
   m_lp  : line_parameters_ptr;
220
 
   m_li  : dda2_line_interpolator;
221
 
   m_ren : renderer_outline_aa_ptr;
222
 
 
223
 
   m_len ,
224
 
   m_x   ,
225
 
   m_y   ,
226
 
 
227
 
   m_old_x ,
228
 
   m_old_y ,
229
 
   m_count ,
230
 
   m_width ,
231
 
 
232
 
   m_max_extent ,
233
 
   m_step       : int;
234
 
 
235
 
   m_dist   : array[0..max_half_width + 1 - 1 ] of int;
236
 
   m_covers : array[0..max_half_width * 2 + 4 - 1 ] of int8u;
237
 
 
238
 
   constructor Construct(ren : renderer_outline_aa_ptr; lp : line_parameters_ptr );
239
 
 
240
 
   function  step_hor : boolean; virtual; abstract;
241
 
   function  step_ver : boolean; virtual; abstract;
242
 
 
243
 
   function  step_hor_base(di : distance_interpolator_ptr ) : int;
244
 
   function  step_ver_base(di : distance_interpolator_ptr ) : int;
245
 
 
246
 
   function  vertical : boolean;
247
 
 
248
 
   function  width : int; virtual;
249
 
   function  count : int; virtual;
250
 
 
251
 
  end;
252
 
 
253
 
 line_interpolator_aa0_ptr = ^line_interpolator_aa0;
254
 
 line_interpolator_aa0 = object(line_interpolator_aa_base )
255
 
   m_di : distance_interpolator1;
256
 
 
257
 
   constructor Construct(ren : renderer_outline_aa_ptr; lp : line_parameters_ptr );
258
 
 
259
 
   function  step_hor : boolean; virtual;
260
 
   function  step_ver : boolean; virtual;
261
 
 
262
 
  end;
263
 
 
264
 
 line_interpolator_aa1_ptr = ^line_interpolator_aa1;
265
 
 line_interpolator_aa1 = object(line_interpolator_aa_base )
266
 
   m_di : distance_interpolator2;
267
 
 
268
 
   constructor Construct(ren : renderer_outline_aa_ptr; lp : line_parameters_ptr; sx ,sy : int );
269
 
 
270
 
   function  step_hor : boolean; virtual;
271
 
   function  step_ver : boolean; virtual;
272
 
 
273
 
  end;
274
 
 
275
 
 line_interpolator_aa2_ptr = ^line_interpolator_aa2; 
276
 
 line_interpolator_aa2 = object(line_interpolator_aa_base )
277
 
   m_di : distance_interpolator2;
278
 
 
279
 
   constructor Construct(ren : renderer_outline_aa_ptr; lp : line_parameters_ptr; ex ,ey : int );
280
 
 
281
 
   function  step_hor : boolean; virtual;
282
 
   function  step_ver : boolean; virtual;
283
 
 
284
 
  end;
285
 
 
286
 
 line_interpolator_aa3_ptr = ^line_interpolator_aa3; 
287
 
 line_interpolator_aa3 = object(line_interpolator_aa_base )
288
 
   m_di : distance_interpolator3;
289
 
 
290
 
   constructor Construct(ren : renderer_outline_aa_ptr; lp : line_parameters_ptr; sx ,sy ,ex ,ey : int );
291
 
 
292
 
   function  step_hor : boolean; virtual;
293
 
   function  step_ver : boolean; virtual;
294
 
 
295
 
  end;
296
 
 
297
 
 line_profile_aa_ptr = ^line_profile_aa;
298
 
 line_profile_aa = object
299
 
   m_size    : unsigned;
300
 
   m_profile : int8u_ptr;
301
 
   m_gamma   : array[0..aa_num - 1 ] of int8u;
302
 
 
303
 
   m_subpixel_width : int;
304
 
   m_min_width      ,
305
 
   m_smoother_width : double;
306
 
 
307
 
   constructor Construct; overload;
308
 
   constructor Construct(w : double; gamma_function : vertex_source_ptr ); overload;
309
 
   destructor  Destruct;
310
 
 
311
 
   procedure min_width_     (w : double );
312
 
   procedure smoother_width_(w : double );
313
 
 
314
 
   procedure gamma_(gamma_function : vertex_source_ptr );
315
 
   procedure width_(w : double );
316
 
 
317
 
   function  _profile_size : unsigned;
318
 
   function  _subpixel_width : int;
319
 
 
320
 
   function  _min_width : double;
321
 
   function  _smoother_width : double;
322
 
 
323
 
   function  value(dist : int ) : int8u;
324
 
 
325
 
   function  profile(w : double ) : int8u_ptr;
326
 
   procedure set_   (center_width ,smoother_width : double );
327
 
 
328
 
  end;
329
 
 
330
 
 cmp_function = function(d : int ) : boolean;
331
 
 
332
 
 renderer_outline_ptr = ^renderer_outline;
333
 
 renderer_outline = object
334
 
   procedure color_(c : aggclr_ptr ); virtual; abstract;
335
 
 
336
 
   function  subpixel_width : int; virtual; abstract;
337
 
   function  accurate_join_only : boolean; virtual; abstract;
338
 
 
339
 
   procedure semidot(cmp : cmp_function; xc1 ,yc1 ,xc2 ,yc2 : int ); virtual; abstract;
340
 
 
341
 
   procedure line0(lp : line_parameters_ptr ); virtual; abstract;
342
 
   procedure line1(lp : line_parameters_ptr; sx ,sy : int ); virtual; abstract;
343
 
   procedure line2(lp : line_parameters_ptr; ex ,ey : int ); virtual; abstract;
344
 
   procedure line3(lp : line_parameters_ptr; sx ,sy ,ex ,ey : int ); virtual; abstract;
345
 
 
346
 
  end;
347
 
 
348
 
 renderer_outline_aa = object(renderer_outline )
349
 
   m_ren     : renderer_base_ptr;
350
 
   m_profile : line_profile_aa_ptr;
351
 
   m_color   : aggclr;
352
 
 
353
 
   constructor Construct(ren : renderer_base_ptr; prof : line_profile_aa_ptr );
354
 
 
355
 
   procedure color_(c : aggclr_ptr ); virtual;
356
 
   function  _color : aggclr_ptr;
357
 
 
358
 
   procedure profile_(prof : line_profile_aa_ptr );
359
 
   function  _profile : line_profile_aa_ptr;
360
 
 
361
 
   function  subpixel_width : int; virtual;
362
 
   function  cover(d : int ) : int8u;
363
 
 
364
 
   procedure blend_solid_hspan(x ,y : int; len : unsigned; covers : int8u_ptr );
365
 
   procedure blend_solid_vspan(x ,y : int; len : unsigned; covers : int8u_ptr );
366
 
 
367
 
   function  accurate_join_only : boolean; virtual;
368
 
 
369
 
   procedure semidot_hline(cmp : cmp_function; xc1 ,yc1 ,xc2 ,yc2 ,x1 ,y1 ,x2 : int );
370
 
   procedure semidot      (cmp : cmp_function; xc1 ,yc1 ,xc2 ,yc2 : int ); virtual;
371
 
 
372
 
   procedure line0(lp : line_parameters_ptr ); virtual;
373
 
   procedure line1(lp : line_parameters_ptr; sx ,sy : int ); virtual;
374
 
   procedure line2(lp : line_parameters_ptr; ex ,ey : int ); virtual;
375
 
   procedure line3(lp : line_parameters_ptr; sx ,sy ,ex ,ey : int ); virtual;
376
 
 
377
 
  end;
378
 
 
379
 
{ GLOBAL PROCEDURES }
380
 
 
381
 
 
382
 
IMPLEMENTATION
383
 
{ LOCAL VARIABLES & CONSTANTS }
384
 
{ UNIT IMPLEMENTATION }
385
 
{ CONSTRUCT }
386
 
constructor distance_interpolator0.Construct;
387
 
begin
388
 
end;
389
 
 
390
 
{ CONSTRUCT }
391
 
constructor distance_interpolator0.Construct(x1 ,y1 ,x2 ,y2 ,x ,y : int );
392
 
begin
393
 
 m_dx:=line_mr(x2 ) - line_mr(x1 );
394
 
 m_dy:=line_mr(y2 ) - line_mr(y1 );
395
 
 
396
 
 m_dist:=
397
 
  (line_mr(x + line_subpixel_size div 2 ) - line_mr(x2 ) ) * m_dy -
398
 
  (line_mr(y + line_subpixel_size div 2 ) - line_mr(y2 ) ) * m_dx;
399
 
 
400
 
 m_dx:=m_dx shl line_mr_subpixel_shift;
401
 
 m_dy:=m_dy shl line_mr_subpixel_shift;
402
 
 
403
 
end;
404
 
 
405
 
{ INC_X_ }
406
 
procedure distance_interpolator0.inc_x_;
407
 
begin
408
 
 inc(m_dist ,m_dy );
409
 
 
410
 
end;
411
 
 
412
 
{ DEC_X_ }
413
 
procedure distance_interpolator0.dec_x_;
414
 
begin
415
 
 dec(m_dist ,m_dy );
416
 
 
417
 
end;
418
 
 
419
 
{ INC_Y_ }
420
 
procedure distance_interpolator0.inc_y_;
421
 
begin
422
 
 inc(m_dist ,m_dx );
423
 
 
424
 
end;
425
 
 
426
 
{ DEC_Y_ }
427
 
procedure distance_interpolator0.dec_y_;
428
 
begin
429
 
 inc(m_dist ,m_dx );
430
 
 
431
 
end;
432
 
 
433
 
{ INC_X }
434
 
procedure distance_interpolator0.inc_x(dy_ : int );
435
 
begin
436
 
 inc(m_dist ,m_dy );
437
 
 
438
 
 if dy_ > 0 then
439
 
  dec(m_dist ,m_dx );
440
 
 
441
 
 if dy_ < 0 then
442
 
  inc(m_dist ,m_dx );
443
 
 
444
 
end;
445
 
 
446
 
{ DEC_X }
447
 
procedure distance_interpolator0.dec_x(dy_ : int );
448
 
begin
449
 
 dec(m_dist ,m_dy );
450
 
 
451
 
 if dy_ > 0 then
452
 
  dec(m_dist ,m_dx );
453
 
 
454
 
 if dy_ < 0 then
455
 
  inc(m_dist ,m_dx );
456
 
 
457
 
end;
458
 
 
459
 
{ INC_Y }
460
 
procedure distance_interpolator0.inc_y(dx_ : int );
461
 
begin
462
 
 dec(m_dist ,m_dx );
463
 
 
464
 
 if dx_ > 0 then
465
 
  inc(m_dist ,m_dy );
466
 
 
467
 
 if dx_ < 0 then
468
 
  dec(m_dist ,m_dy );
469
 
 
470
 
end;
471
 
 
472
 
{ DEC_Y }
473
 
procedure distance_interpolator0.dec_y(dx_ : int );
474
 
begin
475
 
 inc(m_dist ,m_dx );
476
 
 
477
 
 if dx_ > 0 then
478
 
  inc(m_dist ,m_dy );
479
 
 
480
 
 if dx_ < 0 then
481
 
  dec(m_dist ,m_dy );
482
 
 
483
 
end;
484
 
 
485
 
{ DIST }
486
 
function distance_interpolator0.dist;
487
 
begin
488
 
 result:=m_dist;
489
 
 
490
 
end;
491
 
 
492
 
{ DX }
493
 
function distance_interpolator0.dx;
494
 
begin
495
 
 result:=m_dx;
496
 
 
497
 
end;
498
 
 
499
 
{ DY }
500
 
function distance_interpolator0.dy;
501
 
begin
502
 
 result:=m_dy;
503
 
 
504
 
end;
505
 
 
506
 
{ CONSTRUCT }
507
 
constructor distance_interpolator1.Construct;
508
 
begin
509
 
end;
510
 
 
511
 
{ CONSTRUCT }
512
 
constructor distance_interpolator1.Construct(x1 ,y1 ,x2 ,y2 ,x ,y : int );
513
 
begin
514
 
 m_dx:=x2 - x1;
515
 
 m_dy:=y2 - y1;
516
 
 
517
 
 m_dist:=
518
 
  trunc(
519
 
   (x + line_subpixel_size / 2 - x2 ) * m_dy -
520
 
   (y + line_subpixel_size / 2 - y2 ) * m_dx );
521
 
 
522
 
 m_dx:=m_dx shl line_subpixel_shift;
523
 
 m_dy:=m_dy shl line_subpixel_shift;
524
 
 
525
 
end;
526
 
 
527
 
{ INC_X_ }
528
 
procedure distance_interpolator1.inc_x_;
529
 
begin
530
 
 inc(m_dist ,m_dy );
531
 
 
532
 
end;
533
 
 
534
 
{ DEC_X_ }
535
 
procedure distance_interpolator1.dec_x_;
536
 
begin
537
 
 dec(m_dist ,m_dy );
538
 
 
539
 
end;
540
 
 
541
 
{ INC_Y_ }
542
 
procedure distance_interpolator1.inc_y_;
543
 
begin
544
 
 dec(m_dist ,m_dx );
545
 
 
546
 
end;
547
 
 
548
 
{ DEC_Y_ }
549
 
procedure distance_interpolator1.dec_y_;
550
 
begin
551
 
 inc(m_dist ,m_dx );
552
 
 
553
 
end;
554
 
 
555
 
{ INC_X }
556
 
procedure distance_interpolator1.inc_x(dy_ : int );
557
 
begin
558
 
 inc(m_dist ,m_dy );
559
 
 
560
 
 if dy_ > 0 then
561
 
  dec(m_dist ,m_dx );
562
 
 
563
 
 if dy_ < 0 then
564
 
  inc(m_dist ,m_dx );
565
 
 
566
 
end;
567
 
 
568
 
{ DEC_X }
569
 
procedure distance_interpolator1.dec_x(dy_ : int );
570
 
begin
571
 
 dec(m_dist ,m_dy );
572
 
 
573
 
 if dy_ > 0 then
574
 
  dec(m_dist ,m_dx );
575
 
 
576
 
 if dy_ < 0 then
577
 
  inc(m_dist ,m_dx );
578
 
 
579
 
end;
580
 
 
581
 
{ INC_Y }
582
 
procedure distance_interpolator1.inc_y(dx_ : int );
583
 
begin
584
 
 dec(m_dist ,m_dx );
585
 
 
586
 
 if dx_ > 0 then
587
 
  inc(m_dist ,m_dy );
588
 
 
589
 
 if dx_ < 0 then
590
 
  dec(m_dist ,m_dy );
591
 
 
592
 
end;
593
 
 
594
 
{ DEC_Y }
595
 
procedure distance_interpolator1.dec_y(dx_ : int );
596
 
begin
597
 
 inc(m_dist ,m_dx );
598
 
 
599
 
 if dx_ > 0 then
600
 
  inc(m_dist ,m_dy );
601
 
 
602
 
 if dx_ < 0 then
603
 
  dec(m_dist ,m_dy );
604
 
 
605
 
end;
606
 
 
607
 
{ DIST }
608
 
function distance_interpolator1.dist;
609
 
begin
610
 
 result:=m_dist;
611
 
 
612
 
end;
613
 
 
614
 
{ DX }
615
 
function distance_interpolator1.dx;
616
 
begin
617
 
 result:=m_dx;
618
 
 
619
 
end;
620
 
 
621
 
{ DY }
622
 
function distance_interpolator1.dy;
623
 
begin
624
 
 result:=m_dy;
625
 
 
626
 
end;
627
 
 
628
 
{ CONSTRUCT }
629
 
constructor distance_interpolator2.Construct;
630
 
begin
631
 
end;
632
 
 
633
 
{ CONSTRUCT }
634
 
constructor distance_interpolator2.Construct(x1 ,y1 ,x2 ,y2 ,sx ,sy ,x ,y : int );
635
 
begin
636
 
 m_dx:=x2 - x1;
637
 
 m_dy:=y2 - y1;
638
 
 
639
 
 m_dx_start:=line_mr(sx ) - line_mr(x1 );
640
 
 m_dy_start:=line_mr(sy ) - line_mr(y1 );
641
 
 
642
 
 m_dist:=
643
 
  trunc(
644
 
   (x + line_subpixel_size / 2 - x2 ) * m_dy -
645
 
   (y + line_subpixel_size / 2 - y2 ) * m_dx );
646
 
 
647
 
 m_dist_start:=
648
 
  (line_mr(x + line_subpixel_size div 2 ) - line_mr(sx ) ) * m_dy_start -
649
 
  (line_mr(y + line_subpixel_size div 2 ) - line_mr(sy ) ) * m_dx_start;
650
 
 
651
 
 m_dx:=m_dx shl line_subpixel_shift;
652
 
 m_dy:=m_dy shl line_subpixel_shift;
653
 
 
654
 
 m_dx_start:=m_dx_start shl line_mr_subpixel_shift;
655
 
 m_dy_start:=m_dy_start shl line_mr_subpixel_shift;
656
 
 
657
 
end;
658
 
 
659
 
{ CONSTRUCT }
660
 
constructor distance_interpolator2.Construct(x1 ,y1 ,x2 ,y2 ,ex ,ey ,x ,y ,z : int );
661
 
begin
662
 
 m_dx:=x2 - x1;
663
 
 m_dy:=y2 - y1;
664
 
 
665
 
 m_dx_start:=line_mr(ex ) - line_mr(x2 );
666
 
 m_dy_start:=line_mr(ey ) - line_mr(y2 );
667
 
 
668
 
 m_dist:=
669
 
  trunc(
670
 
   (x + line_subpixel_size / 2 - x2 ) * m_dy -
671
 
   (y + line_subpixel_size / 2 - y2 ) * m_dx );
672
 
 
673
 
 m_dist_start:=
674
 
  (line_mr(x + line_subpixel_size div 2 ) - line_mr(ex ) ) * m_dy_start -
675
 
  (line_mr(y + line_subpixel_size div 2 ) - line_mr(ey ) ) * m_dx_start;
676
 
 
677
 
 m_dx:=m_dx shl line_subpixel_shift;
678
 
 m_dy:=m_dy shl line_subpixel_shift;
679
 
 
680
 
 m_dx_start:=m_dx_start shl line_mr_subpixel_shift;
681
 
 m_dy_start:=m_dy_start shl line_mr_subpixel_shift;
682
 
 
683
 
end;
684
 
 
685
 
{ INC_X_ }
686
 
procedure distance_interpolator2.inc_x_;
687
 
begin
688
 
 inc(m_dist ,m_dy );
689
 
 inc(m_dist_start ,m_dy_start );
690
 
 
691
 
end;
692
 
 
693
 
{ DEC_X_ }
694
 
procedure distance_interpolator2.dec_x_;
695
 
begin
696
 
 dec(m_dist ,m_dy );
697
 
 dec(m_dist_start ,m_dy_start );
698
 
 
699
 
end;
700
 
 
701
 
{ INC_Y_ }
702
 
procedure distance_interpolator2.inc_y_;
703
 
begin
704
 
 dec(m_dist ,m_dx );
705
 
 dec(m_dist_start ,m_dx_start );
706
 
 
707
 
end;
708
 
 
709
 
{ DEC_Y_ }
710
 
procedure distance_interpolator2.dec_y_;
711
 
begin
712
 
 inc(m_dist ,m_dx );
713
 
 inc(m_dist_start ,m_dx_start );
714
 
 
715
 
end;
716
 
 
717
 
{ INC_X }
718
 
procedure distance_interpolator2.inc_x(dy_ : int );
719
 
begin
720
 
 inc(m_dist ,m_dy );
721
 
 inc(m_dist_start ,m_dy_start );
722
 
 
723
 
 if dy_ > 0 then
724
 
  begin
725
 
   dec(m_dist ,m_dx );
726
 
   dec(m_dist_start ,m_dx_start );
727
 
 
728
 
  end;
729
 
 
730
 
 if dy_ < 0 then
731
 
  begin
732
 
   inc(m_dist ,m_dx );
733
 
   inc(m_dist_start ,m_dx_start );
734
 
 
735
 
  end;
736
 
 
737
 
end;
738
 
 
739
 
{ DEC_X }
740
 
procedure distance_interpolator2.dec_x(dy_ : int );
741
 
begin
742
 
 dec(m_dist ,m_dy );
743
 
 dec(m_dist_start ,m_dy_start );
744
 
 
745
 
 if dy_ > 0 then
746
 
  begin
747
 
   dec(m_dist ,m_dx );
748
 
   dec(m_dist_start ,m_dx_start );
749
 
 
750
 
  end;
751
 
 
752
 
 if dy_ < 0 then
753
 
  begin
754
 
   inc(m_dist ,m_dx );
755
 
   inc(m_dist_start ,m_dx_start );
756
 
 
757
 
  end;
758
 
 
759
 
end;
760
 
 
761
 
{ INC_Y }
762
 
procedure distance_interpolator2.inc_y(dx_ : int );
763
 
begin
764
 
 dec(m_dist ,m_dx );
765
 
 dec(m_dist_start ,m_dx_start );
766
 
 
767
 
 if dx_ > 0 then
768
 
  begin
769
 
   inc(m_dist ,m_dy );
770
 
   inc(m_dist_start ,m_dy_start );
771
 
 
772
 
  end;
773
 
 
774
 
 if dx_ < 0 then
775
 
  begin
776
 
   dec(m_dist ,m_dy );
777
 
   dec(m_dist_start ,m_dy_start );
778
 
 
779
 
  end;
780
 
 
781
 
end;
782
 
 
783
 
{ DEC_Y }
784
 
procedure distance_interpolator2.dec_y(dx_ : int );
785
 
begin
786
 
 inc(m_dist ,m_dx );
787
 
 inc(m_dist_start ,m_dx_start );
788
 
 
789
 
 if dx_ > 0 then
790
 
  begin
791
 
   inc(m_dist ,m_dy );
792
 
   inc(m_dist_start ,m_dy_start );
793
 
 
794
 
  end;
795
 
 
796
 
 if dx_ < 0 then
797
 
  begin
798
 
   dec(m_dist ,m_dy );
799
 
   dec(m_dist_start ,m_dy_start );
800
 
 
801
 
  end;
802
 
 
803
 
end;
804
 
 
805
 
{ DIST }
806
 
function distance_interpolator2.dist;
807
 
begin
808
 
 result:=m_dist;
809
 
 
810
 
end;
811
 
 
812
 
{ DIST_START }
813
 
function distance_interpolator2.dist_start;
814
 
begin
815
 
 result:=m_dist_start;
816
 
 
817
 
end;
818
 
 
819
 
{ DIST_END }
820
 
function distance_interpolator2.dist_end;
821
 
begin
822
 
 result:=m_dist_start;
823
 
 
824
 
end;
825
 
 
826
 
{ DX }
827
 
function distance_interpolator2.dx;
828
 
begin
829
 
 result:=m_dx;
830
 
 
831
 
end;
832
 
 
833
 
{ DY }
834
 
function distance_interpolator2.dy;
835
 
begin
836
 
 result:=m_dy;
837
 
 
838
 
end;
839
 
 
840
 
{ DX_START }
841
 
function distance_interpolator2.dx_start;
842
 
begin
843
 
 result:=m_dx_start;
844
 
 
845
 
end;
846
 
 
847
 
{ DY_START }
848
 
function distance_interpolator2.dy_start;
849
 
begin
850
 
 result:=m_dy_start;
851
 
 
852
 
end;
853
 
 
854
 
{ DX_END }
855
 
function distance_interpolator2.dx_end;
856
 
begin
857
 
 result:=m_dx_start;
858
 
 
859
 
end;
860
 
 
861
 
{ DY_END }
862
 
function distance_interpolator2.dy_end;
863
 
begin
864
 
 result:=m_dy_start;
865
 
 
866
 
end;
867
 
 
868
 
{ CONSTRUCT }
869
 
constructor distance_interpolator3.Construct;
870
 
begin
871
 
end;
872
 
 
873
 
{ CONSTRUCT }
874
 
constructor distance_interpolator3.Construct(x1 ,y1 ,x2 ,y2 ,sx ,sy ,ex ,ey ,x ,y : int );
875
 
begin
876
 
 m_dx:=x2 - x1;
877
 
 m_dy:=y2 - y1;
878
 
 
879
 
 m_dx_start:=line_mr(sx ) - line_mr(x1 );
880
 
 m_dy_start:=line_mr(sy ) - line_mr(y1 );
881
 
 
882
 
 m_dx_end:=line_mr(ex ) - line_mr(x2 );
883
 
 m_dy_end:=line_mr(ey ) - line_mr(y2 );
884
 
 
885
 
 m_dist:=
886
 
  trunc(
887
 
   (x + line_subpixel_size / 2 - x2 ) * m_dy -
888
 
   (y + line_subpixel_size / 2 - y2 ) * m_dx );
889
 
 
890
 
 m_dist_start:=
891
 
  (line_mr(x + line_subpixel_size div 2 ) - line_mr(sx ) ) * m_dy_start -
892
 
  (line_mr(y + line_subpixel_size div 2 ) - line_mr(sy ) ) * m_dx_start;
893
 
 
894
 
 m_dist_end:=
895
 
  (line_mr(x + line_subpixel_size div 2 ) - line_mr(ex ) ) * m_dy_end -
896
 
  (line_mr(y + line_subpixel_size div 2 ) - line_mr(ey ) ) * m_dx_end;
897
 
 
898
 
 m_dx:=m_dx shl line_subpixel_shift;
899
 
 m_dy:=m_dy shl line_subpixel_shift;
900
 
 
901
 
 m_dx_start:=m_dx_start shl line_mr_subpixel_shift;
902
 
 m_dy_start:=m_dy_start shl line_mr_subpixel_shift;
903
 
 
904
 
 m_dx_end:=m_dx_end shl line_mr_subpixel_shift;
905
 
 m_dy_end:=m_dy_end shl line_mr_subpixel_shift;
906
 
 
907
 
end;
908
 
 
909
 
{ INC_X_ }
910
 
procedure distance_interpolator3.inc_x_;
911
 
begin
912
 
 inc(m_dist ,m_dy );
913
 
 inc(m_dist_start ,m_dy_start );
914
 
 inc(m_dist_end ,m_dy_end );
915
 
 
916
 
end;
917
 
 
918
 
{ DEC_X_ }
919
 
procedure distance_interpolator3.dec_x_;
920
 
begin
921
 
 dec(m_dist ,m_dy );
922
 
 dec(m_dist_start ,m_dy_start );
923
 
 dec(m_dist_end ,m_dy_end );
924
 
 
925
 
end;
926
 
 
927
 
{ INC_Y_ }
928
 
procedure distance_interpolator3.inc_y_;
929
 
begin
930
 
 dec(m_dist ,m_dx );
931
 
 dec(m_dist_start ,m_dx_start );
932
 
 dec(m_dist_end ,m_dx_end );
933
 
 
934
 
end;
935
 
 
936
 
{ DEC_Y_ }
937
 
procedure distance_interpolator3.dec_y_;
938
 
begin
939
 
 inc(m_dist ,m_dx );
940
 
 inc(m_dist_start ,m_dx_start );
941
 
 inc(m_dist_end ,m_dx_end );
942
 
 
943
 
end;
944
 
 
945
 
{ INC_X }
946
 
procedure distance_interpolator3.inc_x(dy_ : int );
947
 
begin
948
 
 inc(m_dist ,m_dy );
949
 
 inc(m_dist_start ,m_dy_start );
950
 
 inc(m_dist_end ,m_dy_end );
951
 
 
952
 
 if dy_ > 0 then
953
 
  begin
954
 
   dec(m_dist ,m_dx );
955
 
   dec(m_dist_start ,m_dx_start );
956
 
   dec(m_dist_end ,m_dx_end );
957
 
 
958
 
  end;
959
 
 
960
 
 if dy_ < 0 then
961
 
  begin
962
 
   inc(m_dist ,m_dx );
963
 
   inc(m_dist_start ,m_dx_start );
964
 
   inc(m_dist_end ,m_dx_end );
965
 
 
966
 
  end;
967
 
 
968
 
end;
969
 
 
970
 
{ DEC_X }
971
 
procedure distance_interpolator3.dec_x(dy_ : int );
972
 
begin
973
 
 dec(m_dist ,m_dy );
974
 
 dec(m_dist_start ,m_dy_start );
975
 
 dec(m_dist_end ,m_dy_end );
976
 
 
977
 
 if dy_ > 0 then
978
 
  begin
979
 
   dec(m_dist ,m_dx );
980
 
   dec(m_dist_start ,m_dx_start );
981
 
   dec(m_dist_end ,m_dx_end );
982
 
 
983
 
  end;
984
 
 
985
 
 if dy_ < 0 then
986
 
  begin
987
 
   inc(m_dist ,m_dx );
988
 
   inc(m_dist_start ,m_dx_start );
989
 
   inc(m_dist_end ,m_dx_end );
990
 
 
991
 
  end;
992
 
 
993
 
end;
994
 
 
995
 
{ INC_Y }
996
 
procedure distance_interpolator3.inc_y(dx_ : int );
997
 
begin
998
 
 dec(m_dist ,m_dx );
999
 
 dec(m_dist_start ,m_dx_start );
1000
 
 dec(m_dist_end ,m_dx_end );
1001
 
 
1002
 
 if dx_ > 0 then
1003
 
  begin
1004
 
   inc(m_dist ,m_dy );
1005
 
   inc(m_dist_start ,m_dy_start );
1006
 
   inc(m_dist_end ,m_dy_end );
1007
 
 
1008
 
  end;
1009
 
 
1010
 
 if dx_ < 0 then
1011
 
  begin
1012
 
   dec(m_dist ,m_dy );
1013
 
   dec(m_dist_start ,m_dy_start );
1014
 
   dec(m_dist_end ,m_dy_end );
1015
 
 
1016
 
  end;
1017
 
 
1018
 
end;
1019
 
 
1020
 
{ DEC_Y }
1021
 
procedure distance_interpolator3.dec_y(dx_ : int );
1022
 
begin
1023
 
 inc(m_dist ,m_dx );
1024
 
 inc(m_dist_start ,m_dx_start );
1025
 
 inc(m_dist_end ,m_dx_end );
1026
 
 
1027
 
 if dx_ > 0 then
1028
 
  begin
1029
 
   inc(m_dist ,m_dy );
1030
 
   inc(m_dist_start ,m_dy_start );
1031
 
   inc(m_dist_end ,m_dy_end );
1032
 
 
1033
 
  end;
1034
 
 
1035
 
 if dx_ < 0 then
1036
 
  begin
1037
 
   dec(m_dist ,m_dy );
1038
 
   dec(m_dist_start ,m_dy_start );
1039
 
   dec(m_dist_end ,m_dy_end );
1040
 
 
1041
 
  end;
1042
 
 
1043
 
end;
1044
 
 
1045
 
{ DIST }
1046
 
function distance_interpolator3.dist;
1047
 
begin
1048
 
 result:=m_dist;
1049
 
 
1050
 
end;
1051
 
 
1052
 
{ DIST_START }
1053
 
function distance_interpolator3.dist_start;
1054
 
begin
1055
 
 result:=m_dist_start;
1056
 
 
1057
 
end;
1058
 
 
1059
 
{ DIST_END }
1060
 
function distance_interpolator3.dist_end;
1061
 
begin
1062
 
 result:=m_dist_end;
1063
 
 
1064
 
end;
1065
 
 
1066
 
{ DX }
1067
 
function distance_interpolator3.dx;
1068
 
begin
1069
 
 result:=m_dx;
1070
 
 
1071
 
end;
1072
 
 
1073
 
{ DY }
1074
 
function distance_interpolator3.dy;
1075
 
begin
1076
 
 result:=m_dy;
1077
 
 
1078
 
end;
1079
 
 
1080
 
{ DX_START }
1081
 
function distance_interpolator3.dx_start;
1082
 
begin
1083
 
 result:=m_dx_start;
1084
 
 
1085
 
end;
1086
 
 
1087
 
{ DY_START }
1088
 
function distance_interpolator3.dy_start;
1089
 
begin
1090
 
 result:=m_dy_start;
1091
 
 
1092
 
end;
1093
 
 
1094
 
{ DX_END }
1095
 
function distance_interpolator3.dx_end;
1096
 
begin
1097
 
 result:=m_dx_end;
1098
 
 
1099
 
end;
1100
 
 
1101
 
{ DY_END }
1102
 
function distance_interpolator3.dy_end;
1103
 
begin
1104
 
 result:=m_dy_end;
1105
 
 
1106
 
end;
1107
 
 
1108
 
{ CONSTRUCT }
1109
 
constructor line_interpolator_aa_base.Construct;
1110
 
var
1111
 
 li : dda2_line_interpolator;
1112
 
 i  : unsigned;
1113
 
 
1114
 
 stop : int;
1115
 
 
1116
 
begin
1117
 
 m_lp:=lp;
1118
 
 
1119
 
 if lp.vertical then
1120
 
  m_li.Construct(line_dbl_hr(lp.x2 - lp.x1 ) ,Abs(lp.y2 - lp.y1 ) )
1121
 
 else
1122
 
  m_li.Construct(line_dbl_hr(lp.y2 - lp.y1 ) ,Abs(lp.x2 - lp.x1) + 1 );
1123
 
 
1124
 
 m_ren:=ren;
1125
 
 
1126
 
 if lp.vertical = (lp.inc_ > 0 ) then
1127
 
  m_len:=-lp.len
1128
 
 else
1129
 
  m_len:=lp.len;
1130
 
 
1131
 
 m_x:=shr_int32(lp.x1 ,line_subpixel_shift );
1132
 
 m_y:=shr_int32(lp.y1 ,line_subpixel_shift );
1133
 
 
1134
 
 m_old_x:=m_x;
1135
 
 m_old_y:=m_y;
1136
 
 
1137
 
 if lp.vertical then
1138
 
  m_count:=Abs(shr_int32(lp.y2 ,line_subpixel_shift) - m_y )
1139
 
 else
1140
 
  m_count:=Abs(shr_int32(lp.x2 ,line_subpixel_shift) - m_x );
1141
 
 
1142
 
 m_width     :=ren.subpixel_width;
1143
 
 m_max_extent:=shr_int32(m_width ,line_subpixel_shift - 2 );
1144
 
 m_step      :=0;
1145
 
 
1146
 
 if lp.vertical then
1147
 
  li.Construct(0 ,lp.dy shl line_subpixel_shift ,lp.len )
1148
 
 else
1149
 
  li.Construct(0 ,lp.dx shl line_subpixel_shift ,lp.len );
1150
 
 
1151
 
 stop:=m_width + line_subpixel_size * 2;
1152
 
 
1153
 
 i:=0;
1154
 
 
1155
 
 while i < max_half_width do
1156
 
  begin
1157
 
   m_dist[i ]:=li._y;
1158
 
 
1159
 
   if m_dist[i ] >= stop then
1160
 
    break;
1161
 
 
1162
 
   li.plus_operator;
1163
 
 
1164
 
   inc(i );
1165
 
 
1166
 
  end;
1167
 
 
1168
 
 m_dist[i ]:=$7FFF0000;
1169
 
 
1170
 
end;
1171
 
 
1172
 
{ STEP_HOR_BASE }
1173
 
function line_interpolator_aa_base.step_hor_base;
1174
 
begin
1175
 
 m_li.plus_operator;
1176
 
 
1177
 
 inc(m_x ,m_lp.inc_ );
1178
 
 
1179
 
 m_y:=shr_int32(m_lp.y1 + m_li._y ,line_subpixel_shift );
1180
 
 
1181
 
 if m_lp.inc_ > 0 then
1182
 
  di.inc_x(m_y - m_old_y )
1183
 
 else
1184
 
  di.dec_x(m_y - m_old_y );
1185
 
 
1186
 
 m_old_y:=m_y;
1187
 
 
1188
 
 result:=di.dist div m_len;
1189
 
 
1190
 
end;
1191
 
 
1192
 
{ STEP_VER_BASE }
1193
 
function line_interpolator_aa_base.step_ver_base;
1194
 
begin
1195
 
 m_li.plus_operator;
1196
 
 
1197
 
 inc(m_y ,m_lp.inc_ );
1198
 
 
1199
 
 m_x:=shr_int32(m_lp.x1 + m_li._y ,line_subpixel_shift );
1200
 
 
1201
 
 if m_lp.inc_ > 0 then
1202
 
  di.inc_y(m_x - m_old_x )
1203
 
 else
1204
 
  di.dec_y(m_x - m_old_x );
1205
 
 
1206
 
 m_old_x:=m_x;
1207
 
 
1208
 
 result:=di.dist div m_len;
1209
 
 
1210
 
end;
1211
 
 
1212
 
{ VERTICAL }
1213
 
function line_interpolator_aa_base.vertical;
1214
 
begin
1215
 
 result:=m_lp.vertical;
1216
 
 
1217
 
end;
1218
 
 
1219
 
{ WIDTH }
1220
 
function line_interpolator_aa_base.width;
1221
 
begin
1222
 
 result:=m_width;
1223
 
 
1224
 
end;
1225
 
 
1226
 
{ COUNT }
1227
 
function line_interpolator_aa_base.count;
1228
 
begin
1229
 
 result:=m_count;
1230
 
 
1231
 
end;
1232
 
 
1233
 
{ CONSTRUCT }
1234
 
constructor line_interpolator_aa0.Construct;
1235
 
begin
1236
 
 inherited Construct(ren ,lp );
1237
 
 
1238
 
 m_di.Construct(
1239
 
  lp.x1 ,lp.y1 ,lp.x2 ,lp.y2 ,
1240
 
  lp.x1 and not line_subpixel_mask ,
1241
 
  lp.y1 and not line_subpixel_mask );
1242
 
 
1243
 
 m_li.adjust_forward; 
1244
 
 
1245
 
end;
1246
 
 
1247
 
{ STEP_HOR }
1248
 
function line_interpolator_aa0.step_hor;
1249
 
var
1250
 
 dist ,dy ,s1 : int;
1251
 
 
1252
 
 p0 ,p1 : int8u_ptr;
1253
 
 
1254
 
begin
1255
 
 s1:=step_hor_base(@m_di );
1256
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
1257
 
 p1:=p0;
1258
 
 
1259
 
 p1^:=int8u(m_ren.cover(s1 ) );
1260
 
 
1261
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1262
 
 
1263
 
 dy  :=1;
1264
 
 dist:=m_dist[dy ] - s1;
1265
 
 
1266
 
 while dist <= m_width do
1267
 
  begin
1268
 
   p1^:=int8u(m_ren.cover(dist ) );
1269
 
 
1270
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1271
 
   inc(dy );
1272
 
 
1273
 
   dist:=m_dist[dy ] - s1;
1274
 
 
1275
 
  end;
1276
 
 
1277
 
 dy  :=1;
1278
 
 dist:=m_dist[dy ] + s1;
1279
 
 
1280
 
 while dist <= m_width do
1281
 
  begin
1282
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
1283
 
 
1284
 
   p0^:=int8u(m_ren.cover(dist ) );
1285
 
 
1286
 
   inc(dy );
1287
 
 
1288
 
   dist:=m_dist[dy ] + s1;
1289
 
 
1290
 
  end;
1291
 
 
1292
 
 m_ren.blend_solid_vspan(
1293
 
  m_x ,m_y - dy + 1 ,
1294
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
1295
 
  p0 );
1296
 
 
1297
 
 inc(m_step );
1298
 
 
1299
 
 result:=m_step < m_count;
1300
 
 
1301
 
end;
1302
 
 
1303
 
{ STEP_VER }
1304
 
function line_interpolator_aa0.step_ver;
1305
 
var
1306
 
 dist ,dx ,s1 : int;
1307
 
 
1308
 
 p0 ,p1 : int8u_ptr;
1309
 
 
1310
 
begin
1311
 
 s1:=step_ver_base(@m_di );
1312
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
1313
 
 p1:=p0;
1314
 
 
1315
 
 p1^:=int8u(m_ren.cover(s1 ) );
1316
 
 
1317
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1318
 
 
1319
 
 dx  :=1;
1320
 
 dist:=m_dist[dx ] - s1;
1321
 
 
1322
 
 while dist <= m_width do
1323
 
  begin
1324
 
   p1^:=int8u(m_ren.cover(dist ) );
1325
 
 
1326
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1327
 
   inc(dx );
1328
 
 
1329
 
   dist:=m_dist[dx ] - s1;
1330
 
 
1331
 
  end;
1332
 
 
1333
 
 dx  :=1;
1334
 
 dist:=m_dist[dx ] + s1;
1335
 
 
1336
 
 while dist <= m_width do
1337
 
  begin
1338
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
1339
 
 
1340
 
   p0^:=int8u(m_ren.cover(dist ) );
1341
 
 
1342
 
   inc(dx );
1343
 
 
1344
 
   dist:=m_dist[dx ] + s1;
1345
 
 
1346
 
  end;
1347
 
 
1348
 
 m_ren.blend_solid_hspan(
1349
 
  m_x - dx + 1 ,m_y ,
1350
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
1351
 
  p0 );
1352
 
 
1353
 
 inc(m_step );
1354
 
 
1355
 
 result:=m_step < m_count;
1356
 
 
1357
 
end;
1358
 
 
1359
 
{ CONSTRUCT }
1360
 
constructor line_interpolator_aa1.Construct;
1361
 
var
1362
 
 dist1_start ,dist2_start ,npix ,dx ,dy : int;
1363
 
 
1364
 
begin
1365
 
 inherited Construct(ren ,lp );
1366
 
 
1367
 
 m_di.Construct(
1368
 
  lp.x1 ,lp.y1 ,lp.x2 ,lp.y2 ,sx ,sy ,
1369
 
  lp.x1 and not line_subpixel_mask ,
1370
 
  lp.y1 and not line_subpixel_mask );
1371
 
 
1372
 
 npix:=1;
1373
 
 
1374
 
 if lp.vertical then
1375
 
  repeat
1376
 
   m_li.minus_operator;
1377
 
 
1378
 
   dec(m_y ,lp.inc_ );
1379
 
 
1380
 
   m_x:=shr_int32(m_lp.x1 + m_li._y ,line_subpixel_shift );
1381
 
 
1382
 
   if lp.inc_ > 0 then
1383
 
    m_di.dec_y(m_x - m_old_x )
1384
 
   else
1385
 
    m_di.inc_y(m_x - m_old_x );
1386
 
 
1387
 
   m_old_x:=m_x;
1388
 
 
1389
 
   dist1_start:=m_di.dist_start;
1390
 
   dist2_start:=dist1_start;
1391
 
 
1392
 
   dx:=0;
1393
 
 
1394
 
   if dist1_start < 0 then
1395
 
    inc(npix );
1396
 
 
1397
 
   repeat
1398
 
    inc(dist1_start ,m_di.dy_start );
1399
 
    dec(dist2_start ,m_di.dy_start );
1400
 
 
1401
 
    if dist1_start < 0 then
1402
 
     inc(npix );
1403
 
 
1404
 
    if dist2_start < 0 then
1405
 
     inc(npix );
1406
 
 
1407
 
    inc(dx );
1408
 
 
1409
 
   until m_dist[dx ] > m_width;
1410
 
 
1411
 
   dec(m_step );
1412
 
 
1413
 
   if npix = 0 then
1414
 
    break;
1415
 
 
1416
 
   npix:=0;
1417
 
 
1418
 
  until m_step < -m_max_extent
1419
 
 else
1420
 
  repeat
1421
 
   m_li.minus_operator;
1422
 
 
1423
 
   dec(m_x ,lp.inc_ );
1424
 
 
1425
 
   m_y:=shr_int32(m_lp.y1 + m_li._y ,line_subpixel_shift );
1426
 
 
1427
 
   if lp.inc_ > 0 then
1428
 
    m_di.dec_x(m_y - m_old_y )
1429
 
   else
1430
 
    m_di.inc_x(m_y - m_old_y );
1431
 
 
1432
 
   m_old_y:=m_y;
1433
 
 
1434
 
   dist1_start:=m_di.dist_start;
1435
 
   dist2_start:=dist1_start;
1436
 
 
1437
 
   dy:=0;
1438
 
 
1439
 
   if dist1_start < 0 then
1440
 
    inc(npix );
1441
 
 
1442
 
   repeat
1443
 
    dec(dist1_start ,m_di.dx_start );
1444
 
    inc(dist2_start ,m_di.dx_start );
1445
 
 
1446
 
    if dist1_start < 0 then
1447
 
     inc(npix );
1448
 
 
1449
 
    if dist2_start < 0 then
1450
 
     inc(npix );
1451
 
 
1452
 
    inc(dy );
1453
 
 
1454
 
   until m_dist[dy ] > m_width;
1455
 
 
1456
 
   dec(m_step );
1457
 
 
1458
 
   if npix = 0 then
1459
 
    break;
1460
 
 
1461
 
   npix:=0; 
1462
 
 
1463
 
  until m_step < -m_max_extent;
1464
 
 
1465
 
 m_li.adjust_forward;
1466
 
 
1467
 
end;
1468
 
 
1469
 
{ STEP_HOR }
1470
 
function line_interpolator_aa1.step_hor;
1471
 
var
1472
 
 dist_start ,dist ,dy ,s1 : int;
1473
 
 
1474
 
 p0 ,p1 : int8u_ptr;
1475
 
 
1476
 
begin
1477
 
 s1:=step_hor_base(@m_di );
1478
 
 
1479
 
 dist_start:=m_di.dist_start;
1480
 
 
1481
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
1482
 
 p1:=p0;
1483
 
 
1484
 
 p1^:=0;
1485
 
 
1486
 
 if dist_start <= 0 then
1487
 
  p1^:=int8u(m_ren.cover(s1 ) );
1488
 
 
1489
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1490
 
 
1491
 
 dy  :=1;
1492
 
 dist:=m_dist[dy ] - s1;
1493
 
 
1494
 
 while dist <= m_width do
1495
 
  begin
1496
 
   dec(dist_start ,m_di.dx_start );
1497
 
 
1498
 
   p1^:=0;
1499
 
 
1500
 
   if dist_start <= 0 then
1501
 
    p1^:=int8u(m_ren.cover(dist ) );
1502
 
 
1503
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1504
 
   inc(dy );
1505
 
 
1506
 
   dist:=m_dist[dy ] - s1;
1507
 
 
1508
 
  end;
1509
 
 
1510
 
 dy        :=1;
1511
 
 dist_start:=m_di.dist_start;
1512
 
 dist      :=m_dist[dy ] + s1;
1513
 
 
1514
 
 while dist <= m_width do
1515
 
  begin
1516
 
   inc(dist_start ,m_di.dx_start );
1517
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
1518
 
 
1519
 
   p0^:=0;
1520
 
 
1521
 
   if dist_start <= 0 then
1522
 
    p0^:=int8u(m_ren.cover(dist ) );
1523
 
 
1524
 
   inc(dy );
1525
 
 
1526
 
   dist:=m_dist[dy ] + s1;
1527
 
 
1528
 
  end;
1529
 
 
1530
 
 m_ren.blend_solid_vspan(
1531
 
  m_x ,m_y - dy + 1 ,
1532
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
1533
 
  p0 );
1534
 
 
1535
 
 inc(m_step );
1536
 
 
1537
 
 result:=m_step < m_count;
1538
 
 
1539
 
end;
1540
 
 
1541
 
{ STEP_VER }
1542
 
function line_interpolator_aa1.step_ver;
1543
 
var
1544
 
 dist_start ,dist ,dx ,s1 : int;
1545
 
 
1546
 
 p0 ,p1 : int8u_ptr;
1547
 
 
1548
 
begin
1549
 
 s1:=step_ver_base(@m_di );
1550
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
1551
 
 p1:=p0;
1552
 
 
1553
 
 dist_start:=m_di.dist_start;
1554
 
 
1555
 
 p1^:=0;
1556
 
 
1557
 
 if dist_start <= 0 then
1558
 
  p1^:=int8u(m_ren.cover(s1 ) );
1559
 
 
1560
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1561
 
 
1562
 
 dx  :=1;
1563
 
 dist:=m_dist[dx ] - s1;
1564
 
 
1565
 
 while dist <= m_width do
1566
 
  begin
1567
 
   inc(dist_start ,m_di.dy_start );
1568
 
 
1569
 
   p1^:=0;
1570
 
 
1571
 
   if dist_start <= 0 then
1572
 
    p1^:=int8u(m_ren.cover(dist ) );
1573
 
 
1574
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1575
 
   inc(dx );
1576
 
 
1577
 
   dist:=m_dist[dx ] - s1;
1578
 
 
1579
 
  end;
1580
 
 
1581
 
 dx        :=1;
1582
 
 dist_start:=m_di.dist_start;
1583
 
 dist      :=m_dist[dx ] + s1;
1584
 
 
1585
 
 while dist <= m_width do
1586
 
  begin
1587
 
   dec(dist_start ,m_di.dy_start );
1588
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
1589
 
 
1590
 
   p0^:=0;
1591
 
 
1592
 
   if dist_start <= 0 then
1593
 
    p0^:=int8u(m_ren.cover(dist ) );
1594
 
 
1595
 
   inc(dx );
1596
 
 
1597
 
   dist:=m_dist[dx ] + s1;
1598
 
 
1599
 
  end;
1600
 
 
1601
 
 m_ren.blend_solid_hspan(
1602
 
  m_x - dx + 1 ,m_y ,
1603
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
1604
 
  p0 );
1605
 
 
1606
 
 inc(m_step );
1607
 
 
1608
 
 result:=m_step < m_count;
1609
 
 
1610
 
end;
1611
 
 
1612
 
{ CONSTRUCT }
1613
 
constructor line_interpolator_aa2.Construct;
1614
 
begin
1615
 
 inherited Construct(ren ,lp );
1616
 
 
1617
 
 m_di.Construct(
1618
 
  lp.x1 ,lp.y1 ,lp.x2 ,lp.y2 ,ex ,ey ,
1619
 
  lp.x1 and not line_subpixel_mask ,
1620
 
  lp.y1 and not line_subpixel_mask ,
1621
 
  0 );
1622
 
 
1623
 
 m_li.adjust_forward;
1624
 
 
1625
 
 dec(m_step ,m_max_extent );
1626
 
 
1627
 
end;
1628
 
 
1629
 
{ STEP_HOR }
1630
 
function line_interpolator_aa2.step_hor;
1631
 
var
1632
 
 dist_end ,dist ,dy ,s1 ,npix : int;
1633
 
 
1634
 
 p0 ,p1 : int8u_ptr;
1635
 
 
1636
 
begin
1637
 
 s1:=step_hor_base(@m_di );
1638
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
1639
 
 p1:=p0;
1640
 
 
1641
 
 dist_end:=m_di.dist_end;
1642
 
 
1643
 
 npix:=0;
1644
 
 p1^ :=0;
1645
 
 
1646
 
 if dist_end > 0 then
1647
 
  begin
1648
 
   p1^:=int8u(m_ren.cover(s1 ) );
1649
 
 
1650
 
   inc(npix );
1651
 
 
1652
 
  end;
1653
 
 
1654
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1655
 
 
1656
 
 dy  :=1;
1657
 
 dist:=m_dist[dy ] - s1;
1658
 
 
1659
 
 while dist <= m_width do
1660
 
  begin
1661
 
   dec(dist_end ,m_di.dx_end );
1662
 
 
1663
 
   p1^:=0;
1664
 
 
1665
 
   if dist_end > 0 then
1666
 
    begin
1667
 
     p1^:=int8u(m_ren.cover(dist ) );
1668
 
 
1669
 
     inc(npix );
1670
 
 
1671
 
    end;
1672
 
 
1673
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1674
 
   inc(dy );
1675
 
 
1676
 
   dist:=m_dist[dy ] - s1;
1677
 
 
1678
 
  end;
1679
 
 
1680
 
 dy      :=1;
1681
 
 dist_end:=m_di.dist_end;
1682
 
 dist    :=m_dist[dy ] + s1;
1683
 
 
1684
 
 while dist <= m_width do
1685
 
  begin
1686
 
   inc(dist_end ,m_di.dx_end );
1687
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
1688
 
 
1689
 
   p0^:=0;
1690
 
 
1691
 
   if dist_end > 0 then
1692
 
    begin
1693
 
     p0^:=int8u(m_ren.cover(dist ) );
1694
 
 
1695
 
     inc(npix );
1696
 
 
1697
 
    end;
1698
 
 
1699
 
   inc(dy );
1700
 
 
1701
 
   dist:=m_dist[dy ] + s1;
1702
 
 
1703
 
  end;
1704
 
 
1705
 
 m_ren.blend_solid_vspan(
1706
 
  m_x ,m_y - dy + 1 ,
1707
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
1708
 
  p0 );
1709
 
 
1710
 
 inc(m_step );
1711
 
 
1712
 
 result:=
1713
 
  (npix <> 0 ) and
1714
 
  (m_step < m_count );
1715
 
 
1716
 
end;
1717
 
 
1718
 
{ STEP_VER }
1719
 
function line_interpolator_aa2.step_ver;
1720
 
var
1721
 
 dist_end ,dist ,dx ,s1 ,npix : int;
1722
 
 
1723
 
 p0 ,p1 : int8u_ptr;
1724
 
 
1725
 
begin
1726
 
 s1:=step_ver_base(@m_di );
1727
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
1728
 
 p1:=p0;
1729
 
 
1730
 
 dist_end:=m_di.dist_end;
1731
 
 
1732
 
 npix:=0;
1733
 
 p1^ :=0;
1734
 
 
1735
 
 if dist_end > 0 then
1736
 
  begin
1737
 
   p1^:=int8u(m_ren.cover(s1 ) );
1738
 
 
1739
 
   inc(npix );
1740
 
 
1741
 
  end;
1742
 
 
1743
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1744
 
 
1745
 
 dx  :=1;
1746
 
 dist:=m_dist[dx ] - s1;
1747
 
 
1748
 
 while dist <= m_width do
1749
 
  begin
1750
 
   inc(dist_end ,m_di.dy_end );
1751
 
 
1752
 
   p1^:=0;
1753
 
 
1754
 
   if dist_end > 0 then
1755
 
    begin
1756
 
     p1^:=int8u(m_ren.cover(dist ) );
1757
 
 
1758
 
     inc(npix );
1759
 
 
1760
 
    end;
1761
 
 
1762
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1763
 
   inc(dx );
1764
 
 
1765
 
   dist:=m_dist[dx ] - s1;
1766
 
 
1767
 
  end;
1768
 
 
1769
 
 dx      :=1;
1770
 
 dist_end:=m_di.dist_end;
1771
 
 dist    :=m_dist[dx ] + s1;
1772
 
 
1773
 
 while dist <= m_width do
1774
 
  begin
1775
 
   dec(dist_end ,m_di.dy_end );
1776
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
1777
 
 
1778
 
   p0^:=0;
1779
 
 
1780
 
   if dist_end > 0 then
1781
 
    begin
1782
 
     p0^:=int8u(m_ren.cover(dist ) );
1783
 
 
1784
 
     inc(npix );
1785
 
 
1786
 
    end;
1787
 
 
1788
 
   inc(dx );
1789
 
 
1790
 
   dist:=m_dist[dx ] + s1;
1791
 
 
1792
 
  end;
1793
 
 
1794
 
 m_ren.blend_solid_hspan(
1795
 
  m_x - dx + 1 ,m_y ,
1796
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
1797
 
  p0 );
1798
 
 
1799
 
 inc(m_step );
1800
 
 
1801
 
 result:=
1802
 
  (npix <> 0 ) and
1803
 
  (m_step < m_count );
1804
 
 
1805
 
end;
1806
 
 
1807
 
{ CONSTRUCT }
1808
 
constructor line_interpolator_aa3.Construct;
1809
 
var
1810
 
 dist1_start ,dist2_start ,npix ,dx ,dy : int;
1811
 
 
1812
 
begin
1813
 
 inherited Construct(ren ,lp );
1814
 
 
1815
 
 m_di.Construct(
1816
 
  lp.x1 ,lp.y1 ,lp.x2 ,lp.y2 ,sx ,sy ,ex ,ey ,
1817
 
  lp.x1 and not line_subpixel_mask ,
1818
 
  lp.y1 and not line_subpixel_mask );
1819
 
 
1820
 
 npix:=1;
1821
 
 
1822
 
 if lp.vertical then
1823
 
  repeat
1824
 
   m_li.minus_operator;
1825
 
 
1826
 
   dec(m_y ,lp.inc_ );
1827
 
 
1828
 
   m_x:=shr_int32(m_lp.x1 + m_li._y ,line_subpixel_shift );
1829
 
 
1830
 
   if lp.inc_ > 0 then
1831
 
    m_di.dec_y(m_x - m_old_x )
1832
 
   else
1833
 
    m_di.inc_y(m_x - m_old_x );
1834
 
 
1835
 
   m_old_x:=m_x;
1836
 
 
1837
 
   dist1_start:=m_di.dist_start;
1838
 
   dist2_start:=dist1_start;
1839
 
 
1840
 
   dx:=0;
1841
 
 
1842
 
   if dist1_start < 0 then
1843
 
    inc(npix );
1844
 
 
1845
 
   repeat
1846
 
    inc(dist1_start ,m_di.dy_start );
1847
 
    dec(dist2_start ,m_di.dy_start );
1848
 
 
1849
 
    if dist1_start < 0 then
1850
 
     inc(npix );
1851
 
 
1852
 
    if dist2_start < 0 then
1853
 
     inc(npix );
1854
 
 
1855
 
    inc(dx );
1856
 
 
1857
 
   until m_dist[dx ] > m_width;
1858
 
 
1859
 
   if npix = 0 then
1860
 
    break;
1861
 
 
1862
 
   npix:=0;
1863
 
 
1864
 
   dec(m_step );
1865
 
 
1866
 
  until m_step < -m_max_extent
1867
 
 else
1868
 
  repeat
1869
 
   m_li.minus_operator;
1870
 
 
1871
 
   dec(m_x ,lp.inc_ );
1872
 
 
1873
 
   m_y:=shr_int32(m_lp.y1 + m_li._y ,line_subpixel_shift );
1874
 
 
1875
 
   if lp.inc_ > 0 then
1876
 
    m_di.dec_x(m_y - m_old_y )
1877
 
   else
1878
 
    m_di.inc_x(m_y - m_old_y );
1879
 
 
1880
 
   m_old_y:=m_y;
1881
 
 
1882
 
   dist1_start:=m_di.dist_start;
1883
 
   dist2_start:=dist1_start;
1884
 
 
1885
 
   dy:=0;
1886
 
 
1887
 
   if dist1_start < 0 then
1888
 
    inc(npix );
1889
 
 
1890
 
   repeat
1891
 
    dec(dist1_start ,m_di.dx_start );
1892
 
    inc(dist2_start ,m_di.dx_start );
1893
 
 
1894
 
    if dist1_start < 0 then
1895
 
     inc(npix );
1896
 
 
1897
 
    if dist2_start < 0 then
1898
 
     inc(npix );
1899
 
 
1900
 
    inc(dy );
1901
 
 
1902
 
   until m_dist[dy ] > m_width;
1903
 
 
1904
 
   if npix = 0 then
1905
 
    break;
1906
 
 
1907
 
   npix:=0;
1908
 
 
1909
 
   dec(m_step );
1910
 
 
1911
 
  until m_step < -m_max_extent;
1912
 
 
1913
 
 m_li.adjust_forward;
1914
 
 
1915
 
 dec(m_step ,m_max_extent );
1916
 
 
1917
 
end;
1918
 
 
1919
 
{ STEP_HOR }
1920
 
function line_interpolator_aa3.step_hor;
1921
 
var
1922
 
 dist_start ,dist_end ,dist ,dy ,s1 ,npix : int;
1923
 
 
1924
 
 p0 ,p1 : int8u_ptr;
1925
 
 
1926
 
begin
1927
 
 s1:=step_hor_base(@m_di );
1928
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
1929
 
 p1:=p0;
1930
 
 
1931
 
 dist_start:=m_di.dist_start;
1932
 
 dist_end  :=m_di.dist_end;
1933
 
 
1934
 
 npix:=0;
1935
 
 p1^ :=0;
1936
 
 
1937
 
 if dist_end > 0 then
1938
 
  begin
1939
 
   if dist_start <= 0 then
1940
 
    p1^:=int8u(m_ren.cover(s1 ) );
1941
 
 
1942
 
   inc(npix );
1943
 
 
1944
 
  end;
1945
 
 
1946
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1947
 
 
1948
 
 dy  :=1;
1949
 
 dist:=m_dist[dy ] - s1;
1950
 
 
1951
 
 while dist <= m_width do
1952
 
  begin
1953
 
   dec(dist_start ,m_di.dx_start );
1954
 
   dec(dist_end ,m_di.dx_end );
1955
 
 
1956
 
   p1^:=0;
1957
 
 
1958
 
   if (dist_end > 0 ) and
1959
 
      (dist_start <= 0 ) then
1960
 
    begin
1961
 
     p1^:=int8u(m_ren.cover(dist ) );
1962
 
 
1963
 
     inc(npix );
1964
 
 
1965
 
    end;
1966
 
 
1967
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
1968
 
   inc(dy );
1969
 
 
1970
 
   dist:=m_dist[dy ] - s1;
1971
 
 
1972
 
  end;
1973
 
 
1974
 
 dy        :=1;
1975
 
 dist_start:=m_di.dist_start;
1976
 
 dist_end  :=m_di.dist_end;
1977
 
 dist      :=m_dist[dy ] + s1;
1978
 
 
1979
 
 while dist <= m_width do
1980
 
  begin
1981
 
   inc(dist_start ,m_di.dx_start );
1982
 
   inc(dist_end ,m_di.dx_end );
1983
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
1984
 
 
1985
 
   p0^:=0;
1986
 
 
1987
 
   if (dist_end > 0 ) and
1988
 
      (dist_start <= 0 ) then
1989
 
    begin
1990
 
     p0^:=int8u(m_ren.cover(dist ) );
1991
 
 
1992
 
     inc(npix );
1993
 
 
1994
 
    end;
1995
 
 
1996
 
   inc(dy );
1997
 
 
1998
 
   dist:=m_dist[dy ] + s1;
1999
 
 
2000
 
  end;
2001
 
 
2002
 
 m_ren.blend_solid_vspan(
2003
 
  m_x ,m_y - dy + 1 ,
2004
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
2005
 
  p0 );
2006
 
 
2007
 
 inc(m_step );
2008
 
 
2009
 
 result:=
2010
 
  (npix <> 0 ) and
2011
 
  (m_step < m_count );
2012
 
 
2013
 
end;
2014
 
 
2015
 
{ STEP_VER }
2016
 
function line_interpolator_aa3.step_ver;
2017
 
var
2018
 
 dist_start ,dist_end ,dist ,dx ,s1 ,npix : int;
2019
 
 
2020
 
 p0 ,p1 : int8u_ptr;
2021
 
 
2022
 
begin
2023
 
 s1:=step_ver_base(@m_di );
2024
 
 p0:=int8u_ptr(ptrcomp(@m_covers[0 ] ) + (max_half_width + 2 ) * sizeof(int8u ) );
2025
 
 p1:=p0;
2026
 
 
2027
 
 dist_start:=m_di.dist_start;
2028
 
 dist_end  :=m_di.dist_end;
2029
 
 
2030
 
 npix:=0;
2031
 
 p1^ :=0;
2032
 
 
2033
 
 if dist_end > 0 then
2034
 
  begin
2035
 
   if dist_start <= 0 then
2036
 
    p1^:=int8u(m_ren.cover(s1 ) );
2037
 
 
2038
 
   inc(npix );
2039
 
 
2040
 
  end;
2041
 
 
2042
 
 inc(ptrcomp(p1 ) ,sizeof(int8u ) );
2043
 
 
2044
 
 dx  :=1;
2045
 
 dist:=m_dist[dx ] - s1;
2046
 
 
2047
 
 while dist <= m_width do
2048
 
  begin
2049
 
   inc(dist_start ,m_di.dy_start );
2050
 
   inc(dist_end ,m_di.dy_end );
2051
 
 
2052
 
   p1^:=0;
2053
 
 
2054
 
   if (dist_end > 0 ) and
2055
 
      (dist_start <= 0 ) then
2056
 
    begin
2057
 
     p1^:=int8u(m_ren.cover(dist ) );
2058
 
 
2059
 
     inc(npix );
2060
 
 
2061
 
    end;
2062
 
 
2063
 
   inc(ptrcomp(p1 ) ,sizeof(int8u ) );
2064
 
   inc(dx );
2065
 
 
2066
 
   dist:=m_dist[dx ] - s1;
2067
 
 
2068
 
  end;
2069
 
 
2070
 
 dx        :=1;
2071
 
 dist_start:=m_di.dist_start;
2072
 
 dist_end  :=m_di.dist_end;
2073
 
 dist      :=m_dist[dx ] + s1;
2074
 
 
2075
 
 while dist <= m_width do
2076
 
  begin
2077
 
   dec(dist_start ,m_di.dy_start );
2078
 
   dec(dist_end ,m_di.dy_end );
2079
 
   dec(ptrcomp(p0 ) ,sizeof(int8u ) );
2080
 
 
2081
 
   p0^:=0;
2082
 
 
2083
 
   if (dist_end > 0 ) and
2084
 
      (dist_start <= 0 ) then
2085
 
    begin
2086
 
     p0^:=int8u(m_ren.cover(dist ) );
2087
 
 
2088
 
     inc(npix );
2089
 
 
2090
 
    end;
2091
 
 
2092
 
   inc(dx );
2093
 
 
2094
 
   dist:=m_dist[dx ] + s1;
2095
 
 
2096
 
  end;
2097
 
 
2098
 
 m_ren.blend_solid_hspan(
2099
 
  m_x - dx + 1 ,m_y ,
2100
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
2101
 
  p0 );
2102
 
 
2103
 
 inc(m_step );
2104
 
 
2105
 
 result:=
2106
 
  (npix <> 0 ) and
2107
 
  (m_step < m_count );
2108
 
 
2109
 
end;
2110
 
 
2111
 
{ CONSTRUCT }
2112
 
constructor line_profile_aa.Construct;
2113
 
var
2114
 
 i : int;
2115
 
 
2116
 
begin
2117
 
 m_size   :=0;
2118
 
 m_profile:=0;
2119
 
 
2120
 
 m_subpixel_width:=0;
2121
 
 m_min_width     :=1.0;
2122
 
 m_smoother_width:=1.0;
2123
 
 
2124
 
 for i:=0 to aa_num - 1 do
2125
 
  m_gamma[i ]:=int8u(i );
2126
 
 
2127
 
end;
2128
 
 
2129
 
{ CONSTRUCT }
2130
 
constructor line_profile_aa.Construct(w : double; gamma_function : vertex_source_ptr );
2131
 
begin
2132
 
 m_size   :=0;
2133
 
 m_profile:=0;
2134
 
 
2135
 
 m_subpixel_width:=0;
2136
 
 m_min_width     :=1.0;
2137
 
 m_smoother_width:=1.0;
2138
 
 
2139
 
 gamma_(gamma_function );
2140
 
 width_(w );
2141
 
 
2142
 
end;
2143
 
 
2144
 
{ DESTRUCT }
2145
 
destructor line_profile_aa.Destruct;
2146
 
begin
2147
 
 agg_freemem(pointer(m_profile ) ,m_size * sizeof(int8u ) );
2148
 
 
2149
 
end;
2150
 
 
2151
 
{ MIN_WIDTH_ }
2152
 
procedure line_profile_aa.min_width_;
2153
 
begin
2154
 
 m_min_width:=w;
2155
 
 
2156
 
end;
2157
 
 
2158
 
{ SMOOTHER_WIDTH_ }
2159
 
procedure line_profile_aa.smoother_width_;
2160
 
begin
2161
 
 m_smoother_width:=w;
2162
 
 
2163
 
end;
2164
 
 
2165
 
{ GAMMA_ }
2166
 
procedure line_profile_aa.gamma_;
2167
 
var
2168
 
 i : int;
2169
 
 
2170
 
begin
2171
 
 for i:=0 to aa_num - 1 do
2172
 
  m_gamma[i ]:=int8u(trunc(gamma_function.func_operator_gamma(i / aa_mask ) * aa_mask + 0.5 ) );
2173
 
 
2174
 
end;
2175
 
 
2176
 
{ WIDTH_ }
2177
 
procedure line_profile_aa.width_;
2178
 
var
2179
 
 s : double;
2180
 
 
2181
 
begin
2182
 
 if w < 0.0 then
2183
 
  w:=0.0;
2184
 
 
2185
 
 if w < m_smoother_width then
2186
 
  w:=w + w
2187
 
 else
2188
 
  w:=w + m_smoother_width;
2189
 
 
2190
 
 w:=w * 0.5;
2191
 
 w:=w - m_smoother_width;
2192
 
 s:=m_smoother_width;
2193
 
 
2194
 
 if w < 0.0 then
2195
 
  begin
2196
 
   s:=s + w;
2197
 
   w:=0.0;
2198
 
 
2199
 
  end;
2200
 
 
2201
 
 set_(w ,s );
2202
 
 
2203
 
end;
2204
 
 
2205
 
{ _PROFILE_SIZE }
2206
 
function line_profile_aa._profile_size;
2207
 
begin
2208
 
 result:=m_size;
2209
 
 
2210
 
end;
2211
 
 
2212
 
{ _SUBPIXEL_WIDTH }
2213
 
function line_profile_aa._subpixel_width;
2214
 
begin
2215
 
 result:=m_subpixel_width;
2216
 
 
2217
 
end;
2218
 
 
2219
 
{ _MIN_WIDTH }
2220
 
function line_profile_aa._min_width;
2221
 
begin
2222
 
 result:=m_min_width;
2223
 
 
2224
 
end;
2225
 
 
2226
 
{ _SMOOTHER_WIDTH }
2227
 
function line_profile_aa._smoother_width;
2228
 
begin
2229
 
 result:=m_smoother_width;
2230
 
 
2231
 
end;
2232
 
 
2233
 
{ VALUE }
2234
 
function line_profile_aa.value;
2235
 
begin
2236
 
 result:=
2237
 
  int8u_ptr(
2238
 
   ptrcomp(m_profile ) + (dist + subpixel_size * 2 ) * sizeof(int8u ) )^;
2239
 
 
2240
 
end;
2241
 
 
2242
 
{ PROFILE }
2243
 
function line_profile_aa.profile;
2244
 
var
2245
 
 size : unsigned;
2246
 
 
2247
 
begin
2248
 
 m_subpixel_width:=trunc(w * subpixel_size );
2249
 
 
2250
 
 size:=m_subpixel_width + subpixel_size * 6;
2251
 
 
2252
 
 if size > m_size then
2253
 
  begin
2254
 
   agg_freemem(pointer(m_profile ) ,m_size * sizeof(int8u ) );
2255
 
   agg_getmem (pointer(m_profile ) ,size * sizeof(int8u ) );
2256
 
 
2257
 
   m_size:=size;
2258
 
 
2259
 
  end;
2260
 
 
2261
 
 result:=m_profile;
2262
 
 
2263
 
end;
2264
 
 
2265
 
{ SET_ }
2266
 
procedure line_profile_aa.set_;
2267
 
var
2268
 
 base_val ,width ,k : double;
2269
 
 
2270
 
 subpixel_center_width ,subpixel_smoother_width ,i ,val ,n_smoother : unsigned;
2271
 
 
2272
 
 ch ,ch_center ,ch_smoother : int8u_ptr;
2273
 
 
2274
 
begin
2275
 
 base_val:=1.0;
2276
 
 
2277
 
 if center_width = 0.0 then
2278
 
  center_width:=1.0 / subpixel_size;
2279
 
 
2280
 
 if smoother_width = 0.0 then
2281
 
  smoother_width:=1.0 / subpixel_size;
2282
 
 
2283
 
 width:=center_width + smoother_width;
2284
 
 
2285
 
 if width < m_min_width then
2286
 
  begin
2287
 
   k:=width / m_min_width;
2288
 
 
2289
 
   base_val      :=base_val * k;
2290
 
   center_width  :=center_width / k;
2291
 
   smoother_width:=smoother_width / k;
2292
 
 
2293
 
  end;
2294
 
 
2295
 
 ch:=profile(center_width + smoother_width );
2296
 
 
2297
 
 subpixel_center_width  :=trunc(center_width * subpixel_size);
2298
 
 subpixel_smoother_width:=trunc(smoother_width * subpixel_size);
2299
 
 
2300
 
 ch_center  :=int8u_ptr(ptrcomp(ch ) + subpixel_size * 2 * sizeof(int8u ) );
2301
 
 ch_smoother:=int8u_ptr(ptrcomp(ch_center ) + subpixel_center_width * sizeof(int8u ) );
2302
 
 
2303
 
 val:=m_gamma[trunc(base_val * aa_mask ) ];
2304
 
 
2305
 
 ch:=ch_center;
2306
 
 
2307
 
 i:=0;
2308
 
 
2309
 
 while i < subpixel_center_width do
2310
 
  begin
2311
 
   ch^:=int8u(val );
2312
 
 
2313
 
   inc(ptrcomp(ch ) ,sizeof(int8u ) );
2314
 
   inc(i );
2315
 
 
2316
 
  end;
2317
 
 
2318
 
 i:=0;
2319
 
 
2320
 
 while i < subpixel_smoother_width do
2321
 
  begin
2322
 
   ch_smoother^:=
2323
 
    m_gamma[
2324
 
     trunc(
2325
 
      (base_val - base_val * (i / subpixel_smoother_width ) ) * aa_mask ) ];
2326
 
 
2327
 
   inc(ptrcomp(ch_smoother ) ,sizeof(int8u ) );
2328
 
   inc(i );
2329
 
 
2330
 
  end;
2331
 
 
2332
 
 n_smoother:=
2333
 
  _profile_size -
2334
 
  subpixel_smoother_width -
2335
 
  subpixel_center_width -
2336
 
  subpixel_size * 2;
2337
 
 
2338
 
 val:=m_gamma[0 ];
2339
 
 
2340
 
 for i:=0 to n_smoother - 1 do
2341
 
  begin
2342
 
   ch_smoother^:=int8u(val );
2343
 
 
2344
 
   inc(ptrcomp(ch_smoother ) ,sizeof(int8u ) );
2345
 
 
2346
 
  end;
2347
 
 
2348
 
 ch:=ch_center;
2349
 
 
2350
 
 for i:=0 to subpixel_size * 2 - 1 do
2351
 
  begin
2352
 
   ch^:=ch_center^;
2353
 
 
2354
 
   dec(ptrcomp(ch ) ,sizeof(int8u ) );
2355
 
   inc(ptrcomp(ch_center ) ,sizeof(int8u ) );
2356
 
 
2357
 
  end;
2358
 
 
2359
 
end;
2360
 
 
2361
 
{ CONSTRUCT }
2362
 
constructor renderer_outline_aa.Construct;
2363
 
begin
2364
 
 m_ren    :=ren;
2365
 
 m_profile:=prof;
2366
 
 
2367
 
 m_color.Construct;
2368
 
 
2369
 
end;
2370
 
 
2371
 
{ COLOR_ }
2372
 
procedure renderer_outline_aa.color_;
2373
 
begin
2374
 
 m_color:=c^;
2375
 
 
2376
 
end;
2377
 
 
2378
 
{ _COLOR }
2379
 
function renderer_outline_aa._color;
2380
 
begin
2381
 
 result:=@m_color;
2382
 
 
2383
 
end;
2384
 
 
2385
 
{ PROFILE_ }
2386
 
procedure renderer_outline_aa.profile_;
2387
 
begin
2388
 
 m_profile:=prof;
2389
 
 
2390
 
end;
2391
 
 
2392
 
{ _PROFILE }
2393
 
function renderer_outline_aa._profile;
2394
 
begin
2395
 
 result:=m_profile;
2396
 
 
2397
 
end;
2398
 
 
2399
 
{ SUBPIXEL_WIDTH }
2400
 
function renderer_outline_aa.subpixel_width;
2401
 
begin
2402
 
 result:=m_profile._subpixel_width;
2403
 
 
2404
 
end;
2405
 
 
2406
 
{ COVER }
2407
 
function renderer_outline_aa.cover;
2408
 
begin
2409
 
 result:=int8u(m_profile.value(d ) );
2410
 
 
2411
 
end;
2412
 
 
2413
 
{ BLEND_SOLID_HSPAN }
2414
 
procedure renderer_outline_aa.blend_solid_hspan;
2415
 
begin
2416
 
 m_ren.blend_solid_hspan(x ,y ,len ,@m_color ,covers );
2417
 
 
2418
 
end;
2419
 
 
2420
 
{ BLEND_SOLID_VSPAN }
2421
 
procedure renderer_outline_aa.blend_solid_vspan;
2422
 
begin
2423
 
 m_ren.blend_solid_vspan(x ,y ,len ,@m_color ,covers );
2424
 
 
2425
 
end;
2426
 
 
2427
 
{ ACCURATE_JOIN_ONLY }
2428
 
function renderer_outline_aa.accurate_join_only;
2429
 
begin
2430
 
 result:=false;
2431
 
 
2432
 
end;
2433
 
 
2434
 
{ SEMIDOT_HLINE }
2435
 
procedure renderer_outline_aa.semidot_hline;
2436
 
var
2437
 
 covers : array[0..max_half_width * 2 + 4 - 1 ] of int8u;
2438
 
 p0 ,p1 : int8u_ptr;
2439
 
 
2440
 
 x ,y ,w ,x0 ,dx ,dy ,d : int;
2441
 
 
2442
 
 di : distance_interpolator0;
2443
 
 
2444
 
begin
2445
 
 p0:=@covers[0 ];
2446
 
 p1:=@covers[0 ];
2447
 
 
2448
 
 x:=x1 shl line_subpixel_shift;
2449
 
 y:=y1 shl line_subpixel_shift;
2450
 
 w:=subpixel_width;
2451
 
 
2452
 
 di.Construct(xc1 ,yc1 ,xc2 ,yc2 ,x ,y );
2453
 
 
2454
 
 inc(x ,line_subpixel_size div 2 );
2455
 
 inc(y ,line_subpixel_size div 2 );
2456
 
 
2457
 
 x0:=x1;
2458
 
 dx:=x - xc1;
2459
 
 dy:=y - yc1;
2460
 
 
2461
 
 repeat
2462
 
  d:=trunc(fast_sqrt(dx * dx + dy * dy ) );
2463
 
 
2464
 
  p1^:=0;
2465
 
 
2466
 
  if cmp(di.dist ) and
2467
 
     (d <= w ) then
2468
 
   p1^:=int8u(cover(d ) );
2469
 
 
2470
 
  inc(ptrcomp(p1 ) ,sizeof(int8u ) );
2471
 
  inc(dx ,line_subpixel_size );
2472
 
 
2473
 
  di.inc_x_;
2474
 
 
2475
 
  inc(x1 );
2476
 
 
2477
 
 until x1 > x2;
2478
 
 
2479
 
 m_ren.blend_solid_hspan(
2480
 
  x0 ,y1 ,
2481
 
  unsigned((ptrcomp(p1 ) - ptrcomp(p0 ) ) div sizeof(int8u ) ) ,
2482
 
  _color ,p0 );
2483
 
 
2484
 
end;
2485
 
 
2486
 
{ SEMIDOT }
2487
 
procedure renderer_outline_aa.semidot;
2488
 
var
2489
 
 r ,dx ,dy ,dy0 ,dx0 ,x ,y : int;
2490
 
 
2491
 
 ei : ellipse_bresenham_interpolator;
2492
 
 
2493
 
begin
2494
 
 r:=shr_int32(subpixel_width + line_subpixel_mask ,line_subpixel_shift);
2495
 
 
2496
 
 if r < 1 then
2497
 
  r:=1;
2498
 
 
2499
 
 ei.Construct(r ,r );
2500
 
 
2501
 
 dx :=0;
2502
 
 dy :=-r;
2503
 
 dy0:=dy;
2504
 
 dx0:=dx;
2505
 
 x  :=shr_int32(xc1 ,line_subpixel_shift );
2506
 
 y  :=shr_int32(yc1 ,line_subpixel_shift );
2507
 
 
2508
 
 repeat
2509
 
  inc(dx ,ei._dx );
2510
 
  inc(dy ,ei._dy );
2511
 
 
2512
 
  if dy <> dy0 then
2513
 
   begin
2514
 
    semidot_hline(cmp ,xc1 ,yc1 ,xc2 ,yc2 ,x - dx0 ,y + dy0 ,x + dx0 );
2515
 
    semidot_hline(cmp ,xc1 ,yc1 ,xc2 ,yc2 ,x - dx0 ,y - dy0 ,x + dx0 );
2516
 
 
2517
 
   end;
2518
 
 
2519
 
  dx0:=dx;
2520
 
  dy0:=dy;
2521
 
 
2522
 
  ei.inc_operator;
2523
 
 
2524
 
 until dy >= 0;
2525
 
 
2526
 
 semidot_hline(cmp ,xc1 ,yc1 ,xc2 ,yc2 ,x - dx0 ,y + dy0 ,x + dx0 );
2527
 
 
2528
 
end;
2529
 
 
2530
 
{ LINE0 }
2531
 
procedure renderer_outline_aa.line0;
2532
 
var
2533
 
 li : line_interpolator_aa0;
2534
 
 
2535
 
begin
2536
 
 li.Construct(@self ,lp );
2537
 
 
2538
 
 if li.count <> 0 then
2539
 
  if li.vertical then
2540
 
   while li.step_ver do
2541
 
  else
2542
 
   while li.step_hor do;
2543
 
 
2544
 
end;
2545
 
 
2546
 
{ LINE1 }
2547
 
procedure renderer_outline_aa.line1;
2548
 
var
2549
 
 li : line_interpolator_aa1;
2550
 
 
2551
 
begin
2552
 
 fix_degenerate_bisectrix_start(lp ,@sx ,@sy );
2553
 
 
2554
 
 li.Construct(@self ,lp ,sx ,sy );
2555
 
 
2556
 
 if li.vertical then
2557
 
  while li.step_ver do
2558
 
 else
2559
 
  while li.step_hor do;
2560
 
 
2561
 
end;
2562
 
 
2563
 
{ LINE2 }
2564
 
procedure renderer_outline_aa.line2;
2565
 
var
2566
 
 li : line_interpolator_aa2;
2567
 
 
2568
 
begin
2569
 
 fix_degenerate_bisectrix_end(lp ,@ex ,@ey );
2570
 
 
2571
 
 li.Construct(@self ,lp ,ex ,ey );
2572
 
 
2573
 
 if li.vertical then
2574
 
  while li.step_ver do
2575
 
 else
2576
 
  while li.step_hor do;
2577
 
 
2578
 
end;
2579
 
 
2580
 
{ LINE3 }
2581
 
procedure renderer_outline_aa.line3;
2582
 
var
2583
 
 li : line_interpolator_aa3;
2584
 
 
2585
 
begin
2586
 
 fix_degenerate_bisectrix_start(lp ,@sx ,@sy );
2587
 
 fix_degenerate_bisectrix_end  (lp ,@ex ,@ey );
2588
 
 
2589
 
 li.Construct(@self ,lp ,sx ,sy ,ex ,ey );
2590
 
 
2591
 
 if li.vertical then
2592
 
  while li.step_ver do
2593
 
 else
2594
 
  while li.step_hor do;
2595
 
 
2596
 
end;
2597
 
 
2598
 
END.
2599